Media for Windows Phone
April 14, 2014
Applies to: Windows Phone 8 and Windows Phone Silverlight 8.1 | Windows Phone OS 7.1
You can incorporate audio and video in various ways into your Windows Phone apps.
Any application that incorporates media must adhere to the App certification requirements for Windows Phone.
This topic contains the following sections.
You can use the following features to consume media in a Windows Phone application:
Use the MediaElement class to embed audio or video using a more customizable interface. For an example of how to use this API in your application, see How to play or stream a video file for Windows Phone 8. As a best practice, use the MediaElement API with Windows Phone apps.
Use the MediaStreamSource class for adaptive streaming solutions.
Use Microsoft.Phone.BackgroundAudio to create a media application that will continue playing audio when another application is in the foreground. For more information, see How to play background audio for Windows Phone 8.
Add sound effects using XNA Game Studio in apps that target Windows Phone OS 7.1. For an example of how to add a sound effect, see Making Sounds with XNA Game Studio.
Windows Phone supports a wide range of audio, video, and image codecs. For a full list, including maximum capabilities for each codec, see Supported media codecs for Windows Phone 8.
Windows Phone apps can integrate closely with the Music + Videos Hub. When you implement this integration, your app name is displayed in the Music + Videos Hub. Additionally, you can choose to display a history of what has been played in your application, including the most recent item that was played. For more information, see How to integrate with the Music and Videos Hub for Windows Phone 8.
You can also use several Launcher APIs to access Store. For more information, see Launchers for Windows Phone 8.
Use the Microphone class from the XNA Framework to get audio input from the Windows Phone microphone.
You can access FM radio stations in apps that target Windows Phone OS 7.1. For more information, see How to set up and tune the FM radio for Windows Phone 8.
The 7x27a processor does not allow accessing the FM radio and microphone simultaneously.
Windows Phone supports PlayReady Digital Rights Management (DRM). For more information, see Digital Rights Management (DRM) for Windows Phone 8.