videos play when hoovering

alt=
MONEE
@monee
2 weeks ago
65 posts
can you set videos to play when hoovering?
michael
@michael
2 weeks ago
7,740 posts
You used to be able to, but I think its being blocked by browsers now. Using the 'Follow Me' skin I turned on a setting built into the skin "Auto Play" and it looks like it tries to do something when I scroll the timeline but none of them actually play.

I suspect you probably could get it to work using
onmouseover=""
in combination with a javascript function to start the player.

I suspect that might not work across all browsers.

As to they why: I remember a few years ago when I would ctrl+click to open many new tabs and if a couple had auto play on I'd get a ton of noise and not know where it was coming from. Thats probably related to the reason the browser blocks it.
auto.jpg
auto.jpg  •  295KB

alt=
MONEE
@monee
2 weeks ago
65 posts
I believe the mouse over option is what I'm looking for. I only want the video to play when hoovering like preview before you click on the video to watch. This is in list of videos not timeline
michael
@michael
2 weeks ago
7,740 posts
In which case the general concept would be to put those on the surrounding DIV that houses the player. You may need some sort of id for the player.

Depending on which player you're using how to do it will be different. You'll need to find a way to communicate with the player.

I'd expect that the player is defined on a javascript variable probably. Probably something like
 video_player_h2xkeYNr
Some sort of unique identifier.

So on the DIV add
onmouseover="xxYourModule_play_hover_video('video_player_h2xkeYNr')" onmouseout="xxYourModule_stop_hover_video()"

Then your functions in your .js file would be
function xxYourModule_play_hover_video(id){
  id.play();
}

function xxYourModule_stop_hover_video(){
  StopAllPlayers();
}


That's psudo code but hopefully gives you a point in the right direction.
alt=
MONEE
@monee
one week ago
65 posts
I',m using the VideoPro2 video player. I think I found the code I need. I just have to make it work