Update player.js reverting #2062, fixes #1342 #1652 #1904 #2389
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
reverting implementation of #2061 , bad idea, YT internally uses same parameter markers so we cant really distinguish between YT resuming and someone opening link with timestamp
this.elements.player.seekTo(0) rewinds, but with side effects of triggering play()
switch from this.elements.player.seekTo(0) to this.elements.video.currentTime = 0 didnt work. YT player actually reads currentTime and will hang while hammering currentTime(whatever) if it doesnt get what it wants :0. Back to seekTo(0) with optional check for paused.
Edit: further testing shows
video wont play at all and console shows
YT knows something is wrong and keeps trying :(
To make forcedPlayVideoFromTheBeginning reliable it would have to either trigger way late causing annoying rewind every time, or finally make autoplayDisable reliably stop without playing a single frame. Second option seems better.