-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Timer is running without sync with video duration and image #3
Comments
I have the same issue. Please provide a solution if available. |
Hi, i also have the same issue. I tried like below for images.
Before downloading image i am pausing the SegmentedProgressBar and after getting image again i am changing isPaused value to false. this is working only for first story. if we have multiple stories below code executing after changing self.SPB.isPaused = true. private func animate(animationIndex: Int = 0) {
Any useful reply will be appreciated. ^_^ |
Hi, private func animate(animationIndex: Int = 0) {
and for SegmentedProgressBar synchronization with video duration firstly i declared below three things globally. var playerItem: AVPlayerItem! After that in play video or show image function i added some code like below.
} When you associate a player item with AVPlayer, it immediately begins enqueuing the item’s media and preparing it for playback. The player item becomes ready for use when the status value changes to AVPlayerItem.Status.readyToPlay. override func observeValue(forKeyPath keyPath: String?,
The above method is invoked whenever the status value changes, giving you the chance to take some action: |
Hi, i have one issue regarding stories skipping. i need do exactly like whatsapp. For example if there are five stories, one user saw 3 stories out of five and close that screen. when the user reopen the same stories of that particular person i have to show image or play video from 4 th position of that stories. if Any body have idea kindly help me to fix this issue. |
Did you found any solution on this @praveen4D2 ?? |
in playVideoOrLoadImage function stop SPB and resume after Load video or image: //add this code override func viewDidLoad() { @objc func playerItemDidReadyToPlay(notification: Notification) { |
Timer is running without sync with video duration and image. If an image or video still under downloading from the network, the top status is running and moved to next image or video.
please help me in this.
The text was updated successfully, but these errors were encountered: