YouTube的视频播放ExoPlayer [英] YouTube video playback with ExoPlayer
问题描述
我感兴趣的使用 ExoPlayer YouTube的视频播放。我从<一见href="https://github.com/google/ExoPlayer/blob/34372deb9a583bd647df7aaa612da18d4947b4f8/demo/src/main/java/com/google/android/exoplayer/demo/Samples.java">ExoPlayer样品的,他们通过DASH网址播放YouTube视频。
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.
我使用了Android的YouTube API来搜索视频,并没有看到获得DASH网址为任何搜索结果的一种手段。是否有人知道任何样品与ExoPlayer整合YouTube的API(V3)的(不使用硬codeD视频的网址),或不知道的方式来获得我需要从YouTube的API的信息来加载视频到ExoPlayer?
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?
推荐答案
您可以看一下在<一个答案href="http://stackoverflow.com/questions/25781427/how-to-play-you-tube-video-in-android-native-application-through-video-view">How在通过视频查看Android原生应用发挥你管的视频? 如果你想嵌入你的应用程序的YouTube视频,你可以使用<一个href="https://developers.google.com/youtube/android/player/reference/com/google/android/youtube/player/YouTubePlayer"相对=nofollow> YouTubePlayer
You can look at the answer in How to play You tube video in android native Application through video view? If you wish to embed youtube video in your app, you can use YouTubePlayer
这篇关于YouTube的视频播放ExoPlayer的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!