mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-07 16:37:02 +03:00
Added "playback_rate" option in "video-on-login-screen" plugin.
This commit is contained in:
parent
c584ced2ed
commit
523f3ad115
3 changed files with 33 additions and 1 deletions
|
|
@ -1 +1 @@
|
||||||
1.0
|
1.1
|
||||||
|
|
@ -29,6 +29,10 @@ class VideoOnLoginScreenPlugin extends \RainLoop\Plugins\AbstractPlugin
|
||||||
->SetPlaceholder('http://')
|
->SetPlaceholder('http://')
|
||||||
->SetAllowedInJs(true)
|
->SetAllowedInJs(true)
|
||||||
->SetDefaultValue(''),
|
->SetDefaultValue(''),
|
||||||
|
\RainLoop\Plugins\Property::NewInstance('playback_rate')->SetLabel('Playback rate')
|
||||||
|
->SetAllowedInJs(true)
|
||||||
|
->SetType(\RainLoop\Enumerations\PluginPropertyType::SELECTION)
|
||||||
|
->SetDefaultValue(array('100%', '25%', '50%', '75%', '125%', '150%', '200%')),
|
||||||
\RainLoop\Plugins\Property::NewInstance('muted')->SetLabel('Muted')
|
\RainLoop\Plugins\Property::NewInstance('muted')->SetLabel('Muted')
|
||||||
->SetType(\RainLoop\Enumerations\PluginPropertyType::BOOL)
|
->SetType(\RainLoop\Enumerations\PluginPropertyType::BOOL)
|
||||||
->SetAllowedInJs(true)
|
->SetAllowedInJs(true)
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,39 @@
|
||||||
|
|
||||||
if (window.rl && window.rl && !window.rl.settingsGet('Auth'))
|
if (window.rl && window.rl && !window.rl.settingsGet('Auth'))
|
||||||
{
|
{
|
||||||
|
var
|
||||||
|
iRate = 1,
|
||||||
|
sRate = window.rl.pluginSettingsGet('video-on-login-screen', 'playback_rate')
|
||||||
|
;
|
||||||
|
|
||||||
|
switch (sRate)
|
||||||
|
{
|
||||||
|
case '25%':
|
||||||
|
iRate = 0.25;
|
||||||
|
break;
|
||||||
|
case '50%':
|
||||||
|
iRate = 0.5;
|
||||||
|
break;
|
||||||
|
case '75%':
|
||||||
|
iRate = 0.75;
|
||||||
|
break;
|
||||||
|
case '125%':
|
||||||
|
iRate = 1.25;
|
||||||
|
break;
|
||||||
|
case '150%':
|
||||||
|
iRate = 1.5;
|
||||||
|
break;
|
||||||
|
case '200%':
|
||||||
|
iRate = 2;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
$('#rl-bg').vide({
|
$('#rl-bg').vide({
|
||||||
'mp4': window.rl.pluginSettingsGet('video-on-login-screen', 'mp4_file') || '',
|
'mp4': window.rl.pluginSettingsGet('video-on-login-screen', 'mp4_file') || '',
|
||||||
'webm': window.rl.pluginSettingsGet('video-on-login-screen', 'webm_file') || '',
|
'webm': window.rl.pluginSettingsGet('video-on-login-screen', 'webm_file') || '',
|
||||||
'ogv': window.rl.pluginSettingsGet('video-on-login-screen', 'ogv_file') || ''
|
'ogv': window.rl.pluginSettingsGet('video-on-login-screen', 'ogv_file') || ''
|
||||||
}, {
|
}, {
|
||||||
|
playbackRate: iRate,
|
||||||
muted: !!window.rl.pluginSettingsGet('video-on-login-screen', 'muted')
|
muted: !!window.rl.pluginSettingsGet('video-on-login-screen', 'muted')
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue