I'm developing my youtube app on iOS and using AVPlayer to play video. But I don't know why my player can't play the Vevo video. Any idea for my problem? Thanks a lot.
You should use the iOS Youtube Helper library for playing youtube videos.
https://developers.google.com/youtube/v3/guides/ios_youtube_helper
I don't know if you can use the AVPlayer. I've seen some examples using MPMoviePlayerController on CocoaControls, like this one: https://www.cocoacontrols.com/controls/hcyoutubeparser or this one: https://www.cocoacontrols.com/controls/xcdyoutubevideoplayerviewcontroller
But I don't think using youtube's url directly in your player fits the ToS of the platform. So I will recommend you tu use the Youtube Helper Library if you are planning to publish your app.
Related
I wonder if it is at all possible to play Vimeo and YouTube via the React Native component react-native-video. My research so far points to this being virtually impossible, because react-native-video needs a direct reference to a file (or a stream?) and these references are hard/difficult to obtain for YouTube and Vimeo?
Is there any way to get react-native-video working with Vimeo & YouTube?
react-native-video will work with Vimeo, if you subscribe to Vimeo Pro.
Vimeo Pro offers the ability to use your video own third party player, which lets you get the url for your video in 360p, 540p, 720p, or 1080p specifically or as an HTTP Live Streaming url which can choose the correct resolution/bitrate for the user's connection. react-native-video work with any of these formats!
I know a github project which is a Youtube component for react-native. Check it out, maybe it can help you ;)
Here you have an other project for Vimeo videos
We are able to play youtube videos by fetching the data using Youtube API for iOS Application. We would like to play a set of videos continuously like a playlist. Can someone guide us through this issue. we tried using different players but none of them are working for youtube links. we have used MPMoviePlayerViewController but it doesn't play videos continuously, and AVQueuePlayer we were able to play MP4 videos stored in the app but unable to play youtube links.
It would be a great help if someone can help us
Thanks in advance.
I am developing a video application which contains a lot of video from different sources. One of the options in the application has to be to play videos through airplay on a TV.
For displaying YouTube video in my application I am using YTPlayerView, which is an objective-C helper for the YouTube API.
My question is: is there an option or param I can pass so the YouTube video can also be played through Airplay? I couldn't find anything useful on Internet.
In - (BOOL)loadWithPlayerParams:(NSDictionary *)additionalPlayerParams in YTPlayerView.m (line 617), add:
self.webView.mediaPlaybackAllowsAirPlay = YES;
right before you return YES.
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
I want to play video in streaming by using iOS GoogleDrive SDK.
GoogleDrive App in iOS app store can play video in streaming by YouTube.
I have seen this post:
http://apiblog.youtube.com/2009/02/youtube-apis-iphone-cool-mobile-apps.html
According to the post, the key of play video is the YouTube source link.
The link lists GoogleDrive's all of file properties:
https://developers.google.com/drive/v2/reference/files
All file's properties were tried to instead of the YouTube source link, but that doesn't work.
Could anyone tell me how to get the correct link to play video by YouTube?
Thank you very much.
You can the URL in the embedLink field to get a streaming player for the video.