How to optimize video rendering (HTML)

Applies to Windows and Windows Phone

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.

 

 

Show:
© 2014 Microsoft