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