-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
About double click on player #8946
Comments
just adding that actually I had to insert this in the data-setup for it to work as writing this after the player won't work. but anyway, this is not the issue for me
|
If you have set up a player with The double-click does not "reset" the player. It calls the browser's fullscreen API, same as a click on the fullscreen button: Lines 2015 to 2062 in 19ca3f2
|
sorry but the players's behavior is different between double clicking to go fullscreen and using the fullscreen button, |
The main difference is that with the Can you elaborate on what you mean by "reset player state"? |
exactly. which is quite what I tried to say with my own words maybe it's not resetting the player state as a whole but it does reset the start time, which make the timer plugin quite useless. |
yes the only way would be to be able to delay the start event on a single click to make a difference with a very quick double click I guess. so the player wouldn't off on |
Description
Hello
I have been using vjs for like 10 years now.
During most of these years, there was no fonction to double click on the player to go full screen so someone helped me out with something like this
<script>var vid1 = videojs('live_player'); vid1.persistvolume({ namespace: "videojs-user-volume" }); vid1.on('dblclick', function() { vid1.requestFullscreen(); }); vid1.on('dblclick', function() { vid1.exitFullscreen(); });
Until very recently I discovered that this feature was now builtin and so the code unnecesarry . Great.
I also have this piece of code
vid1.on("play",function(e){console.log('Hls started!');setTimeout(function() {vid1.pause()}, 7200000); });
When you open a page with a vjs player, the console write "Hls started!" which is the expected behavior.
But it also does the same when you go full screen by double clicking, either using my old way, or the new one builtin in the player.
My point is it seems that double clicking the player reset the player state, like a sort of OFF ON .
You must think, , so what?
Well I m using a nice little plugin, that I actually never deployed because I thought it wasn't working properly. Actually it does but since double clicking reset the player state and the plugin being a timer that display a message to stop the video feed after a while depending on how long the video has been playing makes it unusable
https://github.com/TylerZubke/Videojs-AFK-Monitor
So now I m stuck with this because at the moment, it seems my only option is to disable the double click so the plugin works the way I want to. but I really wouldn't want that as double clicking a screen to go full is just so intuitive and expected behavior.
I do not provide a test page as I don't feel it's necessary, this is more a discussion.
Reduced test case
https://stackoverflow.com/help/minimal-reproducible-example
Steps to reproduce
1.described in the post
2.
3.
Errors
No response
What version of Video.js are you using?
8.20
Video.js plugins used.
afk monitor
What browser(s) including version(s) does this occur with?
all
What OS(es) and version(s) does this occur with?
all
The text was updated successfully, but these errors were encountered: