pod_player icon indicating copy to clipboard operation
pod_player copied to clipboard

Error YOUTUBE API ERROR: YoutubeExplodeException: Video XXXXX returned 403 (stream: 137 ==========

Open aycanozarpaci opened this issue 1 year ago • 26 comments

Version : pod_player: ^0.2.2

Normally it was fine, but today again the video player won't run videos

Error : I/flutter ( 4740): ===== YOUTUBE API ERROR: YoutubeExplodeException: Video XXXXX returned 403 (stream: 137 ==========

aycanozarpaci avatar Oct 09 '24 09:10 aycanozarpaci

Edit the pubspec.yaml

dependency_overrides:
     youtube_explode_dart: ^2.2.3

rsozdance avatar Oct 09 '24 09:10 rsozdance

Edit the pubspec.yaml

dependency_overrides:
     youtube_explode_dart: ^2.2.3

First of all, thank you for your response, after adding this dependency, the error turned to this, what should I do for this?

E/flutter ( 3636): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Exception: videoQuality cannot be empty
E/flutter ( 3636): #0      PodPlayerController._checkAndWaitTillInitialized (package:pod_player/src/controllers/pod_player_controller.dart:73:9)
E/flutter ( 3636): #1      PodPlayerController._checkAndWaitTillInitialized (package:pod_player/src/controllers/pod_player_controller.dart:82:11)
E/flutter ( 3636): <asynchronous suspension>
E/flutter ( 3636): #2      PodPlayerController._checkAndWaitTillInitialized (package:pod_player/src/controllers/pod_player_controller.dart:82:5)
E/flutter ( 3636): <asynchronous suspension>
E/flutter ( 3636): #3      PodPlayerController.initialise (package:pod_player/src/controllers/pod_player_controller.dart:61:5)
E/flutter ( 3636): <asynchronous suspension>
E/flutter ( 3636): 

aycanozarpaci avatar Oct 09 '24 10:10 aycanozarpaci

Yes unfortunately, the new youtube_explode_dart: ^2.2.3 updated the VideoController.iosClient https://github.com/Hexer10/youtube_explode_dart/commit/41e4475dbfa8a94c3494b3da18df7442da3a952b

which i think made a problem in pod_player. i am looking for a solution now.

rsozdance avatar Oct 09 '24 10:10 rsozdance

@rsozdance Great

alfayedoficial avatar Oct 09 '24 10:10 alfayedoficial

brothers

Error : I/flutter ( 4740): ===== YOUTUBE API ERROR: YoutubeExplodeException: Video XXXXX returned 403 (stream: 137 ==========

in Version : pod_player: ^0.2.2

mkamel44 avatar Oct 09 '24 11:10 mkamel44

brothers

Error : I/flutter ( 4740): ===== YOUTUBE API ERROR: YoutubeExplodeException: Video XXXXX returned 403 (stream: 137 ==========

in Version : pod_player: ^0.2.2

We had the same problem, I added the following library(https://pub.dev/packages/youtube_explode_dart ) with the suggestion @rsozdance and this time it gives a different problem. The developer last updated 6 months ago. He's probably going through a busy period and won't be developing. I talked to my own dev team and we will switch to a different library, I tested it and there is no problem with it.

aycanozarpaci avatar Oct 09 '24 11:10 aycanozarpaci

brothers Error : I/flutter ( 4740): ===== YOUTUBE API ERROR: YoutubeExplodeException: Video XXXXX returned 403 (stream: 137 ========== in Version : pod_player: ^0.2.2

We had the same problem, I added the following library(https://pub.dev/packages/youtube_explode_dart ) with the suggestion @rsozdance and this time it gives a different problem. The developer last updated 6 months ago. He's probably going through a busy period and won't be developing. I talked to my own dev team and we will switch to a different library, I tested it and there is no problem with it.

Which library are you guying switching to?

rsozdance avatar Oct 09 '24 11:10 rsozdance

yes what library brother?

brothers Error : I/flutter ( 4740): ===== YOUTUBE API ERROR: YoutubeExplodeException: Video XXXXX returned 403 (stream: 137 ========== in Version : pod_player: ^0.2.2

We had the same problem, I added the following library(https://pub.dev/packages/youtube_explode_dart ) with the suggestion @rsozdance and this time it gives a different problem. The developer last updated 6 months ago. He's probably going through a busy period and won't be developing. I talked to my own dev team and we will switch to a different library, I tested it and there is no problem with it.

mkamel44 avatar Oct 09 '24 11:10 mkamel44

brothers Error : I/flutter ( 4740): ===== YOUTUBE API ERROR: YoutubeExplodeException: Video XXXXX returned 403 (stream: 137 ========== in Version : pod_player: ^0.2.2

We had the same problem, I added the following library(https://pub.dev/packages/youtube_explode_dart ) with the suggestion @rsozdance and this time it gives a different problem. The developer last updated 6 months ago. He's probably going through a busy period and won't be developing. I talked to my own dev team and we will switch to a different library, I tested it and there is no problem with it.

Which library are you guying switching to?

@mkamel44 @rsozdance We tested the youtube_player_flutter Library and did not encounter any problems. In the application we use, videos are usually 2-3 videos, we don't need downloading and similar features, just watching the video is enough for us, and this library seems to meet this. It is an ideal library for us because we do not need different features such as video quality subtitles.

aycanozarpaci avatar Oct 09 '24 11:10 aycanozarpaci

this package youtube_player_flutter the videos header open, IFrame it is not solution for unlisted YouTube videos
any other solution brothers

mkamel44 avatar Oct 09 '24 12:10 mkamel44

I also met this isuue .Any solutions?

pokizaSaparmatova avatar Oct 09 '24 12:10 pokizaSaparmatova

this package youtube_player_flutter the videos header open, IFrame it is not solution for unlisted YouTube videos any other solution brothers

Thank you for your recommendation. @mkamel44

alfayedoficial avatar Oct 09 '24 12:10 alfayedoficial

I have developed a simple youtube player by fixing this youtube explode issue with muxed stream deperication (Not including all featured this player have) you can check it and i am welcoming contributions to make it better.

https://pub.dev/packages/y_player

ijashuzain avatar Oct 09 '24 20:10 ijashuzain

Changed youtube_explode_dart. It's working for me.

`Stream<StreamInfo> _getStreams(VideoId videoId, {required bool fullManifest}) async* { try {

  if (fullManifest) {
    await for (final stream
        in _getStream(videoId, VideoController.androidClient)) {
      yield stream;
    }
  }else{
    // Use await for instead of yield* to catch exceptions
    await for (final stream
    in _getStream(videoId, VideoController.iosClient)) {
      yield stream;
    }
  }
} on VideoUnplayableException catch (e) {
  if (e is VideoRequiresPurchaseException) {
    rethrow;
  }
  yield* _getCipherStream(videoId);
}

} `

How to use final manifest = await yt.videos.streamsClient.getManifest(youtubeIdOrUrl, fullManifest: true);

I have updated my app, you can check it out. WeTube:Video&Music

Purehi avatar Oct 10 '24 08:10 Purehi

@Purehi, can you please provide a complete solution or a pull request? Your comment on how it's related to the pod_player package and where to change is unclear. Thanks

rakib205 avatar Oct 10 '24 08:10 rakib205

yes please provide a complete solution

mkamel44 avatar Oct 10 '24 08:10 mkamel44

@Purehi can you please make a fork with your solution? It would help a lot of people with this issue

Dav418 avatar Oct 10 '24 09:10 Dav418

@Purehi Can you Please share the solution with more details?

Kingofalltimes avatar Oct 10 '24 10:10 Kingofalltimes

@Purehi Can you Please share the solution & Where to change ? Please Provide solution

examvishwa avatar Oct 10 '24 10:10 examvishwa

@examvishwa @rakib205 @rsozdance @rsozdance @ijashuzain @alfayedoficial

Everyone can find and modify it in

youtube_explode_dart > videos > streams > stream_client.dart

Please give my app a five-star rating, thank you.

Android WeTube:Video&Music

Purehi avatar Oct 10 '24 12:10 Purehi

Just Change in Pod player pubspec.yaml following dependency video working properly environment: sdk: ">=3.0.0 <4.0.0" flutter: ">=1.17.0"

dependencies: flutter: sdk: flutter

services

#video_player: ^2.8.5 video_player: ^2.9.2 http: ^1.2.2 get: ^4.6.6 #wakelock_plus: ^1.2.4 wakelock_plus: ^1.2.8 universal_html: ^2.2.4 youtube_explode_dart: ^2.3.0 #youtube_explode_dart: ^2.2.2

else override dependancy

dependency_overrides:

youtube_explode_dart: git: url: https://github.com/Hexer10/youtube_explode_dart

examvishwa avatar Oct 11 '24 02:10 examvishwa

For me it's work, after :

flutter clean flutter pub cache clean flutter pub get

pdechanoz avatar Oct 11 '24 05:10 pdechanoz

And : flutter pub outdated flutter pub upgrade

pdechanoz avatar Oct 11 '24 06:10 pdechanoz

# temporary fix
dependency_overrides:
  youtube_explode_dart: ^2.3.0

rakib205 avatar Oct 11 '24 06:10 rakib205

@rakib205 Thanks, but we need to define it without the '^'. When you include the '^', Flutter overrides to the latest version: ! youtube_explode_dart 2.3.4 (overridden). Without the '^', it results in: ! youtube_explode_dart 2.3.0 (overridden) (2.3.4 available).

# temporary fix
dependency_overrides:
  youtube_explode_dart: 2.3.0

shahmirzali49 avatar Oct 22 '24 12:10 shahmirzali49

@rakib205 Thanks, but we need to define it without the '^'. When you include the '^', Flutter overrides to the latest version: ! youtube_explode_dart 2.3.4 (overridden). Without the '^', it results in: ! youtube_explode_dart 2.3.0 (overridden) (2.3.4 available).

# temporary fix
dependency_overrides:
  youtube_explode_dart: 2.3.0

The solution is work perfectly

sayol avatar Mar 04 '25 19:03 sayol

You could give omni_video_player a try — supports YouTube, Vimeo, and more

leonardmatasel avatar Jul 09 '25 18:07 leonardmatasel