remember volume

This commit is contained in:
Paddy Xu
2018-01-27 14:50:24 +02:00
parent 5b0da969af
commit fa0824bce9

View File

@@ -168,6 +168,8 @@ namespace QuickLook.Plugin.VideoViewer
public void Dispose() public void Dispose()
{ {
_context.SetSetting("Volume", mediaElement.Volume);
try try
{ {
Task.Run(() => Task.Run(() =>
@@ -317,7 +319,7 @@ namespace QuickLook.Plugin.VideoViewer
public void LoadAndPlay(string path) public void LoadAndPlay(string path)
{ {
mediaElement.LoadMediaWithOptions(path, ":avcodec-hw=dxva2"); mediaElement.LoadMediaWithOptions(path, ":avcodec-hw=dxva2");
mediaElement.Volume = 50; mediaElement.Volume = _context.GetSetting("Volume", 50);
mediaElement.Play(); mediaElement.Play();
} }