Latest web development tutorials
 

Video mediaGroup Property

< Video Object

Example

Set the media group for 2 videos:

var x = document.getElementById("myVideo1");
var y = document.getElementById("myVideo2");
x.mediaGroup = "test";
y.mediaGroup = "test";
Try it Yourself »

Definition and Usage

The mediaGroup property sets or returns the name of the media group the video is a part of.

A media group allow 2 or more <video> elements to be kept synchronized.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The mediaGroup property is supported in all major browser.


Syntax

Return the mediaGroup property:

videoObject.mediaGroup

Set the mediaGroup property:

videoObject.mediaGroup=group

Property Values

Value Description
group Specifies the media group of the video

Technical Details

Return Value: A String, representing the media group of the video

< Video Object