Type system of youtube?

Asked

Viewed 45 times

-5

How to make that youtube style system that the video only starts to rotate when the page is focused.

Like, if you open the page in a new tab and do not click on it the page will load but the video will not "rotate", only if I click on the tab it starts to work, how do it ?

  • 1

    window.Focus() https://developer.mozilla.org/en-US/docs/Web/API/Window/focus

1 answer

1


Although the question is a little vague, I recommend using functions JavaScript, as window.focus(), to accomplish the task.

I recommend reading a little about the manipulation of media with Javascript API’s and on GIFT, besides defining exactly what your program will do...

Good studies ;)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.