Streaming Media Plugin does not exist

Nov 13, 2013 at 3:21 PM
Hello.
when i try to debug me app it give me 2 error.
Error 1 The name "StreamingMediaPlugin" does not exist in the namespace "clr-namespace:SM.Media.MediaPlayer;assembly=SM.Media.MediaPlayer.WP8". C:\Users\Ardit\documents\visual studio 2013\Projects\Player\Player\MainPage.xaml 23 17 Player

Error 2 Cannot resolve dependency to assembly 'Microsoft.PlayerFramework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event. C:\Users\Ardit\documents\visual studio 2013\Projects\Player\Player\MainPage.xaml 1 1 Player


i have add all the reference on my project:

Microsoft.Player.Frameord.dll
Microsoft.Threading.Tasks.dll
Microsoft.Threading.Tasks.Extensions.dll
Microsoft.Threading.Tasks.Extension.Phone.dll
SamplePlayer.WP8.dll
SM.Media.dll
SM.Media.MediaPlayer.WP8.dll
SM.Media.Platform.WP8.dll
SM.TsParser.dll
System.Net.Http.dll
System.Net.Http.Extensions.dll
System.Net.Http.Primitives.dll

on my MainPage.xaml i have add xmlns:smmedia and the code

<mmppf:MediaPlayer Source="https://devimages.apple.com.edgekey.net/resources/http-streaming/examples/bipbop_16x9/bipbop_16x9_variant.m3u8">
        <mmppf:MediaPlayer.Plugins>
            <smmedia:StreamingMediaPlugin />
        </mmppf:MediaPlayer.Plugins>
    </mmppf:MediaPlayer>
but <smmedia:StreamingMediaPlugin /> is underlined
Coordinator
Nov 14, 2013 at 12:12 AM
Are you building from source or are you using the released build? If the latter, note that phonesm-20130921 was built with Player Framework v1.2, not the current version (v1.3).

You should not need a reference to SamplePlayer.WP8.dll and the references to the threading and http project may work better as NuGet managed references (in case they need binding redirects or some-such).

I would suggest that you build from source if you can; if not, take a look at how the binary release deals with Debug/Release assembly references to, for example, SM.Media. That way, you will get debug info in the output window when running in the debugger and still get release assemblies when building for release.
Nov 14, 2013 at 11:06 AM
This happen when i try to build it from source.
Image
Coordinator
Nov 14, 2013 at 11:51 AM
A copy/paste of the text in the "Output" window would be easier to read.

It looks like the WP7 stuff isn't building because you don't have a copy of SMF in the "smf" folder. See the link in "Source/smf/readme.txt". Either add the SMF stuff or right-click "Unload Project" on the WP7 projects to stop the noise.

I can't see what's missing from the WP8 side of things, but you may not have the Player Framework .vsix installed (or you have a different version from what the code references).
Nov 14, 2013 at 12:10 PM
I have install Player Framework v1.2 and add the copy of SMF on smf folder and here is the copy of Output:

Output
Nov 14, 2013 at 6:56 PM
Edited Nov 14, 2013 at 7:04 PM
Finnaly i make it work with the http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8 file but when i try to open one of this file no one work:
http://globisot.info/android/tv/channel_Shqiperi.xml

i have added everything just like on the first comment but changed the Microsoft Player Framework to version 1.2 and it worked.i haven add only the .dll file nothing else
Coordinator
Nov 15, 2013 at 10:48 AM
I checked some of those https links and they all used a self-signed certificate.

Unless things have changed since last I looked, since ServicePointManager is not available on Windows Phone, certificate policy is limited to checking that a server's cert has been the result of someone sending a few bucks to one of the recognized certificate authorities. (That may of course be a Ukrainian hacker "borrowing" a Japanese farmer's bank account and identity, through a server he cracked in China, while sitting in his mother's basement. It may not offer much grounds for confidence in the server's identity, but at least the CAs get some revenue.)

You might want to take a look at this UserVoice idea: Self Signed Certification SSL HTTPS

If one can't get ServicePointManager, I would think an option to include a cert policy in the app's manifest would solve most of these problems (one would need to be able to say things like, "the cert for mail.myenterprise.com must have fingerprint XYZ, but the signature doesn't matter" or "the cert for corp.myenterprise.com must be signed by certificate X"). That would be local to the app, so other things on the phone wouldn't suddenly start trusting stuff it shouldn't and it would still let Microsoft's app approval gunk review the app's cert policy without trying to automatically reverse engineer the app's code (assuming that is the reason for the absence ServicePointManager).

You could try typing in one of those .m3u8 URLs into the phone's Internet Explorer. It may bring up a prompt asking if the phone should trust it. If it does and you install the cert, the app should be able to download those playlists. (I haven't tried.)

Other ideas would be to port another TLS implementation, forking over to a CA (if you have some influence over the server, that is), or getting a CDN or other service that can deal with self-signed certs upstream to act as a reverse proxy (that's just evil, at least assuming that there is already a CDN of some kind for serving the media).
Coordinator
Nov 15, 2013 at 10:49 AM
Oh, if you check the app's debug output, you will probably see 404s from the failed server cert validations.
Nov 18, 2013 at 8:27 AM
Everything work perfect right now,is there any way to play rtmp?
Coordinator
Nov 18, 2013 at 10:53 AM
"Any" is such a broad term... but with this code, no: there is no RTMP implementation.