mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-12 02:09:05 +00:00
Mute video by default
This commit is contained in:
@@ -22,6 +22,11 @@ namespace QuickLook.Plugin.VideoViewer
|
||||
_context = context;
|
||||
|
||||
buttonPlayPause.MouseLeftButtonUp += TogglePlayPause;
|
||||
buttonMute.MouseLeftButtonUp += (sender, e) =>
|
||||
{
|
||||
mediaElement.IsMuted = false;
|
||||
buttonMute.Visibility = System.Windows.Visibility.Collapsed;
|
||||
};
|
||||
|
||||
mediaElement.PropertyChanged += ChangePlayPauseButton;
|
||||
mediaElement.MouseLeftButtonUp += TogglePlayPause;
|
||||
@@ -67,6 +72,7 @@ namespace QuickLook.Plugin.VideoViewer
|
||||
public void LoadAndPlay(string path)
|
||||
{
|
||||
mediaElement.Source = new Uri(path);
|
||||
mediaElement.IsMuted = true;
|
||||
mediaElement.Play();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user