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

HTML Audio/Video DOM mediaGroup Property

HTML Audio/Video DOM mediaGroup Property

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

Example

Set a media group for two videos:

myVid1=document.getElementById("video1");

myVid2=document.getElementById("video2");

myVid1.mediaGroup="test";

myVid2.mediaGroup="test";

Try it »


Definition and Usage

The mediaGroup property sets or returns the name of the media group to which the audio/video belongs.

A media group allows two or more audio/video elements to be kept in sync.


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the mediaGroup property.


Syntax

Set the mediaGroup attribute:

audio|video

.mediaGroup="

group

"

Return the mediaGroup attribute:

audio|video

.mediaGroup

Attribute values

Value Description
group Specifies the media group of the audio/video.

Technical Details

Return Value: A string value indicating the media combination of the audio/video.

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