Note! the problem occured on iOS devices like the iPad
How can I load youtube videos using the Youtube Player API and disable autoplay?
and also be able to stop the video
Problems:
loadVideoById the video starts rights away.
cueVideoById the video load but does not show the thumbnail
Example code;
http://dl.dropbox.com/u/13780885/loadvideobyid/autoplay.html
Youtube Player API documentation:
https://developers.google.com/youtube/iframe_api_reference
Related
I would like to play youtube videos in an IOS app using youtube API. Can a video's uploader block the video from being played in an IOS app?
Yes, youtube video can be blocked from being played in IOS apps at the discretion of the content uploader.
https://youtube-eng.googleblog.com/2011/12/understanding-playback-restrictions_28.html
Is there a way to get the youtube video without the youtube player? The youtube player sdk - https://developers.google.com/youtube/android/player/
uses the existing youtube player, I need the url that it uses to play the video, so that I can use my custom video player. More of using youtube as a hosting service, where I can pull the videos from the server from which youtube player pulls it. Don't know if it is possible or legal.
I have read this document on how to play youtube video in iOS app. But for some video I am getting error "Restricted Video.
This app is playing restricted video also.'Musify Video Tube For YouTube - Free Music Player and Streamer'
Which player or SDK or api to play restricted video?
Finally got solution with this https://github.com/0xced/XCDYouTubeKit.
*Yes its against terms and condition of youtube.
I've successfully streamed normal YouTube videos on iOS using the iOS YouTube helper, but live stream does not seem to work.
I am not sure whether live streaming is even supported, but I could not find it in their docs.
Any idea how to make it work on iOS (without breaching ToS)?
The playback of YouTube Live Events is supported by the YTPlayerView iOS helper classes. The player will treat the Live Event video just like a regular YouTube video (as the iFrame player should), and your video should play back no problem with the "Live Broadcast" message replacing the scrubber of the player like so:
The only difference I have noticed is that the video will return an "auto" quality value. I have submitted a patch to handle this case which has been merged in to the official repo here.
In my app I have played a youtube video by embedding it, but how can i only play the audio of the video? I tried using AVAudioPlayer and use the videos url as the file path but it didnt work, any help?
No it is not possible, only one workaround is just to use a hidden UIWebView and play in that.
Youtube forbids playing audio only! here is the message from youtube
Your API Client will not, and You will not encourage or create functionality for Your users or other third parties to: "separate, isolate, or modify the audio or video components of any YouTube audiovisual content made available through the YouTube API"
-Kuan Yong, YouTube API Team