Freeze streaming video after a few seconds

I tried to create a simple app that plays a live stream from a URL.

Everything works fine in the beginning than after a few seconds of video playback, but audio is still playing in the background.

var mediaPlayer: MPMoviePlayerController = MPMoviePlayerController()

var url = "http://keshethlslive-lh.akamaihd.net/i/c2n_1@195269/master.m3u8"

mediaPlayer.contentURL = NSURL(string: url)

mediaPlayer.view.frame = self.view.bounds
self.view.addSubview(mediaPlayer.view)

mediaPlayer.movieSourceType = MPMovieSourceType.Streaming

mediaPlayer.play()

      

+3
ios swift mpmovieplayercontroller


source to share


No one has answered this question yet

Check out similar questions:

85
Playing YouTube videos using MPMoviePlayerController instead of UIWebView
3
video stops after a few seconds while playing video from url using MPMoviePlayerController with error in console
3
Video playback disappears after a few seconds
2
m3u8 audio stream playing in MPMoviePlayerController but not AVPlayer?
1
iOS - MPMoviePlayerViewController not playing streaming url
1
iPhone - Streaming Audio with MPMoviePlayerViewController
1
Streaming Monotouch Video with MPMoviePlayerController
1
Live video playback with 10 seconds pre-buffer
0
MPMoviePlayerController does not finish loading and does not play stream
0
MPMoviePlayerController when in full screen freezes after a few seconds



All Articles
Loading...
X
Show
Funny
Dev
Pics