Skip to content
This repository has been archived by the owner on Dec 10, 2020. It is now read-only.

Commit

Permalink
fix: decouple mute = vol 0 (#230)
Browse files Browse the repository at this point in the history
  • Loading branch information
marguinbc authored and gkatsev committed Jul 25, 2017
1 parent f154171 commit 9076aeb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/com/videojs/VideoJSModel.as
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 9076aeb

Please # to comment.