Almog
Almog

Reputation: 108

How to play YouTube Live on ExoPlayer

I'm trying to play YouTube Live with ExoPlayer on Android device.

I know that ExoPlayer can play YouTube, according to:
1. Karim Abdell Salam's answer:
How to play youtube video in ExoPlayer in Android?
2. Teyam's answer:
Streaming a youtube live video to android app with exoplayer (DASH)

But, when I trying to post http://www.youtube.com/get_video_info?&video_id=[video_id] I'm not getting dashmpd property at the response. Also I tried https://www.youtube.com/get_video_info?&video_id=[video_id]&el=info&ps=default&eurl=&gl=US&hl=en accoording to Karim Abdell Salam comment, and here I'm getting status=fail&errorcode=2&reason=Invalid+parameters.

So how should I play YouTube with ExoPlayer if I can't post get_video_info successfully?

Note: I tried several YouTube videos, both Live and regular.

Upvotes: 1

Views: 3271

Answers (1)

Angad Kalra
Angad Kalra

Reputation: 16

Seems like YouTube has recently made some changes there, so try https://www.youtube.com/get_video_info?&video_id=[video_id]&ps=default&eurl=&gl=US&hl=en i.e. without the el=info parameter which seems to not work anymore. This worked for me (especially for Live videos). This link will help you understand the significance of parameters like el. I am trying to solve a similar issue so if you find any other resources please do share.

Upvotes: 0

Related Questions