Skip to content
This repository was archived by the owner on Oct 14, 2021. It is now read-only.

Commit 201de3d

Browse files
committedAug 4, 2021
release v0.4.2
1 parent d58d8f9 commit 201de3d

File tree

8 files changed

+34
-15
lines changed

8 files changed

+34
-15
lines changed
 

‎CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 0.4.2
2+
- Support Android v1 and v2 embeddings
3+
14
## 0.4.1
25
- Migrated the plugin to Android v2 embedding
36

‎README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# flutter_ffmpeg
22

3-
![GitHub release](https://img.shields.io/badge/release-v0.4.1-blue.svg)
3+
![GitHub release](https://img.shields.io/badge/release-v0.4.2-blue.svg)
44
![](https://img.shields.io/pub/v/flutter_ffmpeg.svg)
55

66
FFmpeg plugin for Flutter. Supports iOS and Android.
@@ -35,7 +35,7 @@ FFmpeg plugin for Flutter. Supports iOS and Android.
3535
Add `flutter_ffmpeg` as a dependency in your `pubspec.yaml file`.
3636
```
3737
dependencies:
38-
flutter_ffmpeg: ^0.4.1
38+
flutter_ffmpeg: ^0.4.2
3939
```
4040

4141
#### 2.1 Packages

‎android/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ String safeExtGet(String prop, String fallback) {
1111
}
1212

1313
group 'com.arthenica.flutter.ffmpeg'
14-
version '0.4.1'
14+
version '0.4.2'
1515

1616
buildscript {
1717
repositories {

‎android/src/main/java/com/arthenica/flutter/ffmpeg/FlutterFFmpegPlugin.java

+23-7
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
import io.flutter.plugin.common.MethodCall;
4949
import io.flutter.plugin.common.MethodChannel;
5050
import io.flutter.plugin.common.MethodChannel.MethodCallHandler;
51+
import io.flutter.plugin.common.BinaryMessenger;
5152

5253
/**
5354
* <h3>Flutter FFmpeg Plugin</h3>
@@ -94,14 +95,29 @@ public class FlutterFFmpegPlugin implements FlutterPlugin, MethodCallHandler, Ev
9495
private Context context;
9596
private MethodChannel channel;
9697
private EventChannel eventChannel;
97-
98-
@Override
99-
public void onAttachedToEngine(final FlutterPluginBinding binding) {
100-
channel = new MethodChannel(binding.getBinaryMessenger(), "flutter_ffmpeg");
98+
99+
/**
100+
* Registers plugin to registry.
101+
*
102+
* @param registrar receiver of plugin registration
103+
*/
104+
@SuppressWarnings("deprecation")
105+
public static void registerWith(final io.flutter.plugin.common.PluginRegistry.Registrar registrar) {
106+
FlutterFFmpegPlugin flutterFFmpegPlugin = new FlutterFFmpegPlugin();
107+
flutterFFmpegPlugin.init(registrar.messenger(), (registrar.activity() != null) ? registrar.activity() : registrar.context());
108+
}
109+
110+
private void init(final BinaryMessenger messenger, final Context context) {
111+
channel = new MethodChannel(messenger, "flutter_ffmpeg");
101112
channel.setMethodCallHandler(this);
102-
eventChannel = new EventChannel(binding.getBinaryMessenger(), "flutter_ffmpeg_event");
113+
eventChannel = new EventChannel(messenger, "flutter_ffmpeg_event");
103114
eventChannel.setStreamHandler(this);
104-
context = binding.getApplicationContext();
115+
this.context = context;
116+
}
117+
118+
@Override
119+
public void onAttachedToEngine(final FlutterPluginBinding binding) {
120+
init(binding.getBinaryMessenger(), binding.getApplicationContext());
105121
}
106122

107123
@Override
@@ -110,7 +126,7 @@ public void onDetachedFromEngine(final FlutterPluginBinding binding) {
110126
channel.setMethodCallHandler(null);
111127
channel = null;
112128
}
113-
129+
114130
if (eventChannel != null) {
115131
eventChannel.setStreamHandler(null);
116132
eventChannel = null;

‎example/pubspec.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ packages:
8282
name: flutter_ffmpeg
8383
url: "https://pub.dartlang.org"
8484
source: hosted
85-
version: "0.4.1"
85+
version: "0.4.2"
8686
flutter_test:
8787
dependency: "direct dev"
8888
description: flutter

‎example/pubspec.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: flutter_ffmpeg_example
22
description: Demonstrates how to use the flutter_ffmpeg plugin.
3-
version: 0.4.1
3+
version: 0.4.2
44
publish_to: 'none'
55

66
environment:
@@ -14,7 +14,7 @@ dependencies:
1414
path: ^1.8.0
1515
fluttertoast: ^8.0.8
1616
video_player: ^2.1.12
17-
flutter_ffmpeg: 0.4.1
17+
flutter_ffmpeg: 0.4.2
1818

1919
dev_dependencies:
2020
flutter_test:

‎ios/flutter_ffmpeg.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'flutter_ffmpeg'
3-
s.version = '0.4.1'
3+
s.version = '0.4.2'
44
s.summary = 'FFmpeg plugin for Flutter.'
55
s.description = 'FFmpeg plugin based on mobile-ffmpeg for Flutter.'
66
s.homepage = 'https://github.com/tanersener/flutter-ffmpeg'

‎pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: flutter_ffmpeg
22
description: Flutter plugin to run FFmpeg on mobile platforms. Supports iOS and Android.
3-
version: 0.4.1
3+
version: 0.4.2
44
homepage: https://github.com/tanersener/flutter-ffmpeg
55

66
environment:

0 commit comments

Comments
 (0)
This repository has been archived.