Skip to content
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

Looping does not respect start and end time #35

Open
lehelmedves opened this issue Oct 29, 2018 · 4 comments
Open

Looping does not respect start and end time #35

lehelmedves opened this issue Oct 29, 2018 · 4 comments
Labels

Comments

@lehelmedves
Copy link

If I play a video with a set startTime, endTime and looping enabled, the startTime and endTime is respected the first time, but when the video is played for the second time (looping engaged), it starts from 0.0 and plays to the end of the video. Is this an issue in the library or within the Youtube JS API?

@wdcurry
Copy link

wdcurry commented Jan 8, 2019

I am noting it respects the end timestamp but not the start. It fires off here in YTSwiftyPlayer line288:
case .onStateChange: updateState(message.body as? Int) let isLoop = playerVars["loop"] as? String == "1" if playerState == .ended && isLoop { playVideo() } delegate?.player(self, didChangeState: playerState)

@rinov
Copy link
Owner

rinov commented Jan 8, 2019

@lehelmedves Thank you for your report. I think this is a bug on YoutubeKit, So i'll check and fix it on next release.

@rinov rinov added the bug label Jan 8, 2019
@wdcurry
Copy link

wdcurry commented Jan 8, 2019

Thank you. If you could post an idea of the fix, we can implement it on our side as well. I will check it out myself as time permits but of course with any new repo, it can take time to walk new code ;)

@wdcurry
Copy link

wdcurry commented Jan 8, 2019

Looping also manifests an oddness if .playsInline(false) is set. A more zoomed view seems to present.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants