Video play() method
Definition and usage
play()
method to start playing the current video.
Tip:This method is usually used with pause() method used together.
Tip:Please use controls attribute Display video controls (such as play, pause, search, volume, etc.).
Example
Video with play and pause buttons:
var x = document.getElementById("myVideo"); function playVid() { x.play(); } function pauseVid() { x.pause(); }
Syntaksi
videoObject.play()
Parametrit
Ei.
Palaute
Ei paluuarvoa.
Selaimen tuki
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Tuki | 9.0 | Tuki | Tuki | Tuki |