Giter VIP home page Giter VIP logo

Comments (10)

befovy avatar befovy commented on May 20, 2024

Slider 溢出错误已经在 0.1.1 版本修改。

completed 状态问题,在 bilibili ijkplayer issues 中也有很多相关内容。
如果是出现概率很高的话,可以提供一下视频源地址,我尽量调试一下。

from fijkplayer.

ZeroJian avatar ZeroJian commented on May 20, 2024

Slider 溢出错误已经在 0.1.1 版本修改。

completed 状态问题,在 bilibili ijkplayer issues 中也有很多相关内容。
如果是出现概率很高的话,可以提供一下视频源地址,我尽量调试一下。

地址: https://yanzishan.shuhu-zuida.com/20190828/15170_b9c98296/index.m3u8
不是某个资源的问题, 目前测试 .m3u8 都不会监听到 completed, 不过在播放完毕后主动 reset() sdk 打印是从 completed -> idle

from fijkplayer.

befovy avatar befovy commented on May 20, 2024

@ZeroJian 可以提供一下运行日志吗? 我试了很多次,都次都是到了 completed 状态

from fijkplayer.

ZeroJian avatar ZeroJian commented on May 20, 2024

@ZeroJian 可以提供一下运行日志吗? 我试了很多次,都次都是到了 completed 状态
我目前测试也可以拿到回调, 先观察观察

from fijkplayer.

ZeroJian avatar ZeroJian commented on May 20, 2024

@ZeroJian 可以提供一下运行日志吗? 我试了很多次,都次都是到了 completed 状态

监听到 completed 状态后 await reset(), resetDataSource(url, autoPlayer: true) 会报错

D/IJKMEDIA(12589): FFP_MSG_COMPLETED:
I/flutter (12589): state_change: new: FijkState.completed <= old: FijkState.started
I/flutter (12589): ══╡ EXCEPTION CAUGHT BY FOUNDATION LIBRARY ╞════════════════════════════════════════════════════════
I/flutter (12589): The following NoSuchMethodError was thrown while dispatching notifications for FijkPlayer:
I/flutter (12589): The method 'call' was called on null.
I/flutter (12589): Receiver: null
I/flutter (12589): Tried calling: call(2)
I/flutter (12589):
I/flutter (12589): When the exception was thrown, this was the stack:
I/flutter (12589): #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
I/flutter (12589): #1 AppVideoPlayer.playSession
package:vtape/utils/video_player.dart:51
I/flutter (12589): #2 AppVideoPlayer._playerListener
package:vtape/utils/video_player.dart:106
I/flutter (12589): #3 ChangeNotifier.notifyListeners
package:flutter/…/foundation/change_notifier.dart:206
I/flutter (12589): #4 FijkPlayer._setValue
package:fijkplayer/src/fijkplayer.dart:59
I/flutter (12589): #5 FijkPlayer._eventListener
package:fijkplayer/src/fijkplayer.dart:361
I/flutter (12589): (elided 17 frames from package dart:async)
I/flutter (12589):
I/flutter (12589): The FijkPlayer sending notification was:
I/flutter (12589): Instance of 'FijkPlayer'
I/flutter (12589): ════════════════════════════════════════════════════════════════════════════════════════════════════
I/flutter (12589): prepared: Size(1080.0, 608.0)
D/IJKMEDIA(12589): IjkMediaPlayer_seekTo
D/IJKMEDIA(12589): ijkmp_seek_to(2073000)
D/IJKMEDIA(12589): ijkmp_seek_to(2073000)=0
D/IJKMEDIA(12589): ijkmp_get_msg: FFP_REQ_SEEK
I/flutter (12589): state_change: new: FijkState.paused <= old: FijkState.completed

from fijkplayer.

befovy avatar befovy commented on May 20, 2024

@ZeroJian 你好,是否按照你描述的步骤。

监听到 completed 状态后 await reset(), setDataSource(url, autoPlayer: true)

这样,就很容易出现上述错误 ?
另外,你使用什么版本的 fijkplayer? 如果可以的话,这段监听状态以及重新设置url的代码可否发出来,我尽快修复此问题

from fijkplayer.

ZeroJian avatar ZeroJian commented on May 20, 2024

@ZeroJian 你好,是否按照你描述的步骤。

监听到 completed 状态后 await reset(), setDataSource(url, autoPlayer: true)

这样,就很容易出现上述错误 ?
另外,你使用什么版本的 fijkplayer? 如果可以的话,这段监听状态以及重新设置url的代码可否发出来,我尽快修复此问题

版本是 0.1.1 代码可以看看 https://github.com/ZeroJian/VTAPE/blob/master/lib/utils/video_player.dart 目前这个项目我已经开源

from fijkplayer.

befovy avatar befovy commented on May 20, 2024

@ZeroJian 看你之前粘贴的日志以及崩溃栈,是不是因为你在这一行没有检查 null
https://github.com/ZeroJian/VTAPE/blob/master/lib/utils/video_player.dart#L51

autoNextAction == null 的话就应该是这个错误栈吧

from fijkplayer.

ZeroJian avatar ZeroJian commented on May 20, 2024

@ZeroJian 看你之前粘贴的日志以及崩溃栈,是不是因为你在这一行没有检查 null
https://github.com/ZeroJian/VTAPE/blob/master/lib/utils/video_player.dart#L51

autoNextAction == null 的话就应该是这个错误栈吧

不是 null, 界面还会调用刷新界面 https://github.com/ZeroJian/VTAPE/blob/master/lib/pages/video_detail_page.dart 41行

from fijkplayer.

befovy avatar befovy commented on May 20, 2024

通过这个日志

I/flutter (12589): The following NoSuchMethodError was thrown while dispatching notifications for FijkPlayer:

以及 flutter 源代码

  void notifyListeners() {
    assert(_debugAssertNotDisposed());
    if (_listeners != null) {
      final List<VoidCallback> localListeners = List<VoidCallback>.from(_listeners);
      for (VoidCallback listener in localListeners) {
        try {
          if (_listeners.contains(listener))
            listener();
        } catch (exception, stack) {
          FlutterError.reportError(FlutterErrorDetails(
            exception: exception,
            stack: stack,
            library: 'foundation library',
            context: ErrorDescription('while dispatching notifications for $runtimeType'),
            informationCollector: () sync* {
              yield DiagnosticsProperty<ChangeNotifier>(
                'The $runtimeType sending notification was',
                this,
                style: DiagnosticsTreeStyle.errorProperty,
              );
            },
          ));
        }
      }
    }
  }
}

说明,的确是在 ChangeNotifier 的时候出现了null 指针,所以还是请你仔细检查一下 null 问题。 @ZeroJian
另外 通过 ChangeNotifier.addListener 接口添加的回调函数,需要调用 ChangeNotifier.removeListener 。 所以最好不要用匿名闭包函数。

from fijkplayer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.