Marcus Vinícius
Marcus Vinícius

Reputation: 11

Flutter isn't playing video on release mode

I'm using the video_player package in Flutter to play some videos from a API. When i run the app on debug mode, it works just fine, but when i try it out in release mode, (since i neeed to generate an apk for other peoples to try it out, so i also test the app in release mode) the video simply doesn't play. The terminal throws an error that is:

E/flutter (19035): [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: PlatformException(VideoError, Video player had error c.b.a.a.j0: Source error, null, null)

The problem is, i search this error on google and it simply says that it didn't find any article on the web to help me out. Please, can someone help me? I really need this to work just fine.

Upvotes: 1

Views: 1546

Answers (2)

Chirag Mevada
Chirag Mevada

Reputation: 317

I am also getting the same error, and found that video_player plugin need HTTPS URLs to play video in release version and i am using HTTP URL. HTTP URL will only work in debug mode and will not work in release mode

Upvotes: 1

harwinder97
harwinder97

Reputation: 39

check if you have added internet permission inside manifest file of android and make sure the url starts with https than http when running in release mode .

Upvotes: 1

Related Questions