This project has moved. For the latest updates, please go here.

Default codecs

Dec 22, 2014 at 11:28 AM
Hi..
Using the source code examples on Windows 8.1 its dead easy to get shoutcast, aac playing for example..
But how can I set the player to play "regular" streams not supported my phonesm but supported by MediaElement / Microsoft.PlayerFramework

I We end up with a a player that does not add both things??

I just put this on my xaml
   <pf:MediaPlayer Name="mediaPlayer" AudioCategory="BackgroundCapableMedia">
            
                <pf:MediaPlayer.Plugins>
                <smmp:StreamingMediaPlugin />
                </pf:MediaPlayer.Plugins>
            
        </pf:MediaPlayer>
Coordinator
Dec 22, 2014 at 6:13 PM
One can add and remove the plugin where needed. I think there is another thread about this (possibly, this was a series of PMs). Alternately, the plugin is supplied in source form even in the binary .zip in order to facilitate customization. For what you are looking to do, I think something like this should work (in PlayerOnMediaLoading):
   ...
                    if (null != playState)
                    {
                        await playState.StopAsync(cancellationToken);

                        if (null != _playState)
                        {
                            Debug.WriteLine("StreamingMediaPlugin MediaLoading non-null _playState");

                            return;
                        }
                    }

                    if (IsPassThrough(source))
                    {
                        deferral.Complete();
                        deferral = null;

                        return;
                    }

                    if (string.Equals(source.Scheme, "stop", StringComparison.OrdinalIgnoreCase))
                    {
                        Debug.WriteLine("StreamingMediaPlugin MediaLoading stop");
                        return;
                    }
   ...
Where "IsPassThrough()" has some way of knowing which streams should not go through phonesm.
Coordinator
Feb 4, 2015 at 2:48 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.