X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY ANGULAR BOOTSTRAP XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

Audio mediaGroup Property

Audio Object Reference Audio Object

Example

Set the media group for 2 <audio> elements:

var x = document.getElementById("myAudio1");
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 the audio is a part of.

A media group allow 2 or more <audio> 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:

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, representing the media group of the audio


Audio Object Reference Audio Object

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE

facebook