Browse Source

fix ios refresh bug

cjl_macbook 6 years ago
parent
commit
65ad811728

+ 4 - 0
CHANGELOG.md

@@ -1,3 +1,7 @@
+## 0.1.2
+
+fix ios fps problem.
+
 ## 0.1.1
 
 fix some bug

+ 4 - 2
README-EN.md

@@ -1,5 +1,7 @@
 # ijkplayer
 
+[![pub package](https://img.shields.io/pub/v/flutter_ijkplayer.svg)](https://pub.dartlang.org/packages/flutter_ijkplayer)
+
 ijkplayer for bilibili/ijkplayer, use flutter Texture widget.
 Read this README and refer to example/lib/main.dart before using it.
 The question of Android might not be able to run will be explained in detail.
@@ -12,13 +14,13 @@ Before using library, you can star and download the code to try the example.
 
 ## Install
 
-[![pub package](https://img.shields.io/pub/v/oktoast.svg)](https://pub.dartlang.org/packages/oktoast)
+[![pub package](https://img.shields.io/pub/v/flutter_ijkplayer.svg)](https://pub.dartlang.org/packages/flutter_ijkplayer)
 
 pubspec.yaml
 
 ```yaml
 dependencies:
-  flutter_ijkplayer: ^0.1.1
+  flutter_ijkplayer: ${latest_version}
 ```
 
 ## Build

+ 7 - 1
README.md

@@ -1,5 +1,7 @@
 # ijkplayer
 
+[![pub package](https://img.shields.io/pub/v/flutter_ijkplayer.svg)](https://pub.dartlang.org/packages/flutter_ijkplayer)
+
 ijkplayer,通过纹理的方式接入 bilibili/ijkplayer
 
 使用前请完整阅读本 README 并参阅 example/lib/main.dart
@@ -19,11 +21,15 @@ https://github.com/CaiJingLong/flutter_ijkplayer/blob/master/README-EN.md
 
 ## Install
 
+[![pub package](https://img.shields.io/pub/v/flutter_ijkplayer.svg)](https://pub.dartlang.org/packages/flutter_ijkplayer)
+
+最新版本查看pub
+
 pubspec.yaml
 
 ```yaml
 dependencies:
-  flutter_ijkplayer: ^0.1.1
+  flutter_ijkplayer: ${lastes_version}
 ```
 
 ## Build

+ 1 - 1
android/src/main/java/top/kikt/ijkplayer/NotifyChannel.kt

@@ -24,7 +24,7 @@ class NotifyChannel(val registry: PluginRegistry.Registrar, val textureId: Long,
         }
         player.setOnCompletionListener {
             logi("completion $info")
-            channel.invokeMethod("completion", info)
+            channel.invokeMethod("finish", info)
         }
         player.setOnBufferingUpdateListener { mp, percent ->
             /// 在线视频缓冲

+ 1 - 1
example/pubspec.lock

@@ -47,7 +47,7 @@ packages:
       path: ".."
       relative: true
     source: path
-    version: "0.1.0"
+    version: "0.1.2"
   flutter_test:
     dependency: "direct dev"
     description: flutter

+ 9 - 1
ios/Classes/CoolFlutterIJK.m

@@ -123,14 +123,23 @@
 
 - (void)play {
     [controller play];
+    if (displayLink) {
+        displayLink.paused = NO;
+    }
 }
 
 - (void)pause {
     [controller pause];
+    if (displayLink) {
+        displayLink.paused = YES;
+    }
 }
 
 - (void)stop {
     [controller stop];
+    if (displayLink) {
+        displayLink.paused = NO;
+    }
 }
 
 - (void)setDataSourceWithController:(IJKFFMoviePlayerController *)ctl {
@@ -233,7 +242,6 @@
 }
 
 
-
 - (NSUInteger)degreeFromVideoFileWithURL:(NSURL *)url {
     NSUInteger mDegree = 0;
 

+ 1 - 0
lib/src/ijk_event_channel.dart

@@ -60,6 +60,7 @@ class IJKEventChannel {
 
   void onPlayFinish(VideoInfo info) {
     controller.isPlaying = info.isPlaying;
+    controller.pause();
   }
 
   void onPlayStateChange(VideoInfo info) {

+ 1 - 1
pubspec.yaml

@@ -1,6 +1,6 @@
 name: flutter_ijkplayer
 description: Flutter version of bilibilibili ijkplayer, supports common playback protocols, easy to use.
-version: 0.1.1
+version: 0.1.2
 author: caijinglong<cjl_spy@163.com>
 homepage: https://github.com/CaiJingLong/flutter_ijkplayer