Video mediaGroup property
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





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. |
|---|
The Video object