Audio mediaGroupProperty
Examples
Set the media group for two audio segments:
var
x = document.getElementById("myAudio1");
var y = document.getElementById("myAudio2");
x.mediaGroup = "test";
y.mediaGroup = "test";
var y = document.getElementById("myAudio2");
x.mediaGroup = "test";
y.mediaGroup = "test";
Try it Yourself »
Definition and Usage
The mediaGroup property sets or returns the name of the media group to which the audio belongs.
Media grouping allows two or more audio elements to stay synchronized.
Browser Support
![]()
![]()
![]()
![]()
![]()
No mainstream browser currently supports the mediaGroup property.
Syntax
Return the mediaGroup property:
audioObject.mediaGroup
Set the mediaGroup property:
audioObject.mediaGroup=group
Property Values
| Value | Description |
|---|---|
| group | Specifies the media group of the audio. |
Technical Details
| Return value: | A string value representing the audio's media group. |
|---|
Audio Object Other Extensions