How to select an audio output device (HTML)

Applies to Windows and Windows Phone

This topic describes how to select an audio output device on the audio tag.

Instructions

Step 1: Send the audio output signals to the default audio output devices

Windows allows apps to send the audio output signals to various output devices using the msAudioDeviceType attribute (DOMString). With this extension, Windows Store apps can choose to send the audio output signals to the default audio output devices for multimedia, console, and communications, respectively. The attribute can only be set on the media tag explicitly and can’t be accessed through the Windows Runtime functions. The default value is “multimedia”.

Setting msAudioCategory to “communications” will force msAudioDeviceType to “true” and also set msRealtime to “communications” if the msAudioDeviceType attribute is not set explicitly.


   <audio src="GameEffect.avi" msRealtime=true 
       msAudioDeviceType="console" msAudioCatogery="soundeffects" />


Related topics

Real-Time Communication Sample

 

 

Show:
© 2014 Microsoft