Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Add this to your package's `pubspec.yaml` file:

```yaml
dependencies:
video_compress: ^3.1.0
video_compress: ^1.0.0
```

### 2. Install it
Expand Down
16 changes: 9 additions & 7 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
group 'com.example.video_compress'
version '1.0-SNAPSHOT'
group 'com.spectora.video_compress'
version '1.0'

buildscript {
ext.kotlin_version = '1.6.10'
ext.kotlin_version = '2.0.20'
repositories {
google()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.0.0'
classpath 'com.android.tools.build:gradle:8.7.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand All @@ -18,20 +18,22 @@ rootProject.allprojects {
repositories {
google()
mavenCentral()
// jcenter()
}
}

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

android {
compileSdkVersion 31
namespace 'com.spectora.video_compress'
compileSdk 34

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
minSdkVersion 18
minSdkVersion 21
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
lintOptions {
Expand All @@ -41,5 +43,5 @@ android {

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.otaliastudios:transcoder:0.9.1'
implementation 'com.otaliastudios:transcoder:0.10.5'
}
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip
2 changes: 1 addition & 1 deletion android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.video_compress">
package="com.spectora.video_compress">
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
</manifest>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.video_compress
package com.spectora.video_compress

import android.content.Context
import android.graphics.Bitmap
Expand Down Expand Up @@ -47,4 +47,4 @@ class ThumbnailUtility(channelName: String) {

result.success(file.absolutePath)
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.video_compress
package com.spectora.video_compress

import android.content.Context
import android.graphics.Bitmap
Expand Down Expand Up @@ -131,4 +131,4 @@ class Utility(private val channelName: String) {
val dir = context.getExternalFilesDir("video_compress")
result.success(dir?.deleteRecursively())
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.example.video_compress
package com.spectora.video_compress

import android.content.Context
import android.net.Uri
Expand All @@ -13,7 +13,7 @@ import com.otaliastudios.transcoder.strategy.RemoveTrackStrategy
import com.otaliastudios.transcoder.strategy.TrackStrategy
import io.flutter.embedding.engine.plugins.FlutterPlugin
import io.flutter.plugin.common.BinaryMessenger
import com.otaliastudios.transcoder.internal.Logger
import com.otaliastudios.transcoder.internal.utils.Logger
import io.flutter.plugin.common.MethodCall
import io.flutter.plugin.common.MethodChannel
import io.flutter.plugin.common.MethodChannel.MethodCallHandler
Expand Down
4 changes: 2 additions & 2 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.video_compress_example"
minSdkVersion 18
targetSdkVersion 31
minSdkVersion 21
targetSdkVersion 33
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand Down
2 changes: 1 addition & 1 deletion example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
2 changes: 1 addition & 1 deletion example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class _MyHomePageState extends State<MyHomePage> {
),
Text(
'$_counter',
style: Theme.of(context).textTheme.headline4,
style: Theme.of(context).textTheme.titleMedium,
),
InkWell(
child: Icon(
Expand Down
2 changes: 2 additions & 0 deletions example/macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ import Foundation

import file_selector_macos
import video_compress
import video_player_avfoundation

func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin"))
VideoCompressPlugin.register(with: registry.registrar(forPlugin: "VideoCompressPlugin"))
FVPVideoPlayerPlugin.register(with: registry.registrar(forPlugin: "FVPVideoPlayerPlugin"))
}
2 changes: 1 addition & 1 deletion ios/video_compress.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Pod::Spec.new do |s|
s.description = <<-DESC
A new flutter plugin project.
DESC
s.homepage = 'https://github.com/jonataslaw/video_compress'
s.homepage = 'https://github.com/SpectoraSoftware/VideoCompress'
s.license = { :file => '../LICENSE' }
s.author = { 'Jonny Borges' => 'jonataborges01@gmail.com' }
s.source = { :path => '.' }
Expand Down
1 change: 0 additions & 1 deletion lib/src/video_compress/video_compressor.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'dart:async';
import 'dart:convert';
import 'dart:io';
import 'dart:typed_data';

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
Expand Down
4 changes: 2 additions & 2 deletions macos/video_compress.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ Pod::Spec.new do |s|
s.description = <<-DESC
A new flutter plugin project.
DESC
s.homepage = 'https://github.com/jonataslaw/video_compress'
s.homepage = 'https://github.com/SpectoraSoftware/VideoCompress'
s.license = { :file => '../LICENSE' }
s.author = { 'Jonny Borges' => 'jonataborges01@gmail.com' }
s.author = { 'Gabriel Araujo' => 'gabriel@spectora.com' }
s.source = { :path => '.' }
s.source_files = 'Classes/**/*'
s.dependency 'FlutterMacOS'
Expand Down
46 changes: 5 additions & 41 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,61 +1,25 @@
name: video_compress
description: Light library of video manipulation of Flutter. Compress video, remove audio, get video thumbnail from dart code.
version: 3.1.2
homepage: https://github.com/jonataslaw/VideoCompress
version: 1.0.0
homepage: https://github.com/SpectoraSoftware/VideoCompress

environment:
sdk: '>=2.16.2 <3.0.0'
sdk: '>=2.16.2 <4.0.0'
flutter: ">=2.0.0"

dependencies:
flutter:
sdk: flutter

# dev_dependencies:
# flutter_test:
# sdk: flutter

# For information on the generic Dart part of this file, see the
# following page: https://www.dartlang.org/tools/pub/pubspec

flutter:
plugin:
platforms:
android:
package: com.example.video_compress
package: com.spectora.video_compress
pluginClass: VideoCompressPlugin
ios:
pluginClass: VideoCompressPlugin
macos:
pluginClass: VideoCompressPlugin

# To add assets to your plugin package, add an assets section, like this:
# assets:
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg
#
# For details regarding assets in packages, see
# https://flutter.dev/assets-and-images/#from-packages
#
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware.

# To add custom fonts to your plugin package, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts in packages, see
# https://flutter.dev/custom-fonts/#from-packages