Video load()Method

Video 对象参考手册Video Object

Example

Change the video source and reload the video:

document.getElementById("mp4_src").src = "movie.mp4";
document.getElementById("ogg_src").src = "movie.ogg";
document.getElementById("myVideo").load();

Try it Yourself »

Definition and Usage

The load() method reloads the audio/video element.

The load() method is used to update the audio/video element after changing the source or other settings.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Internet Explorer 9+, Firefox, Opera, Chrome, and Safari 6 browsers support the load() method.

Note:Internet Explorer 8 and earlier IE versions do not support the load() method.


Syntax

videoObject.load()

Parameters

None

Return Value

No return value.


Video 对象参考手册Video Object Other Extensions