HTTP Live Streaming (HLS) for Windows Phone and Windows 8.1.
A Windows Phone MediaStreamSource has been implemented that supports HTTP Live Streaming (HLS). It supports playing MPEG-2 transport streams (.ts files) containing H.264 video and MP3 or AAC audio as well as MP3 streams (.mp3 segments) and AAC streams (.aac segments) on both Windows Phone 7 and Windows Phone 8. There is experimental support for "AES-128" mode encrypted streams.
Windows 8.1 support is available in the latest source. The Win8.1 sample application is primitive and does not yet support Player Framework. In addition to the formats supported on the phone, transport streams containing MPEG-2 video and AC-3 audio should work. See the comments for work item 12
There is a sample application for WP7 that uses the SMF player (http://smf.codeplex.com/
) and a sample application for WP8 that uses the Player Framework (http://playerframework.codeplex.com/
). Both applications can play live and prerecorded programs (seek works for prerecorded programs).
Visual Studio 2012 Professional or better (Express does not support Portable Class Libraries) and the Windows Phone 8 SDK is required.
See the Documentation
for more information.
- The SMF and Player Framework plugins are just fleshed out enough to start a stream, pause it, and seek. Dealing with many practical application concerns like cleanly shutting down playback, dealing with navigation, and tombstoning needs to be implemented. The HlsView application handles some of these issues, but does so rather inelegantly (i.e., everything is shoved into MainPage.xaml.cs).
- There is no support for changing the bitrate during playback. Neither manual control nor automatic bitrate selection is available.
- Error reporting is primitive and consists mainly of Debug.WriteLine() calls. The HlsView apps report exceptions that end playback, but the SamplePlayer apps do not.
- ID3 tags, used in some .mp3 streams, are not skipped. (Something between the segment reader and the frame splitter should probably do so.)