Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change the time of a video when moving the mouse?

I stumbled across this WoW website and, inspecting some elements, discovered that the "spinning characters" are WebM / MP4 videos. Go to the Characters section, pick a character, and press this button. This will load up a video of them spinning.

These videos can rewind and fast-forward depending on the direction you drag your cursor (Left = reverse, Right = fast-forward).

My question is simple, what function does that? Is it JavaScript?

Thanks in advance.

like image 671
Admin Voter Avatar asked Dec 05 '25 02:12

Admin Voter


1 Answers

It's JavaScript, and this is the code they are using:

//this is for video on stage
CharacterSelect.ui.modelVideo = ModelVideo.build($(".model-video"));

//and this is when the page is ready
$(document).ready(function() {
if (ModelVideo.supportsVideo && !$('html').hasClass('ie')) {
  var modelVideo = videoController.create(".model-video");
}
});
like image 89
Asher Avatar answered Dec 06 '25 17:12

Asher



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!