diff --git a/app/src/Api.js b/app/src/Api.js index 1764ca4..2977b0a 100644 --- a/app/src/Api.js +++ b/app/src/Api.js @@ -11,26 +11,26 @@ export const PLAYER_STATUS = { }; export const PLAYER_SOURCE = { - NETFLIX: 'https://www.netflix.', - AMAZON: 'https://www.amazon.', - HULU: 'https://www.hulu.', - DISNEY: 'https://www.disneyplus.', - YOUTUBE: 'https://www.youtube.', - HBONOW: 'https://play.hbonow.', - HBOMAX: 'https://play.hbomax.', - LOCAL: 'http://localhost', + NETFLIX: 'netflix.', + AMAZON: 'amazon.', + HULU: 'hulu.', + DISNEY: 'disneyplus.', + YOUTUBE: 'youtube.', + HBONOW: 'hbonow.', + HBOMAX: 'hbomax.', + LOCAL: 'localhost', }; export const getPlayerSource = () => { const HREF = window.location.href; - if (HREF.startsWith(PLAYER_SOURCE.NETFLIX)) return PLAYER_SOURCE.NETFLIX; - if (HREF.startsWith(PLAYER_SOURCE.HULU)) return PLAYER_SOURCE.HULU; - if (HREF.startsWith(PLAYER_SOURCE.AMAZON)) return PLAYER_SOURCE.AMAZON; - if (HREF.startsWith(PLAYER_SOURCE.DISNEY)) return PLAYER_SOURCE.DISNEY; - if (HREF.startsWith(PLAYER_SOURCE.YOUTUBE)) return PLAYER_SOURCE.YOUTUBE; - if (HREF.startsWith(PLAYER_SOURCE.HBONOW)) return PLAYER_SOURCE.HBONOW; - if (HREF.startsWith(PLAYER_SOURCE.HBOMAX)) return PLAYER_SOURCE.HBOMAX; - if (HREF.startsWith(PLAYER_SOURCE.LOCAL)) return PLAYER_SOURCE.LOCAL; + if (HREF.includes(PLAYER_SOURCE.NETFLIX)) return PLAYER_SOURCE.NETFLIX; + if (HREF.includes(PLAYER_SOURCE.HULU)) return PLAYER_SOURCE.HULU; + if (HREF.includes(PLAYER_SOURCE.AMAZON)) return PLAYER_SOURCE.AMAZON; + if (HREF.includes(PLAYER_SOURCE.DISNEY)) return PLAYER_SOURCE.DISNEY; + if (HREF.includes(PLAYER_SOURCE.YOUTUBE)) return PLAYER_SOURCE.YOUTUBE; + if (HREF.includes(PLAYER_SOURCE.HBONOW)) return PLAYER_SOURCE.HBONOW; + if (HREF.includes(PLAYER_SOURCE.HBOMAX)) return PLAYER_SOURCE.HBOMAX; + if (HREF.includes(PLAYER_SOURCE.LOCAL)) return PLAYER_SOURCE.LOCAL; }; export const LocalData = () => { diff --git a/app/src/App.js b/app/src/App.js index bf0d0ae..7ce0bcc 100644 --- a/app/src/App.js +++ b/app/src/App.js @@ -8,7 +8,7 @@ import 'firebase/firestore'; import Inactive from './Inactive'; import { getUserUid } from './Api'; -const APP_VERSION = '1.3.2'; +const APP_VERSION = '1.3.3'; const darkTheme = createMuiTheme({ palette: { diff --git a/app/src/Create.js b/app/src/Create.js index d4433eb..60d43b1 100644 --- a/app/src/Create.js +++ b/app/src/Create.js @@ -41,6 +41,7 @@ export default class Create extends Component { if (value.length <= CONSTANTS.USER_NAME_LENGTH) this.setState({ userName: value }); } createOrJoin() { + this.props.updateLoading(true); const { userName, name, pin, mode } = this.state; if (!userName.replace(/\s+/g, '')) { this.props.notify('Missing user name'); diff --git a/app/src/VideoListener.js b/app/src/VideoListener.js index 903c4f4..edfd598 100644 --- a/app/src/VideoListener.js +++ b/app/src/VideoListener.js @@ -45,11 +45,11 @@ export default class VideoListener { } } async doUpdate(serverPlayer) { - this.server = serverPlayer; if ( this.isUpdating === false && serverPlayer.showName === this.video.showName && - serverPlayer.updatedBy !== LocalData().userUid + serverPlayer.updatedBy !== LocalData().userUid && + (this.server ? this.server.time !== serverPlayer.time : true) ) { this.isUpdating = true; if (this.video.element) { @@ -123,6 +123,7 @@ export default class VideoListener { this.video.element.addEventListener('pause', this.onpause); } this.isUpdating = false; + this.server = serverPlayer; } } timeout(n) { diff --git a/app/src/index.css b/app/src/index.css index d11dbe2..1c01642 100644 --- a/app/src/index.css +++ b/app/src/index.css @@ -1,6 +1,6 @@ :root { - --party-width: 350px; - --neg-party-width: -350px; + --party-width: 400px; + --neg-party-width: -400px; --body-width: calc(100% - var(--party-width)); } body { @@ -68,9 +68,9 @@ body.youtube.visible td-two-column-browse-results-renderer.grid:not(.grid-disabl max-width: calc(100% - 48px); } /* AMAZON STYLING FIX */ -body.amazon-prime input, -body.amazon-prime textarea { - background-color: inherit !important; +body.amazon-prime #party-routes-wrapper input, +body.amazon-prime #party-routes-wrapper textarea { + background-color: transparent !important; border: initial !important; box-shadow: none !important; } @@ -89,7 +89,6 @@ body.amazon-prime textarea:focus { border: none !important; box-shadow: none !important; } - #party-loading { position: absolute; width: 100%; @@ -101,6 +100,7 @@ body.amazon-prime textarea:focus { left: 0; align-items: center; justify-content: center; + box-sizing: content-box; } #party-loading.inactive { flex-direction: column;