v1.3.3-beta/Fix styling, loading, time back sync
This commit is contained in:
+16
-16
@@ -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 = () => {
|
||||
|
||||
+1
-1
@@ -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: {
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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) {
|
||||
|
||||
+6
-6
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user