v1.6.4/add and fix

-fix chat bug
-add viki
-fix apple tv+
This commit is contained in:
2020-08-28 12:18:35 -04:00
parent f779c1fc90
commit b5a9c8db64
7 changed files with 76 additions and 25 deletions
+26 -16
View File
@@ -110,24 +110,34 @@ const App = () => {
if (visible) {
document.body.classList.add('visible');
PartyRoutesWrapper && PartyRoutesWrapper.classList.add('visible');
if (
!hasAttached &&
(getPlayerSource() === PLAYER_SOURCE.HBOMAX || getPlayerSource() === PLAYER_SOURCE.HBONOW)
) {
document.addEventListener(
'mousedown',
function (ev) {
if (document.body.querySelector('body.visible')) {
ev.preventDefault();
ev.stopPropagation();
ev.stopImmediatePropagation();
}
},
{ capture: true }
);
hasAttached = true;
if (getPlayerSource() === PLAYER_SOURCE.HBOMAX || getPlayerSource() === PLAYER_SOURCE.HBONOW) {
setTutorialComplete(true);
if (!hasAttached) {
document.addEventListener(
'mousedown',
function (ev) {
if (document.body.querySelector('body.visible')) {
ev.preventDefault();
ev.stopPropagation();
ev.stopImmediatePropagation();
}
},
{ capture: true }
);
hasAttached = true;
}
}
if (getPlayerSource() === PLAYER_SOURCE.APPLE) {
const appleTvPlayer = document.querySelector('apple-tv-plus-player');
const takeoverContainer = appleTvPlayer.shadowRoot.querySelector('.takeover.container.show');
if (takeoverContainer) takeoverContainer.style.maxWidth = 'var(--body-width)';
}
} else {
if (getPlayerSource() === PLAYER_SOURCE.APPLE) {
const appleTvPlayer = document.querySelector('apple-tv-plus-player');
const takeoverContainer = appleTvPlayer.shadowRoot.querySelector('.takeover.container.show');
if (takeoverContainer) takeoverContainer.style.maxWidth = 'none';
}
document.body.classList.remove('visible');
PartyRoutesWrapper && PartyRoutesWrapper.classList.remove('visible');
}