Open mfurkanyuceal opened 5 months ago
I'm having the same problem
flutter: ===== VIMEO API ERROR: FormatException: Unexpected character (at character 1) flutter: <!DOCTYPE html> flutter: ^ flutter: ========== [VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: FormatException: Unexpected character (at character 1) <!DOCTYPE html>
try { final response = await _makeRequestHash(videoId, hash); final jsonData = jsonDecode(response.body)['request']['files']['progressive']; }
here progressive field is null thats why jsonData also null
player is not able to play video anymore
I have had the same problem for several days
see #182 , seems like vimeo closed unofficial /config endpoint for fetching video links
still same got the error
I receive this error
yes the video id is available on vimeo
I am facing the same issue, It was working some days back but suddenly stopped working.
Please let me know if someone has found a fix as my app already in production. Thanks.
I'm also facing the same issue. I played private videos until last Monday. Now it doesn't work for either private or public Vimeo videos...
pod_player: 0.2.2 Flutter 3.19.2 Dart 3.3.0
I am facing the same issue, It was working some days back but suddenly stopped working. Please let me know if someone has found a fix as my app already in production. Thanks.
this was the same issue i was facing. this issue is solved in my git url please remove first pod_player :^0.2.2 add like this in pubspec.yaml :
This doesn't work for me too. I get this error:
Cannot initialize video player: Exception: videoQuality cannot be empty #0
I am facing the same issue, It was working some days back but suddenly stopped working. Please let me know if someone has found a fix as my app already in production. Thanks.
this was the same issue i was facing. this issue is solved in my git url please remove first pod_player :^0.2.2 add like this in pubspec.yaml :
That points to your forked repo of the project, where you have hard-coded a bearer token. This is not a long-term solution.
I'm having the same issue recently. the @anantnimbalkar solution is not working for me either. I'll be looking into this issue to see if someone will find a working solution.
Does anyone found any solution for this issue? as I am fetching the videos and when I try to play video using videoId it gives above mentioned error I dont know what is the issue with this package. Please any help in this regard will be a huge favor.
First you need a personal access token, which you can generate in your app settings. Then fetch the video information using this request:
curl -X GET \
'https://api.vimeo.com/videos/<video-id>?fields=play' \
--header 'Accept: application/vnd.vimeo.*+json;version=3.4' \
--header 'Content-Type: application/json' \
--header 'Authorization: bearer <personal-access-token>'
You can then initialise the PodPlayer like this:
controller = PodPlayerController(
playVideoFrom: PlayVideoFrom.networkQualityUrls(
videoUrls: [
VideoQalityUrls(quality: 360, url: '<the link for 360p>),
],
),
)..initialise()
First you need a personal access token, which you can generate in your app settings. Then fetch the video information using this request:
curl -X GET \ 'https://api.vimeo.com/videos/<video-id>?fields=play' \ --header 'Accept: application/vnd.vimeo.*+json;version=3.4' \ --header 'Content-Type: application/json' \ --header 'Authorization: bearer <personal-access-token>'
You can then initialise the PodPlayer like this:
controller = PodPlayerController( playVideoFrom: PlayVideoFrom.networkQualityUrls( videoUrls: [ VideoQalityUrls(quality: 360, url: '<the link for 360p>), ], ), )..initialise()
Video links generated this way are only valid for 24 hours, so we would need to add requests to retrieve video links inside the app.
I am fetching videos in this function:
Future<List
// Construct the API request URL final String apiUrl = 'https://api.vimeo.com/me/videos?sort=date&direction=asc';
// Set the headers, including the access token final headers = { 'Authorization': 'Bearer $vimeoAccessToken', 'Content-Type': 'application/json', 'Accept': 'application/vnd.vimeo.*+json;version=3.4' };
// Send the HTTP GET request final response = await http.get(Uri.parse(apiUrl), headers: headers);
// Check if the request was successful if (response.statusCode == 200) { // Parse the response body final jsonResponse = jsonDecode(response.body); // Return the list of videos return jsonResponse['data']; } else { // Request failed, handle the error throw Exception('Failed to fetch Vimeo videos: ${response.statusCode}'); } } and after fetching videos I pas video id to podplayer: openVimeoPlayer(video['uri'].split('/').last); can you please tell what things do I need to change?
First you need a personal access token, which you can generate in your app settings. Then fetch the video information using this request:
curl -X GET \ 'https://api.vimeo.com/videos/<video-id>?fields=play' \ --header 'Accept: application/vnd.vimeo.*+json;version=3.4' \ --header 'Content-Type: application/json' \ --header 'Authorization: bearer <personal-access-token>'
You can then initialise the PodPlayer like this:
controller = PodPlayerController( playVideoFrom: PlayVideoFrom.networkQualityUrls( videoUrls: [ VideoQalityUrls(quality: 360, url: '<the link for 360p>), ], ), )..initialise()
Video links generated this way are only valid for 24 hours, so we would need to add requests to retrieve video links inside the app.
@benja8151 Would you suggest any other/better solution?
@benja8151 Would you suggest any other/better solution?
No, at a glance I think this solution should work, but you need to fetch video links (your curl request) on demand inside the app, parse response and add them to videoUrls
as you suggested.
First you need a personal access token, which you can generate in your app settings. Then fetch the video information using this request:
curl -X GET \ 'https://api.vimeo.com/videos/<video-id>?fields=play' \ --header 'Accept: application/vnd.vimeo.*+json;version=3.4' \ --header 'Content-Type: application/json' \ --header 'Authorization: bearer <personal-access-token>'
You can then initialise the PodPlayer like this:
controller = PodPlayerController( playVideoFrom: PlayVideoFrom.networkQualityUrls( videoUrls: [ VideoQalityUrls(quality: 360, url: '<the link for 360p>), ], ), )..initialise()
Why I am just getting status and not other things in API response. ? Any help would be appreciated.
First you need a personal access token, which you can generate in your app settings. Then fetch the video information using this request:
curl -X GET \ 'https://api.vimeo.com/videos/<video-id>?fields=play' \ --header 'Accept: application/vnd.vimeo.*+json;version=3.4' \ --header 'Content-Type: application/json' \ --header 'Authorization: bearer <personal-access-token>'
You can then initialise the PodPlayer like this:
controller = PodPlayerController( playVideoFrom: PlayVideoFrom.networkQualityUrls( videoUrls: [ VideoQalityUrls(quality: 360, url: '<the link for 360p>), ], ), )..initialise()
Why I am just getting status and not other things in API response. ? Any help would be appreciated.
@JAYTARPARA It can depend on the scope of your token. You can also remove the header "field=play" and see how the complete response looks like. And dude do not share your access token here :)
First you need a personal access token, which you can generate in your app settings. Then fetch the video information using this request:
curl -X GET \ 'https://api.vimeo.com/videos/<video-id>?fields=play' \ --header 'Accept: application/vnd.vimeo.*+json;version=3.4' \ --header 'Content-Type: application/json' \ --header 'Authorization: bearer <personal-access-token>'
You can then initialise the PodPlayer like this:
controller = PodPlayerController( playVideoFrom: PlayVideoFrom.networkQualityUrls( videoUrls: [ VideoQalityUrls(quality: 360, url: '<the link for 360p>), ], ), )..initialise()
Why I am just getting status and not other things in API response. ? Any help would be appreciated.
@JAYTARPARA It can depend on the scope of your token. You can also remove the header "field=play" and see how the complete response looks like. And dude do not share your access token here :)
What should be the scope? Can you please let me know. I have removed the screenshot.
First you need a personal access token, which you can generate in your app settings. Then fetch the video information using this request:
curl -X GET \ 'https://api.vimeo.com/videos/<video-id>?fields=play' \ --header 'Accept: application/vnd.vimeo.*+json;version=3.4' \ --header 'Content-Type: application/json' \ --header 'Authorization: bearer <personal-access-token>'
You can then initialise the PodPlayer like this:
controller = PodPlayerController( playVideoFrom: PlayVideoFrom.networkQualityUrls( videoUrls: [ VideoQalityUrls(quality: 360, url: '<the link for 360p>), ], ), )..initialise()
Why I am just getting status and not other things in API response. ? Any help would be appreciated.
@JAYTARPARA It can depend on the scope of your token. You can also remove the header "field=play" and see how the complete response looks like. And dude do not share your access token here :)
What should be the scope? Can you please let me know. I have removed the screenshot.
It depends on your needs. For example, I have these:
hi @JAYTARPARA hi done the same thing but it doesn't working can any tell me correct solution of it
@hgndgn It doesn't work with the same settings.
There is no video link in the response returned.
@mfurkanyuceal My videos are "Unlisted". Maybe therefore it works for me, I could check it later.
@mfurkanyuceal My videos are "Unlisted". Maybe therefore it works for me, I could check it later.
I set it the same way but it didn't work. Could your Vimeo pricing plan be different?
@mfurkanyuceal Yes it could be. I have a "Pro Plan".
@mfurkanyuceal Yes it could be. I have a "Pro Plan".
Thank you. If the payment plan is a plus, we can say that it does not work.
@hgndgn Thanks for the solution. When I join the Pro payment plan, I can get the links of the videos using the vimeo API. I have no problems with Android. However, I encountered the "Error while playing video" error on iOS. Do you have any relevant experience with this error?
podPlayerController = PodPlayerController(
playVideoFrom: PlayVideoFrom.network(
vimeoVideoLink!,
videoPlayerOptions: VideoPlayerOptions(
allowBackgroundPlayback: true,
),
),
podPlayerConfig: const PodPlayerConfig(
autoPlay: false,
isLooping: false,
wakelockEnabled: true,
),
)..initialise();
AspectRatio(
aspectRatio: 16 / 9,
child: PodVideoPlayer(
controller: trainerProfileController.podPlayerController!,
videoAspectRatio: 16 / 9,
),
),
@hgndgn It doesn't work with the same settings.
There is no video link in the response returned.
this is happening to me when Unlisted URL's apart from my Vimeo account. For My account's Unlisted videos getting all Progressive,hls & dash sections
podPlayerController = PodPlayerController( playVideoFrom: PlayVideoFrom.network( vimeoVideoLink!, videoPlayerOptions: VideoPlayerOptions( allowBackgroundPlayback: true, ), ), podPlayerConfig: const PodPlayerConfig( autoPlay: false, isLooping: false, wakelockEnabled: true, ), )..initialise();
I am using this code but not work in android and ios. Is there any solution for vimeo url play a video?
podPlayerController = PodPlayerController( playVideoFrom: PlayVideoFrom.network( vimeoVideoLink!, videoPlayerOptions: VideoPlayerOptions( allowBackgroundPlayback: true, ), ), podPlayerConfig: const PodPlayerConfig( autoPlay: false, isLooping: false, wakelockEnabled: true, ), )..initialise();
I am using this code but not work in android and ios. Is there any solution for vimeo url play a video?
you have to get personal access token from your vimeo developer console to get streaming data according to above discussion.
I have to found this error, so how to resolved :
Initialization error: Exception: videoQuality cannot be empty
Has anyone found a solution for this Vimeo player issue?
I have the same issue, how can there's no solution to play vimeo videos in flutter...
The exact same issue here too
There is a problem with Vimeo videos. Videos cannot be played. Flutter 3.22.2 Dart 3.4.3 pod_player: ^0.2.2