Question

i have videos/Audios on the Server, i want to show to user like Its Live Streaming.Like if the video time is 5pm to 7pm and if the user opens at 6pm then it should show video from the 6pm and it should not show user control for reverse and forward video/audio

Was it helpful?

Solution

Connect your video's with the appropriate metadata (store the air-times somewhere). Let's call that air-time [Ta]. Once a user opens a video, check the local device time [Td].

Now seek the video towards Td - Ta as that is the offset of the pseudo realtime within that video.

You will certainly have to do some extra check on videos that have expired etc.

For your second question; removing parts of the MPMoviePlayerController's controls isn't allowed. So you could implement your own UI and deactivate the default one or you could go ahead and use AVPlayer right away as you will have to implement your UI anyways. I'ld recommend using AVPlayer in this case.

OTHER TIPS

We have to encode our live streaming into HLS formate such as .m3u8,mp4 and any other HLS support formate in iOS.Apple did't approve live streaming without HLS formate.you can use wowza media server to encode your server url to HLS formate for support in iOS and then you can play it through MPMoviePlayerController in iOS.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top