C# Class OpenSyno.Services.PlaybackService

Inheritance: IPlaybackService, IAudioRenderingService
Afficher le fichier Open project: salfab/open-syno

Méthodes publiques

Méthode Description
ClearTracksInQueue ( ) : void
GetCurrentTrack ( ) : GuidToTrackMapping
GetTracksCountInQueue ( ) : int
GetTracksInQueue ( ) : IEnumerable
GetVolume ( ) : double
InsertTracksToQueue ( IEnumerable tracks, int insertPosition, Guid>.Action callback ) : void
InvalidateCachedTokens ( ) : void

Invalidates the cached tokens.

Used to make sure we purge the fix for the uri containing non-ascii7 characters. The current architecture relies on the fact that we only change the token if the cached token is outdated. fixes use url-shortening services and have their token enclosed, so it is necessary not to update the cached token indepedently from the cached uri fixes !

Pause ( ) : void
PausePlayback ( ) : void
PlayTrackInQueue ( System.Guid trackToPlay ) : void

Clears the play queue.

Inserts the specified tracks to the play queue.

Plays the specified track. It must be present in the queue.

PlaybackService ( IAudioStationSession audioStationSession, IAudioTrackFactory audioTrackFactory, IVersionDependentResourcesProvider versionDependentResourceProvider ) : System

Initializes a new instance of the PlaybackService class.

RemoveTracksFromQueue ( IEnumerable tracksToRemove ) : void
Resume ( ) : void
ResumePlayback ( ) : void
SetVolume ( double volume ) : void
SkipNext ( ) : void
SkipPrevious ( ) : void
StreamTrack ( System.Guid guidOfTrackToPlay ) : void

Méthodes protégées

Méthode Description
OnTrackStarted ( TrackStartedEventArgs trackStartedEventArgs ) : void

Private Methods

Méthode Description
BackgroundPlayerPlayStateChanged ( object sender, EventArgs e ) : void
DetectAffectedTracksAndBuildFix ( List potentiallyUnsafeMappings, Guid>.Action callback ) : void

Detects the affected tracks and build a fix.

OnBufferingProgressUpdated ( BufferingProgressUpdatedEventArgs bufferingProgressUpdatedEventArgs ) : void
OnMediaPositionChanged ( object sender, MediaPositionChangedEventArgs e ) : void
OnTrackCurrentPositionChanged ( MediaPositionChangedEventArgs mediaPositionChangedEventArgs ) : void
OnTracksInQueueChanged ( PlayqueueChangedEventArgs eventArgs ) : void
SerializeAsciiUriFixes ( ) : void
SerializePlayqueue ( ) : void

Method Details

ClearTracksInQueue() public méthode

public ClearTracksInQueue ( ) : void
Résultat void

GetCurrentTrack() public méthode

public GetCurrentTrack ( ) : GuidToTrackMapping
Résultat OpenSyno.Contracts.Domain.GuidToTrackMapping

GetTracksCountInQueue() public méthode

public GetTracksCountInQueue ( ) : int
Résultat int

GetTracksInQueue() public méthode

public GetTracksInQueue ( ) : IEnumerable
Résultat IEnumerable

GetVolume() public méthode

public GetVolume ( ) : double
Résultat double

InsertTracksToQueue() public méthode

public InsertTracksToQueue ( IEnumerable tracks, int insertPosition, Guid>.Action callback ) : void
tracks IEnumerable
insertPosition int
callback Guid>.Action
Résultat void

InvalidateCachedTokens() public méthode

Invalidates the cached tokens.
Used to make sure we purge the fix for the uri containing non-ascii7 characters. The current architecture relies on the fact that we only change the token if the cached token is outdated. fixes use url-shortening services and have their token enclosed, so it is necessary not to update the cached token indepedently from the cached uri fixes !
public InvalidateCachedTokens ( ) : void
Résultat void

OnTrackStarted() protected méthode

protected OnTrackStarted ( TrackStartedEventArgs trackStartedEventArgs ) : void
trackStartedEventArgs TrackStartedEventArgs
Résultat void

Pause() public méthode

public Pause ( ) : void
Résultat void

PausePlayback() public méthode

public PausePlayback ( ) : void
Résultat void

PlayTrackInQueue() public méthode

Clears the play queue. Inserts the specified tracks to the play queue. Plays the specified track. It must be present in the queue.
public PlayTrackInQueue ( System.Guid trackToPlay ) : void
trackToPlay System.Guid The track to play.
Résultat void

PlaybackService() public méthode

Initializes a new instance of the PlaybackService class.
public PlaybackService ( IAudioStationSession audioStationSession, IAudioTrackFactory audioTrackFactory, IVersionDependentResourcesProvider versionDependentResourceProvider ) : System
audioStationSession IAudioStationSession
audioTrackFactory IAudioTrackFactory
versionDependentResourceProvider IVersionDependentResourcesProvider
Résultat System

RemoveTracksFromQueue() public méthode

public RemoveTracksFromQueue ( IEnumerable tracksToRemove ) : void
tracksToRemove IEnumerable
Résultat void

Resume() public méthode

public Resume ( ) : void
Résultat void

ResumePlayback() public méthode

public ResumePlayback ( ) : void
Résultat void

SetVolume() public méthode

public SetVolume ( double volume ) : void
volume double
Résultat void

SkipNext() public méthode

public SkipNext ( ) : void
Résultat void

SkipPrevious() public méthode

public SkipPrevious ( ) : void
Résultat void

StreamTrack() public méthode

public StreamTrack ( System.Guid guidOfTrackToPlay ) : void
guidOfTrackToPlay System.Guid
Résultat void