Closed keikari closed 9 months ago
I'm not quite sure what the lint wants. The error doesn't seem to be related to my changes?
I think adding the off
definition to the Player
type should fix all the lint issues
Edit: Update the second parameter to optional. https://docs.videojs.com/player#off It's somewhat a valid complaint -- not providing the second parameter removes all registered handlers. That may or may not be what we want at times, but seems fine for this case.
Fixes
Issue Number: #2895
New behavior: -queue pauses playing on end of the last video -the second item from the queue doesn't start playing in middle of other playlists
Seems that a second
onVideoEnded
function gets attached to the player, when a second queue item is added. (Doesn't happen with following video adds)And one of those sticked around, and got called when not wanted. (I didn't quite understood how this exactly worked.)
Clearing
onEnded
s before adding a new one, seems to fix the behavior. Also clearing them didn't seem to break anything. Looping and shuffle also kept working the same than before.