flutter_vlc_player icon indicating copy to clipboard operation
flutter_vlc_player copied to clipboard

ANR (Application Not Responding) blocking operations on the main thread

Open istiaksaif opened this issue 1 year ago • 2 comments

url is m3u8 type

Initialisation:

The platform view is hosted successfully (Hosting view in view hierarchy for platform view: 2). VLC library detects the video format (libvlc demux: Changing stream format Unknown -> TS). Audio information is extracted (libvlc packetizer: AAC channels: 2 samplerate: 48000).

when dispose of thread block and application UI stop/freeze to use. if multiple requests for use, the app isn't responding, and a message showing. But mp4 URL no issue faced

@override void initState() { super.initState(); log('------------------- ${widget.link}'); _videoPlayerController = VlcPlayerController.network( widget.link, hwAcc: HwAcc.full, autoPlay: true, options: VlcPlayerOptions(), ); }

@override void dispose() { super.dispose(); WidgetsBinding.instance.addPostFrameCallback((_) async { await _videoPlayerController.stop(); await _disposeAsync(); }); }

Future _disposeAsync() async { try { if (_videoPlayerController.value.isInitialized) { await _videoPlayerController.stopRendererScanning(); await _videoPlayerController.dispose(); } } catch (e) { // Handle errors } }

istiaksaif avatar Aug 13 '24 17:08 istiaksaif

any news?

Gabriellsp avatar Jul 22 '25 17:07 Gabriellsp

W/MIUIScout App(10576): Enter APP_SCOUT_WARNING State W/MIUIScout App(10576): Event:APP_SCOUT_WARNING Thread:main backtrace: W/MIUIScout App(10576): at org.videolan.libvlc.MediaPlayer.nativeStop(Native Method) W/MIUIScout App(10576): at org.videolan.libvlc.MediaPlayer.stop(MediaPlayer.java:834) W/MIUIScout App(10576): at software.solid.fluttervlcplayer.FlutterVlcPlayer.dispose(FlutterVlcPlayer.java:72) W/MIUIScout App(10576): at io.flutter.plugin.platform.PlatformViewsController$1.dispose(PlatformViewsController.java:254) W/MIUIScout App(10576): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.dispose(PlatformViewsChannel.java:150) W/MIUIScout App(10576): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:58) W/MIUIScout App(10576): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:267) W/MIUIScout App(10576): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:292) W/MIUIScout App(10576): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319) W/MIUIScout App(10576): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12) W/MIUIScout App(10576): at android.os.Handler.handleCallback(Handler.java:938) W/MIUIScout App(10576): at android.os.Handler.dispatchMessage(Handler.java:99) W/MIUIScout App(10576): at android.os.Looper.loopOnce(Looper.java:210) W/MIUIScout App(10576): at android.os.Looper.loop(Looper.java:299) W/MIUIScout App(10576): at android.app.ActivityThread.main(ActivityThread.java:8118) W/MIUIScout App(10576): at java.lang.reflect.Method.invoke(Native Method) W/MIUIScout App(10576): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:556) W/MIUIScout App(10576): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1045)

hezhipengzipp avatar Aug 27 '25 06:08 hezhipengzipp