I have an issue (audio issue) playing live streaming video using MPMoviePlayerController for different reason My existing query for that related to VideoCore
[MPMoviePlayerController alloc] initWithContentURL:url]
My question here is, Is there any other approach that we can use for playing live streaming video apart from using MPMoviePlayerController in iOS? Please suggest.
Thank you
Try playing with AVPlayer
Here is the documentation from apple to it.
Here is the example apple provided for it.
Is not as simple as MPMoviePlayerController but it give you more control over it.
Happy coding.
Related
I have to do a Video streaming app (using a remote url) in swift. But there is no any exact video format. Sometimes it can be m3u8 sometimes mp4 etc.. but my video player should support for what ever the format comes from the back end.
Also when the app is in background, the audio should play and when the app comes foreground video should play without any time delay between the vide and the audio.
I want to know whether is it possible to achieve my objectives using AVPlayerViewController or else what is the best player that I can use to achieve my targets. Please help me.
Thanks
AVPlayerViewController supports m3u8 and mp4 both format. For playing video's audio you need some extra configuration. You can check from here...
How do I get my AVPlayer to play while app is in background?
Is it possible to play video using Avplayer in Background?
So according to me AVPlayerViewController is best option for your requirement.
I am developing an iOS app which require to play audio from soundcloud. I can successfully play audio using AVPlayer with live audio stream.
Now, I want to set equalizer for AVPlayer so, user can manage output sound for this.
I search for this but all documents are so complicated.
So, can anyone please guide me regarding this? So, I can set equalizer effect for this. Thanks in advance.
i think AVPlayer is not support for Equalizer Effect, for this you need to apply bands for all audio units but by using STKAudioPlayer u can achieve it easily. refer following link it will help you.
https://github.com/tumtumtum/StreamingKit
Does iOS MPMoviePlayer or AVPlayer supports "adaptive bit rate" in live streaming ?
The short answer is yes. Put your alternate streams inside a master playlist then set the video source of the player to the URL of this file. The adaptive part is done automatically.
My app has a UIWebView that plays specific youtube content within the app. Some of these videos can be lengthy and are more audio centric (e.g. lectures and/or music). I'd like users of the app to be able to leave the app but have the audio of the youtube video continue to play, without the need for hitting a resume or play button. How can this be done? I'm willing to abandon the UIWebView if there is a better alternative.
Thank You.
I work on the same troube. The problem come from the mpmovieplayer which play the movie in ios.
An article of Matt Gallagher said:
"This pause is sent from the CALayer displaying the video frames. This is a private class for an MPMoviePlayerController and is your own AVPlayerLayer for an AVPlayer."
source - http://www.cocoawithlove.com/2011/04/background-audio-through-ios-movie.html
This article is very old (2011), but maybe the problem is similar.
Good luck
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.