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

HTML DOM Video mediaGroup Property

Video mediaGroup property

Video Object Reference The Video object

Example

Set a media group for two videos:

var x = document.getElementById("myVideo1");

var y = document.getElementById("myVideo2");

x.mediaGroup = "test";

y.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 stay in sync.


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the mediaGroup property


Syntax

Return the mediaGroup attribute:

videoObject

.mediaGroup

Set the mediaGroup attribute:

videoObject

.mediaGroup=

group

Attribute values

Value Description
group Describes the media group of the video.

Technical Details

Return Value: A string representing the media group of the video.

Video Object Reference The Video object