pod_player icon indicating copy to clipboard operation
pod_player copied to clipboard

Unhandled Exception: PlatformException(VideoError, Video player had error com.google.android.exoplayer2.ExoPlaybackException: MediaCodecVideoRenderer error, index=0, format=Format(1, null, null, video/avc, avc1.64001F, -1, null, [848, 480, 29.970388], [-1, -1]), format_supported=YES, null, null)

Open DipakSkywave opened this issue 1 year ago • 1 comments

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(VideoError, Video player had error com.google.android.exoplayer2.ExoPlaybackException: MediaCodecVideoRenderer error, index=0, format=Format(1, null, null, video/avc, avc1.64001F, -1, null, [848, 480, 29.971603], [-1, -1]), format_supported=YES, null, null)

@Shahed-Atik @newtaDev @duongtuancanhktpm @harshd110

It seems to happen after I call playerController.changeVideo ~10 time. Please help to check the problem.

Here is my code: PodPlayerController? controller;

void changeVideo(String url) { if (controller != null) { controller!.changeVideo( playVideoFrom: PlayVideoFrom.network(url), playerConfig: PodPlayerConfig(autoPlay: false)); } }

FYI, I have already added android:usesCleartextTraffic="true" in the AndroidManifest.xml file.

image

DipakSkywave avatar Apr 16 '24 14:04 DipakSkywave

Hello @DipakSkywave

I have fixed this error by adding this dispose method in this function. Screenshot 2024-07-25 at 10 48 21 AM

@newtaDev Please add this line in code and push it to the live. So, many users will resolved their errors.

jaimin-kavathia avatar Jul 25 '24 05:07 jaimin-kavathia