Open
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.
TimGels
commented
Jun 27, 2023
| } | ||
| } | ||
|
|
||
| private bool _isAudioAvailable; |
Member
Author
There was a problem hiding this comment.
I should look into if this needs to be false or true by default like the _isSubtitlesAvailable
ThaMe90
reviewed
Jun 27, 2023
| return _mediaPlayer.SpuDescription; | ||
| } | ||
|
|
||
| public TrackDescription GetPreferredAudioTrack() |
There was a problem hiding this comment.
Missing documentation, other methods do have the inheritdoc directives.
| return _mediaPlayer.AudioTrackDescription.ElementAt(1); | ||
| } | ||
|
|
||
| public TrackDescription[] GetEmbeddedAudioTracks() |
There was a problem hiding this comment.
Missing documentation, other methods do have the inheritdoc directives.
| private MediaPlayer mediaPlayer; | ||
| private MediaPlayer _mediaPlayer; | ||
| private int MediaListIndex; | ||
| private bool _isFirstPlaying = true; |
There was a problem hiding this comment.
Inconsistent naming of private boolean field, related to InvalidOneDriveSession.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.