From 9076aeb5ef3fb9d2f61b7dbfc6bd258315f37ee1 Mon Sep 17 00:00:00 2001 From: marguinbc Date: Tue, 25 Jul 2017 14:04:54 -0400 Subject: [PATCH] fix: decouple mute = vol 0 (#230) --- src/com/videojs/VideoJSModel.as | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/com/videojs/VideoJSModel.as b/src/com/videojs/VideoJSModel.as index 42801f21..3051d93c 100644 --- a/src/com/videojs/VideoJSModel.as +++ b/src/com/videojs/VideoJSModel.as @@ -26,6 +26,7 @@ package com.videojs{ private var _currentPlaybackType:String; private var _videoReference:Video; private var _lastSetVolume:Number = 1; + private var _muted:Boolean = false; private var _provider:IProvider; // accessible properties @@ -285,15 +286,17 @@ package com.videojs{ } public function get muted():Boolean{ - return (_volume == 0); + return _muted; } public function set muted(pValue:Boolean):void { if(pValue){ var __lastSetVolume:Number = _lastSetVolume; + _muted = true; volume = 0; _lastSetVolume = __lastSetVolume; } else{ + _muted = false; volume = _lastSetVolume; } }