-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implemented audio selector #92
base: master
Are you sure you want to change the base?
Conversation
Implemented the ability to select a subtitle track on the video player page. Added a SubtitleAudioTrackSelector UserControl. This UserControl hosts the subtitle tracks and will also host the audio tracks from which a user can select a track. Introduced a MediaTrackService which can be injected to provider some methods. Methods it provide are at this moment the retrieval of subtitle tracks and the preferred subtitle track. Due to LibVLC not being able to be injected by a dependency injector due to several reasons, this service needs to be initialized by calling the initialize method and providing it with a reference to a (initialized!) MediaPlayer instance. This service can be expanded to perform more general MediaPlayer tasks as well in the future if need be. Added a ValueConverterGroup enabling the chaining of value converters. Added a custom exception which gets thrown when one of the the MediaTrackService methods get called without the service being initialized. Added MediaTrackService to the dependency Injector container in App.xaml.cs. Replaced public mediaplayer property calls with private.
Audio tracks can now be selected. By default it will select the first actual audio track.
} | ||
} | ||
|
||
private bool _isAudioAvailable; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should look into if this needs to be false or true by default like the _isSubtitlesAvailable
return _mediaPlayer.SpuDescription; | ||
} | ||
|
||
public TrackDescription GetPreferredAudioTrack() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing documentation, other methods do have the inheritdoc directives.
return _mediaPlayer.AudioTrackDescription.ElementAt(1); | ||
} | ||
|
||
public TrackDescription[] GetEmbeddedAudioTracks() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing documentation, other methods do have the inheritdoc directives.
private int MediaListIndex; | ||
private bool _isFirstPlaying = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent naming of private boolean field, related to InvalidOneDriveSession.
Audio tracks can now be selected. By default it will select the first actual audio track.
Blocked by #89 as that one needs to be merged first.