MPMoviePlayerController is playing YouTube video?
I found a method to play YouTube video on MPMoviePlayerController. For this simply need a right url. That url may be obtained after playing YouTube video in iframe. My UIWebView uses
<html> <head> </head> <body style="margin:0"> <iframe class="youtube-player" type="text/html" width="280" height="200" src="http://www.youtube.com/embed/VJRKaQ52ImE" frameborder="0"> </iframe> </body>
So after click on play in video rect, we can see msg in console like this:
YT_Player[1520:207] setting movie path: http://v12.lscache4.c.youtube.com/videoplayback?sparams=id%2Cexpire%2Cip%2Cipbits%2Citag%2Cratebypass%2Coc%3AU0hQR1NLVl9FSkNOMF9LRVpB&fexp=913518%2C904531%2C910211&itag=18&ip=0.0.0.0&signature=93772DDEDFE678D8EA1A2E4669B5634BD6D4E81E.58DEF5203DEF07FB75F762D6C9C39536C84DE59C&sver=3&ratebypass=yes&expire=1312308000&key=yt1&ipbits=0&id=54944a690e762261
So here the question is – how get YT_Player object or how to generate “right” url?
- Embedding YouTube videos on
- Youtube video autoplay inside UIWebview
- How do I upload a video to YouTube from within an iOS application?
- iPhone App :How to play Youtube video in app using MPMoviePlayerController
- YouTube videos inside UITableView iPhone App
- Embedded YouTube videos don't play on iPad (iOS 7) while HTML5 search input is visible
2 Solutions Collect From Internet About “MPMoviePlayerController is playing YouTube video?”
There is no official API to get the “right” url, and likely there never will be. See the following link on the bottom.
Note that your method based on UIWebView does not play the movie in MPMoviePlayerController, but rather in a custom class called YTMoviePlayer. You can confirm it by playing a movie and then dumping the subview hierarchy starting at [[UIApplication sharedApplication] keyWindow].
- How do I post a NSNotification when using Grand Central Dispatch?
- Random websites button
- AutoLayout: UIView within UIView has incorrect frame
- Sort NSArray with sortedArrayUsingComparator
- How to get Remote File Last-Modification Date
- Separate Settings in Universal iOS App?
- Center NSTextAttachment image next to single line UILabel
- duplicate symbol linker error due to libWeANDSFLibrary.a(ASIReachability.o)
- How to verify ios In-App Purchase on your server
- My view is displaying y=-20 dispite its frame set to y=0. After rotation it snaps back to y=0
- Getting data from the Info plist
- String comparaison fail
- UICollectionView inside UIScrollView not scrolling
- What is the correct system design when dealing with third party API?
- How to detect from iOS keyboard extension that a textfield is cleared via actions like hitting “Send” in iMessage?