Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

msAudioCategory property

Specifies the purpose of the audio or video media, such as background audio or alerts.

This property is read/write.

Internet Explorer 10

 

Syntax

JavaScript

object.msAudioCategory = ptr

ptr = object.msAudioCategory

 

Property values

Type: DOMString

Other (0)

Specifies all media that does not need background playback capabilities. Default value.

ForegroundOnlyMedia (1)

Specifies media, such as music or streaming audio, that does not require background playback.

BackgroundCapableMedia (2)

Specifies media, such as music or streaming audio, that requires background playback.

Communications (3)

Specifies communication media, such as Voice over IP and real time chat, that requires background audio capabilities.

Alerts (4)

Specifies media such as alerts and ring tones which will mute or attenuate the current audio.

SoundEffects (5)

Specifies short duration sound effects in the foreground which will mix with the background audio.

GameEffects (6)

Specifies short duration sound effects in the foreground which will mix with the background audio.

GameMedia (7)

Specifies background audio in a game, such as music or other non-effects game sounds.

Remarks

If you set msAudioCategory to Communications, msRealtime is automatically set to true. Also, if msAudioDeviceType is not explicitly set, msAudioDeviceType will be set to Communications.

You must set the msAudioCategory before setting the src property in code.

Communications should not be used in non-real-time or non-communication scenarios, such as audio and/or video playback, as this can affects playback startup latency of audio and video playback.

For hardware audio offload to be automatically applied, the audio category must be set to ForegroundOnlyMedia or BackgroundCapableMedia. Hardware audio offload optimizes audio rendering which can improve functionality and battery life.

See also

HTMLMediaElement

 

 

Show:
© 2015 Microsoft