I want to resume video second time from the same time interval from which I left last time. But when I'm opening player for the second time, it either take longer time than the usual or (and mostly) it throws kBCOVPlaybackSessionLifecycleEventError
Not sure what and why it's happening. Following is my pseude code to resume the video.
Can anyone please help on this? In the native docs also, there is not much info is mentioned which can be of help. So do let me know if anyone has input on this one?
Summarising in one line: How can we seek in the start itself when BCOV player loads?
Here is the link for brightcove-ios-native SDK
func seekToTimeWithSeconds(seconds:Double) {
let seekToTime = CMTimeMakeWithSeconds(seconds, preferredTimescale: 60000)
playbackController?.seek(to: seekToTime, completionHandler: { [weak self] (finished: Bool) in
self?.playbackController.play()
})
}
After spending days on this issue figured out the actual problem which was authToken for playing video was getting empty value. Because of which BCOV player was unable to load the player and was throwing kBCOVPlaybackSessionLifecycleEventError
So if anyone is stuck with this you might first wanna check if your player is getting authToken
and videoID
in not nil.
Also before getting to above solution I tried following things. So if above didn’t work for some of you guys you can try with following things which I Tried.
lifecycleEvent
delegate and make sure to terminate it whenever you leaving the view.
Hope this might help someone. Cheers.