fossmium / OneDrive-Cloud-Player

OneDrive Cloud Player is a media player dedicated for streaming files directly from OneDrive.
GNU General Public License v2.0
60 stars 7 forks source link

Added Subtitle Track selector #89

Open TimGels opened 1 year ago

TimGels commented 1 year ago

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 provide 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.

resolves #86

JohannesKauffmann commented 1 year ago

Still need to see about the user option change (removed, renamed?)

TimGels commented 1 year ago

Still need to see about the user option change (removed, renamed?)

Whatever we may decide on https://github.com/fossmium/OneDrive-Cloud-Player/blob/bf6eed093d52226d4d5ed00b35e57c96df0aced1/OneDrive-Cloud-Player/Services/MediaTrackService.cs#L65 should be changed/ updated accordingly. Posting this here so we don't forget.

TimGels commented 1 year ago

Could you test these changes again on your system @JohannesKauffmann? I added a couple more test media files to the test account for us to use.

TimGels commented 1 year ago

Still need to see about the user option change (removed, renamed?)

Whatever we may decide on

https://github.com/fossmium/OneDrive-Cloud-Player/blob/bf6eed093d52226d4d5ed00b35e57c96df0aced1/OneDrive-Cloud-Player/Services/MediaTrackService.cs#L65 should be changed/ updated accordingly. Posting this here so we don't forget.

I decided to keep the original setting functionality intact. This needs to be tested by another set of eyes as well if possible.

JohannesKauffmann commented 1 year ago

Other than my comment, the changes since last review look fine to me.