mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-29 01:59:19 +01:00
Add getter/setter for video's mute option and fix volume unit
This commit is contained in:
parent
677e11df1c
commit
904e6a96e1
@ -307,7 +307,7 @@ export class et2_video extends et2_baseWidget implements et2_IDOMNode
|
||||
}
|
||||
else
|
||||
{
|
||||
return this.video[0].volume;
|
||||
return this.video[0].volume * 100;
|
||||
}
|
||||
}
|
||||
|
||||
@ -346,6 +346,35 @@ export class et2_video extends et2_baseWidget implements et2_IDOMNode
|
||||
}
|
||||
}
|
||||
|
||||
set_mute(_value)
|
||||
{
|
||||
if (this._isYoutube() && this.youtube) {
|
||||
if (_value)
|
||||
{
|
||||
this.youtube.mute();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.youtube.unMute();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.video[0].muted = _value;
|
||||
}
|
||||
}
|
||||
|
||||
get_mute(_value)
|
||||
{
|
||||
if (this._isYoutube() && this.youtube)
|
||||
{
|
||||
return this.youtube.isMuted();
|
||||
}
|
||||
else
|
||||
{
|
||||
return this.video[0].muted;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Set poster attribute in order to specify
|
||||
* an image to be shown while video is loading or before user play it
|
||||
|
Loading…
Reference in New Issue
Block a user