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

Commit

Permalink
release v0.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
tanersener committed Aug 4, 2021
1 parent d58d8f9 commit 201de3d
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 15 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 0.4.2
- Support Android v1 and v2 embeddings

## 0.4.1
- Migrated the plugin to Android v2 embedding

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# flutter_ffmpeg

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

FFmpeg plugin for Flutter. Supports iOS and Android.
Expand Down Expand Up @@ -35,7 +35,7 @@ FFmpeg plugin for Flutter. Supports iOS and Android.
Add `flutter_ffmpeg` as a dependency in your `pubspec.yaml file`.
```
dependencies:
flutter_ffmpeg: ^0.4.1
flutter_ffmpeg: ^0.4.2
```

#### 2.1 Packages
Expand Down
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ String safeExtGet(String prop, String fallback) {
}

group 'com.arthenica.flutter.ffmpeg'
version '0.4.1'
version '0.4.2'

buildscript {
repositories {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
import io.flutter.plugin.common.MethodCall;
import io.flutter.plugin.common.MethodChannel;
import io.flutter.plugin.common.MethodChannel.MethodCallHandler;
import io.flutter.plugin.common.BinaryMessenger;

/**
* <h3>Flutter FFmpeg Plugin</h3>
Expand Down Expand Up @@ -94,14 +95,29 @@ public class FlutterFFmpegPlugin implements FlutterPlugin, MethodCallHandler, Ev
private Context context;
private MethodChannel channel;
private EventChannel eventChannel;

@Override
public void onAttachedToEngine(final FlutterPluginBinding binding) {
channel = new MethodChannel(binding.getBinaryMessenger(), "flutter_ffmpeg");

/**
* Registers plugin to registry.
*
* @param registrar receiver of plugin registration
*/
@SuppressWarnings("deprecation")
public static void registerWith(final io.flutter.plugin.common.PluginRegistry.Registrar registrar) {
FlutterFFmpegPlugin flutterFFmpegPlugin = new FlutterFFmpegPlugin();
flutterFFmpegPlugin.init(registrar.messenger(), (registrar.activity() != null) ? registrar.activity() : registrar.context());
}

private void init(final BinaryMessenger messenger, final Context context) {
channel = new MethodChannel(messenger, "flutter_ffmpeg");
channel.setMethodCallHandler(this);
eventChannel = new EventChannel(binding.getBinaryMessenger(), "flutter_ffmpeg_event");
eventChannel = new EventChannel(messenger, "flutter_ffmpeg_event");
eventChannel.setStreamHandler(this);
context = binding.getApplicationContext();
this.context = context;
}

@Override
public void onAttachedToEngine(final FlutterPluginBinding binding) {
init(binding.getBinaryMessenger(), binding.getApplicationContext());
}

@Override
Expand All @@ -110,7 +126,7 @@ public void onDetachedFromEngine(final FlutterPluginBinding binding) {
channel.setMethodCallHandler(null);
channel = null;
}

if (eventChannel != null) {
eventChannel.setStreamHandler(null);
eventChannel = null;
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ packages:
name: flutter_ffmpeg
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.1"
version: "0.4.2"
flutter_test:
dependency: "direct dev"
description: flutter
Expand Down
4 changes: 2 additions & 2 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_ffmpeg_example
description: Demonstrates how to use the flutter_ffmpeg plugin.
version: 0.4.1
version: 0.4.2
publish_to: 'none'

environment:
Expand All @@ -14,7 +14,7 @@ dependencies:
path: ^1.8.0
fluttertoast: ^8.0.8
video_player: ^2.1.12
flutter_ffmpeg: 0.4.1
flutter_ffmpeg: 0.4.2

dev_dependencies:
flutter_test:
Expand Down
2 changes: 1 addition & 1 deletion ios/flutter_ffmpeg.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'flutter_ffmpeg'
s.version = '0.4.1'
s.version = '0.4.2'
s.summary = 'FFmpeg plugin for Flutter.'
s.description = 'FFmpeg plugin based on mobile-ffmpeg for Flutter.'
s.homepage = 'https://github.com/tanersener/flutter-ffmpeg'
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_ffmpeg
description: Flutter plugin to run FFmpeg on mobile platforms. Supports iOS and Android.
version: 0.4.1
version: 0.4.2
homepage: https://github.com/tanersener/flutter-ffmpeg

environment:
Expand Down

0 comments on commit 201de3d

Please sign in to comment.