Skip to main content
Playing and previewing audio and video (HTML)

Applies to Windows and Windows Phone

This section contains topics on playing audio and video in your Windows Runtime app using JavaScript.

It covers how to play audio and video using the HTML5 audio and video tags, share or stream media with Play To, and use effects and custom media extensions.

For samples that use audio and video in a Windows Runtime app using JavaScript, see the HTML media playback sample and the other samples listed in the Samples section in the Related topics below.

In this section

TopicDescription

Quickstart: playing video in an app

This topic shows how use the HTML5  Video element to play a video in a Windows Runtime app using JavaScript.

How to open local media files using the FileOpenPicker control

Play audio or video files that are on the user's computer using the FileOpenPicker to get access to and open the file.

How to open media files from the network

Set the media source of an audio or video element to a media file on the network.

How to use the system media transport controls

The SystemMediaTransportControls class enables your app to use the system media transport controls provided by Windows and update the media info that is displayed.

How to adjust camera or microphone settings

You can adjust various settings on the camera or microphone, such as brightness, contrast, focus (on the camera) or volume (on the microphone).

How to enable effects in a <video> tag

This topic shows how to enable video and audio effects in a Windows Runtime app using JavaScript.

How to enable low-latency playback

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

How to enable stereo video playback

This topic shows how to enable stereo video playback by setting the msStereo3DRenderMode attribute.

How to optimize video rendering

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

How to transition between media clips

This topic describes a way of ensuring smooth transitions between video or audio clips by having at least two media elements and alternating between them.

How to select audio tracks in different languages

You can use the audioTracks property to switch between multiple audio tracks on a media file.

How to select an audio output device

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

How to zoom in and remove letterbox from a video

The msZoom property can be used to zoom into a video to remove the letterbox or pillarbox from the rendered video.

How to keep the display on during audio/video playback

Learn how to keep the display on while playing back local or streaming video by using the DisplayRequest class.

How to play audio in the background

This tutorial shows you how to select the correct category for an audio-video (AV) stream to configure it to play in the background.

Overview: Background audio for Windows Phone

You can write apps for Windows Phone 8.1 that play audio in the background. This means that even after the user has left your app by pressing the Back button or the Start button on their device, your app can continue to play audio. This article discusses the components of a background audio app and how they work together.

How to flip video horizontally

Use the msHorizontalMirror attribute to flip a video horizontally.

How to use pluggable DRM

You can enable Digital Rights Management (DRM) protected content in your Windows Runtime app using JavaScript by using the MediaProtectionManager.

How to handle DRM errors

Windows Runtime apps can enable playback of DRM protected media content by using the MediaProtectionManager. The MediaError interface is extended to include an msExtendedCode attribute so developers can get feedback during implementation.

Using media extensions

This topic describes what media extensions are and how to use them in your Windows Runtime app.

writing background media apps that conserve power

Streaming media to devices using Play To

Play To enables users to easily stream audio, video, or images from their computer to networked devices.

 

Related topics

Roadmaps
Roadmap for Windows Runtime apps using JavaScript
Designing UX for apps
Samples
HTML media playback sample
Transcoding Media Sample
Media Extension Sample
Media Play To sample
PlayToReceiver sample
Playback manager sample
Reference
Windows.Media
Windows.Media.PlayTo
Windows.Media.Protection
HTML5 Audio and Video
Other resources
Supported audio and video formats
Audio and video performance