Home > Sample chapters > Programming > Windows

Windows Phone 8 Development Internals: Phone and Media Services

Audio and video APIs

Windows Phone includes a range of techniques for working with media, both audio and video, in three broad categories that are described in Table 5-3.

Table 5-3. Media techniques for Windows Phone

Category

Technique

Description

Media playback

MediaPlayerLauncher

A Launcher for playing audio or video with the built-in player experience. Primarily used for XNA videos.

MediaElement

The primary wrapper class for audio and/or video files.

MediaStreamSource

You can use this to work directly with the media pipeline. You use this most often to enable the MediaElement to use a container format not natively supported by the app platform.

BackgroundAudioPlayer

Background audio agents use this to play music (see Chapter 9.

Audio input and manipulation

SoundEffect, SoundEffectInstance, DynamicSoundEffect

XNA classes for working with audio content.

Microphone

The only API for the microphone on the phone is the XNA Microphone class.

Platform integration

MediaHistory

You can use this to integrate your app with the Music + Videos hub.

MediaLibrary

XNA class that provides access to the user’s songs, playlists, and pictures.