Share via


How to enable low-latency playback (HTML)

[This article is for Windows 8.x and Windows Phone 8.x developers writing Windows Runtime apps. If you’re developing for Windows 10, see the latest documentation]

Setting the msRealTime attribute on a media element enables low-latency playback.

The msRealTime attribute, when set to true, enables the media element to reduce the initial latency for playback. This is critical for two-way communications apps. And can be applicable to some gaming scenarios. Be aware that this mode is more resource intensive and is less power-efficient. For more information on performance, see Audio and video performance.

The attribute must be set on the media tag explicitly, and can't be set in JavaScript.

See the Real-Time Communication Sample.

This example creates a Audio element and sets the msRealTime attribute to true.

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

Audio and video performance

Real-Time Communication Sample

msRealTime