Share via


How to optimize video rendering (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]

Windows Runtime introduces several optimizations when using the HTML5 video element.

Instructions

Using the msIsLayoutOptimalForPlayback attribute

The read-only boolean attribute msIsLayoutOptimalForPlayback provides information to developers as to whether video elements can benefit from the optimized rendering option in the system.

Listen to the onMSVideoOptimalLayoutChanged event to be notified when the msIsLayoutOptimalForPlayback state changes.

For msIsLayoutOptimalForPlayback to be true, avoid the following:

  • Video elements with CSS outlines set.
  • Rendering a video element through a Canvas.
  • Embedding video elements in a SVG.

When msIsLayoutOptimalForPlayback is true, video playback typically has better performance and typically uses less battery power.

To enable Stereo 3D playback, msIsLayoutOptimalForPlayback must be true.