MediaBrowser / Emby.WindowsPhone

Emby for Windows Phone
http://emby.media
GNU General Public License v2.0
55 stars 17 forks source link

Adopt PlaybackManager #206

Closed LukePulverenti closed 9 years ago

LukePulverenti commented 9 years ago

Available here:

https://github.com/MediaBrowser/MediaBrowser.ApiClient/blob/master/MediaBrowser.ApiInteraction/Playback/PlaybackManager.cs

It should replace some of your existing playback-related api calls and will handle pre/post operations for you, like stopping transcoding. It also provides a playback abstraction over online/offline based playback and will use locally stored stored content when available.

See win8 app for example.

In addition.

BuildVideoItem and BuildAudioItem now have custom a PlaybackException that it will throw in certain conditions. The exception has an ErrorCode property with the following:

public enum PlaybackErrorCode
{
    NotAllowed = 0 (user not authorized for playback),
    NoCompatibleStream = 1 (could happen if admin disables transcoding),
    RateLimitExceeded = 2 (admin might limit simultaneous streams per user)
}

So these need to be caught and an error message displayed to the user.

ScottIsAFool commented 9 years ago

Will be added to .67