Quantcast
Channel: openFrameworks - Latest posts
Viewing all articles
Browse latest Browse all 40524

ofxiOSVideoPlayer delay on looping

$
0
0

Still no solution,
I have to hide the delay by drawing the last image until first image get ready. But I can feel a 0.5sec delay each time video is looping.

I found some hacks on Web to have seamless loops, but I was not able to succeed with them
I tried http://devsolvd.com/questions/looping-a-video-with-avfoundation-avplayer
For instance something like (written in swift here on this page)

avPlayer.actionAtItemEnd = AVPlayerActionAtItemEndNone

NSNotificationCenter.defaultCenter().addObserver(self, 
                                             selector: "playerItemDidReachEnd:", 
                                             name: AVPlayerItemDidPlayToEndTimeNotification, 
                                             object: avPlayer.currentItem)

func playerItemDidReachEnd(notification: NSNotification) {
let p: AVPlayerItem = notification.object as! AVPlayerItem
p.seekToTime(kCMTimeZero)
}

I'm still looking for a solution for seamless video loops on iOS


Viewing all articles
Browse latest Browse all 40524

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>