Home > Web Front-end > H5 Tutorial > H5 sets or returns the attribute mediaGroup of the name of the media group to which the audio/video belongs

H5 sets or returns the attribute mediaGroup of the name of the media group to which the audio/video belongs

黄舟
Release: 2017-11-09 09:43:05
Original
1789 people have browsed it

Example

Set the media group for two videos:

myVid1=document.getElementById("video1");
myVid2=document.getElementById("video2");
myVid1.mediaGroup="test";
myVid2.mediaGroup="test";
Copy after login

Definition and usage

mediaGroup PropertiesSet or Returns the name of the media combination to which audio/video belongs.

MediaGroupingAllows two or more audio/video elements to stay in sync.

Browser support

No major browser supports the mediaGroup attribute.

Syntax

Set the mediaGroup attribute:

audio|video.mediaGroup="group"
Copy after login

Return the mediaGroup attribute:

audio|video.mediaGroup
Copy after login

Attribute value

Value Description
group Specifies the media grouping of audio/video.

Return value

Type Description
StringValue Indicates the media grouping of audio/video.

This attribute is rarely used. But there will be a problem if you use it. After the playback is completed, it will be invalid if you play it again. It will also be invalid if the loop attribute is set. So don't use this attribute if there is only one video. Purely redundant.


The above is the detailed content of H5 sets or returns the attribute mediaGroup of the name of the media group to which the audio/video belongs. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template