I am interested in using the ExoPlayer for YouTube video playback. I see from the ExoPlayer samples that they play YouTube videos via DASH URLs.
I'm using the Android YouTube API to search for videos, and don't see a means for obtaining a DASH URL for any of the search results. Is someone aware of any samples for integrating the YouTube API (v3) with the ExoPlayer (without using hardcoded video urls), or know of a way to get the information I need from the YouTube API to load the video into the ExoPlayer?
For getting DASH URL, you need to download file: http://www.youtube.com/get_video_info?&video_id=" + videoId(sample "BU2zodCxwwo"). Parse file, get "dashmpd" and use it.
Start url dashmpd, end url first &.
This URL for XML file, where information about the video. This URL little lives and not all videos contain format fmp4. If you use old URL or videos not contain fmp4 format, you take 403 error(Your client does not have permission to get URL). The solution to this problem, I have not found.