renamed onVisible to resumePlayerOnVisible to indicate its a boolean
This commit is contained in:
parent
a01a7a8392
commit
c06838b67f
|
@ -7,7 +7,7 @@ import * as helper from '../utils/helpers';
|
||||||
|
|
||||||
const SCREENSHOT_TOOLTIP_ID = 'anilyr-screenshots-tooltip';
|
const SCREENSHOT_TOOLTIP_ID = 'anilyr-screenshots-tooltip';
|
||||||
const PLAYER_ID = 'player';
|
const PLAYER_ID = 'player';
|
||||||
let onVisible: boolean;
|
let resumePlayerOnVisible: boolean;
|
||||||
|
|
||||||
export function init(): void {
|
export function init(): void {
|
||||||
getGlobalConfiguration().getProperty(SETTINGS_playerAutoplayAfterScreenshot, value => {
|
getGlobalConfiguration().getProperty(SETTINGS_playerAutoplayAfterScreenshot, value => {
|
||||||
|
@ -30,7 +30,7 @@ export function init(): void {
|
||||||
});
|
});
|
||||||
|
|
||||||
getGlobalConfiguration().getProperty(SETTINGS_playerAutoplayAfterFocusGain, value => {
|
getGlobalConfiguration().getProperty(SETTINGS_playerAutoplayAfterFocusGain, value => {
|
||||||
onVisible = value;
|
resumePlayerOnVisible = value;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ function observeTabFocus(): void {
|
||||||
pausePlayer(playerElement);
|
pausePlayer(playerElement);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (docState === 'visible' && onVisible) {
|
else if (docState === 'visible' && resumePlayerOnVisible) {
|
||||||
if (helper.assigned(playerElement)) {
|
if (helper.assigned(playerElement)) {
|
||||||
resumePlayer(playerElement);
|
resumePlayer(playerElement);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue