Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML Audio/Video DOM load() Method

HTML Audio/Video DOM load() Method

HTML audio/video Tag Reference HTML Audio/Video DOM Reference

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("video1").load();

Try it »


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 support the load() method.

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


Syntax

audio|video

.load()


HTML audio/video Tag Reference HTML Audio/Video DOM Reference