I am using YTPlayerView to play a YouTube video on iOS.
However, I get the error message seen below for some videos and am unable to play them on an iPhone.
This video contains content from Panorama. It is restricted from playback on certain sites
What can be the possible issue ?
I got the answer. All i had to do is to enable Allow embedding in Distribution Option in Advance settings of video.
Related
I am very new to xcode but would like to have some guidance on embedding 360 videos into an iOS app.
Bascially, I want to play a 360 degree video in my mobile app. I do not want the video to be opened in Youtube app. I simply want the video to be played on the top half of a page in my own app with a Youtube plugin.
I found this on the Internet: https://developers.google.com/youtube/v3/guides/ios_youtube_helper but I am not sure if the embedded 360 video would work in my app.
Any help would be appreciated.
I think the iOS Youtube Helper that you linked will not help you with your problem. Also it is not stated there that it can support a 360 degree videos.
YouTube 360 embedded video functionality is still not fully there yet. It is assumed by many that this must have been rolled out along with the YouTube user interface update that hit recently.
It is stated in this documentation that as the gyro functionality still isn’t implemented, the YouTube app must still be opened to properly view these 360° videos on a VR headset. Hopefully this will be added soon to YouTube 360 embedded videos. Until then, viewers of 360 Video Directory or Daily Dose 360 column will be able to get an easy quick look at the YouTube 360° videos before deciding whether or not to pull out their VR headset.
I also found out that as of now, 360 videos do not work in a web browser on iOS due to an issue with iOS forcing full screen playback of videos in the browser using Google VR. So maybe they still working on this to work the 360 videos without using the YouTube apps itself.
You can also check the known defects and enhancements to 360 degree video playback on mobile, and full functionality and support for these types of videos on mobile.
I have to play Vimeo videos in my iOS application using a video player. I need to log events like play, pause, seek etc. Its not possible to play using MPMoviePlayerController or AVPlayer as Vimeo videos have flash content. I am able to play using UIWebView. But, it is showing default Vimeo player controls. I need to have my own controls to play, pause etc as I need to log those events.
I have tried for lot of solutions. Nothing worked. If anyone knows how to play Vimeo videos using custom player. Please Let me know.
I am able to find out solution for this problem. I have used YTVimeoExtractor present here.
Its README.md file says following :
YTVimeoExtractor helps you get mp4 urls which can be use in iOS's native player. You can even choose between mobile, standard and high definition quality.
YTVimeoExtractor doesn't use UIWebView which makes it fast and clean.
I have used MKMoivePlayerViewController and its notifications - MPMoviePlayerPlaybackStateDidChangeNotification and ˚ notifications to get stop, pause events.
The only official way to use a player besides the Vimeo player to play Vimeo videos is to use third-party player urls provided to PRO members: https://vimeo.com/s/adg
Is it possible to play YouTube video without leaving app on iOS 7?
I tried LBYouTubeView but it does not work on iOS 7.
To play YouTube video you have to extract the youtube URL from the youtube videoID. there are lots of API available that extract this
XCDYouTubeKit
HCYoutubeParser
Another way to play youtube videos is WebView.
But you should not go for this because using this your application will be rejected.
The best way to play youtube videos is the Webview
I've tried tens of different ways to play a video from YouTube or a server and not have it go into fullscreen. I know it's possible because the YouTube app allows for this to happen but can't seem to figure out how to do it. Please advise!
Check out this answer:
Can I play a youtube video in a UIWebView inline (not fullscreen)?
This solution is iOS 6 & 7 compatible, it involves setting UIWebView's allowsInlinePlayback and setting YouTube's iFrame webkit-playsinline value.
I need to play youtube video in my iOS application and while video is playing I need to add an overlay on video.
1.Now how can i run youtube video in native player?
2.if I play video in UIWebview then how can i detect that video is
playing and how to add overlay on the video?
MPMoviePlayerViewController cannot directly play youtube video urls.You need to extract the url before loading MPMoviePlayerViewController with the url.
you can see a working demo in my github repo:
Try this::
https://github.com/DpzAtMicRO/IOSYoutubePlayer
LBYoutubeExtractor extracts the youtube Url with JSON.
Please do read the README.md before you use this in your application.
Regards
MPMoviePlayerViewController is a good one but last commit is years ago. I found another solution called 'XCDYouTubeKit' which supports iPhone/iPad and iOS7 onwards with full screen YouTube video.
You can access github page at here and fully documented tutorial at here
This is what official developer says in his page:
The only official way of playing a YouTube video inside an app is with a web view and the iframe player API. Unfortunately, this is very slow and quite ugly, so I wrote this player to give users a better viewing experience.