Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
empty88 committed May 8, 2024
2 parents e966de9 + f2c984e commit 687991a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ViewModels/MainViewModel.vb
Original file line number Diff line number Diff line change
Expand Up @@ -420,9 +420,11 @@ Namespace ViewModels
If SelectedChannel.CurrentProgram IsNot Nothing Then NowPlaying = SelectedChannel.CurrentProgram.Title & " "
Using media = New Media(_libVLC, New Uri(streamUrl))
MediaPlayer.Play(media)

End Using
AddHandler MediaPlayer.Media.MetaChanged, AddressOf UpdateMeta
AddHandler MediaPlayer.VolumeChanged, AddressOf UpdateVolume
AddHandler MediaPlayer.EncounteredError, AddressOf ErrorOccured
If MediaPlayer.Volume > 100 Then MediaPlayer.Volume = 100

Task.Run(Sub()
Expand All @@ -434,6 +436,10 @@ Namespace ViewModels
End Sub)
End Sub

Private Sub ErrorOccured(sender As Object, e As EventArgs)
MainViewModel.ErrorString = "Wiedergabe fehlgeschlagen"
End Sub

Private Sub OsdTimerCallback(state As Object)
ShowOsd = False
End Sub
Expand Down

0 comments on commit 687991a

Please sign in to comment.