This project has moved and is read-only. For the latest updates, please go here.

HLS on Windows 8.0

Oct 7, 2014 at 1:39 PM
I am trying to use the hls framework on WIndows 8.0. i have converted HLSView project to Windows 8.0. But Visual Studio tells me that

static readonly IApplicationInformation ApplicationInformation = ApplicationInformationFactory.DefaultTask.Result; does not exist in current context

_mediaStreamFascade = MediaStreamFascadeSettings.Parameters.Create(_httpClients, _mediaElementManager.SetSourceAsync); does not contain a definition for "create"
 _mediaElementManager = new WinRtMediaElementManager(Dispatcher, WinRtMediaElementManager could not be found.
I need to integrate this in a Windows 8.0 project. I have read that it is posible, but i don;t know how to get past those errors
Oct 7, 2014 at 5:16 PM
Possible, but it requires a bit of work. phonesm relies on the MediaStreamSource class that MS added in Windows 8.1.
Oct 7, 2014 at 5:48 PM
Thank you. Could you please provide more info on the 3 errors. The project is an WIndows 8.0 app. When i convert it back to 8.1 it works with no modifications
Oct 8, 2014 at 8:55 PM
Since I see the "fascade" typo and media element manager, it looks like you are using code from March (or earlier). Have you taken a look at the current source? There are example Universal App variants of both HlsView and SamplePlayer, targeting Win 8.1 and WP 8.1.
Oct 9, 2014 at 12:47 PM
I have just tried 72bb1b6bb7f3 version (last commit). i have converted hlsview.win81 project to a windows 8.0 project. After commenting SystemMediaTransportControls i only had 2 problems:

Error 7 The base class or interface of 'SM.Media.IMediaStreamFacade' could not be resolved or is invalid c:\Users\Sergiu\Downloads\phonesm-72bb1b6bb7f3885c65e157823b7cf2d341fa5c95\Source\bin\Debug\SM.Media.Platform.WinRT.dll HlsView.Win81

and at mediaElement1.SetMediaStreamSource(mss);

Error 21 'Windows.UI.Xaml.Controls.MediaElement' does not contain a definition for 'SetMediaStreamSource' and no extension method 'SetMediaStreamSource' accepting a first argument of type 'Windows.UI.Xaml.Controls.MediaElement' could be found (are you missing a using directive or an assembly reference?) c:\users\sergiu\downloads\phonesm-72bb1b6bb7f3885c65e157823b7cf2d341fa5c95\source\app\winrt\hlsview.win81\mainpage.xaml.cs 348 39 HlsView.Win81

I don't know how to make it work from here for windows 8.0. Please any help is welcomed
Oct 9, 2014 at 6:46 PM
"mediaElement1.SetMediaStreamSource(mss)" uses MediaStreamSource, which does not exist in Windows 8 (note the "Minimum supported client" at the bottom of the page). It was one of the things added in Windows 8.1.

IMediaStreamFacade looks like this:
    public interface IMediaStreamFacade : IMediaStreamFacadeBase<IMediaSource>
    { }
The IMediaSource interface was also added in Windows 8.1.

If you want to play this stuff on Windows 8.0, you will need to implement some alternative to MediaStreamSource. If Windows 8.1 isn't going to work for you and you absolutely have to have Windows 8 support, then you will probably need to write your own IMFMediaSource or look at a commercial solution.