Pod Play video not play
late final controller = PodPlayerController( playVideoFrom: PlayVideoFrom.vimeo(widget.video.url), podPlayerConfig: const PodPlayerConfig(autoPlay: false), );
I am using this code for podplayer video. This video url work in browser but inside application not play and so an error: "this.playVideoFrom Instance of 'PlayVideoFrom'" & "VIMEO API ERROR: FormatException: Unexpected character (at character 1)"
Write the code by following way:
1.late PodPlayerController controller;
2. controller = PodPlayerController( playVideoFrom: PlayVideoFrom.vimeo(widget.video.url), podPlayerConfig: const PodPlayerConfig(autoPlay: false), )..initialise()
late PodPlayerController controller;
@override void initState() { super.initState();
controller = PodPlayerController(
playVideoFrom: PlayVideoFrom.vimeo(widget.video.url),
podPlayerConfig: const PodPlayerConfig(autoPlay: false),
)..initialise();
String videoUrl = widget.video.url;
print("videoUrl ${videoUrl}");
}
here still getting an error and not play a video: FormatException: Unexpected character (at character 1) ===== VIMEO API ERROR: FormatException: Unexpected character (at character 1)
Same error, how to fix it?
For vimeo you only have to set the video_id in the source (not the full URL).
Ref:
Play vimeo videos (using video ID [with ou without hash]) Play vimeo private videos (using video ID [with ou without hash], access token)
https://github.com/newtaDev/pod_player#features