Playback rate changed

Topics: Windows 8 Xaml, Windows Phone 8
Oct 24, 2013 at 11:00 AM
Is there an event that detects a change in the playback rate
Oct 28, 2013 at 12:21 AM
Note: variable playback rates are not supported on Windows Phone. However, on Windows 8 there is an event: RateChanged that you can handle to get notification when the playback rate changes.
Oct 28, 2013 at 3:58 PM
I think my question was unclear.

We are using adaptive streaming and want to detect when the stream changes in bitrate.
Nov 6, 2013 at 10:18 PM
Thanks for the clarification. Is this for Win8 or WP8 (or both)? I ask because the solution is slightly different depending on which. However, in both cases you will need to communicate with the AdaptivePlugin object to get this information.
Nov 8, 2013 at 9:22 AM
Its on Windows phone 8
Nov 22, 2013 at 7:32 PM
Hi bobski,

You can subscribe to two events of the SmoothStreamingMediaElement to track a change in bitrate of the played and/or downloaded stream segment.
Note that these events are only fired whenever a change in bitrate is detected, so not necessarily for each stream segment.
        var adaptivePlugin = (from plugin in thePlayer.Plugins
                              where plugin is Microsoft.PlayerFramework.Adaptive.AdaptivePlugin
                              select plugin).FirstOrDefault() as Microsoft.PlayerFramework.Adaptive.AdaptivePlugin;
        if (adaptivePlugin != null)
            adaptivePlugin.SSME.PlaybackTrackChanged += (s, ea) =>
                    // Obtain the bitrate of the new track being played.
                    var newPlaybackBitrate = ea.NewTrack.Bitrate;
            adaptivePlugin.SSME.DownloadTrackChanged += (s, ea) =>
                // Obtain the bitrate of the new track being downloaded.
                var newDownloadBitrate = ea.NewTrack.Bitrate;