Currently with version 4 there's no way to reset a player to the initialized state. In version 3 you could simply do the following things and the player would appear as it does immediately post initialization:
However, version 4...breaks all of these things. Rather than get back to the functionality of version 3, there should be a new method, Player#reset, that allows a player to be reset to the original state without calling dispose() and instantiating a new one.
I agree with this, especially as I have implemented a custom playlist to show all the videos uploaded by a particular member of my site. Right now when a user clicks on a new video in the list, I have to dispose of the old player and make a brand new one if I want it to show in its original state. Just setting the src and poster images and showing the big play button is sloppy and does not change the control bar anyhow, something I found out when trying the fiddle I found on the internet to switch sources.
@mmcc @heff , according to the pull request, i write this snippet to reset player when playing ends:
player.on('ended', function() {
player.trigger('loadstart');
});
It's still not working. Is my code right?
All i need is exactly what this issue mentioned at start:
Is there any progress on this after 3 years? How can I reset the player after the playlist ended?
I am also quite curious how to solve this?
Ah, I think it is partly solved in this issue: https://github.com/videojs/video.js/issues/2661#issuecomment-150600956
Most helpful comment
Is there any progress on this after 3 years? How can I reset the player after the playlist ended?