Video mediaGroupProperty

Video 对象参考手册Video Object

Examples

Set the media group for two 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 that the audio/video belongs to.

Media grouping allows two or more audio/video elements to stay synchronized.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the mediaGroup property


Syntax

Return the mediaGroup property:

videoObject.mediaGroup

Set the mediaGroup property:

videoObject.mediaGroup=group

Property 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 对象参考手册Video Object Other Extensions