mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 11:26:31 +00:00
fix: Set focus on video after playback buttons pressed
This commit is contained in:
@@ -14,7 +14,7 @@ public class PlayerControlHandler(LibVLC libVLC, MediaPlayer mediaPlayer, MainWi
|
|||||||
private const int STEP = 20;
|
private const int STEP = 20;
|
||||||
private const int LARGE_STEP = 5000;
|
private const int LARGE_STEP = 5000;
|
||||||
|
|
||||||
private static readonly string[] CatchSenders = ["ForegroundWindow", "ScrollViewer"];
|
private static readonly string[] CatchSenders = ["ForegroundWindow", "ScrollViewer", "VideoView"];
|
||||||
|
|
||||||
private readonly Dictionary<Key, PlaybackControlEnum> KeysControlEnumDict = new()
|
private readonly Dictionary<Key, PlaybackControlEnum> KeysControlEnumDict = new()
|
||||||
{
|
{
|
||||||
@@ -63,6 +63,7 @@ public class PlayerControlHandler(LibVLC libVLC, MediaPlayer mediaPlayer, MainWi
|
|||||||
public async Task Handle(PlaybackControlEvent notification, CancellationToken cancellationToken)
|
public async Task Handle(PlaybackControlEvent notification, CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
await ControlPlayback(notification.PlaybackControl);
|
await ControlPlayback(notification.PlaybackControl);
|
||||||
|
mainWindow.VideoView.Focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task ControlPlayback(PlaybackControlEnum controlEnum)
|
private async Task ControlPlayback(PlaybackControlEnum controlEnum)
|
||||||
|
|||||||
Reference in New Issue
Block a user