Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
istiaksaif opened this issue Aug 13, 2024 · 0 comments
Open

Comments

@istiaksaif
Copy link

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 istiaksaif changed the title Thread block(app isn't responding) after dispose the player screen. case initialize m3u8 url on that occasion ANR (Application Not Responding) blocking operations on the main thread Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant