Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Implemented audio selector #92

wants to merge 2 commits into from

Conversation

TimGels
Copy link
Member

@TimGels TimGels commented Jun 25, 2023

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.

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 TimGels linked an issue Jun 25, 2023 that may be closed by this pull request
}
}

private bool _isAudioAvailable;
Copy link
Member Author

@TimGels TimGels Jun 27, 2023

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()
Copy link

@ThaMe90 ThaMe90 Jun 27, 2023

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()
Copy link

@ThaMe90 ThaMe90 Jun 27, 2023

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;
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Possibility to use and switch to a different audio track
2 participants