v1.7.6/version bump

- add hotstar support
- add hotstar to website
This commit is contained in:
2020-09-15 23:56:04 -04:00
parent 19e3961912
commit e578ea0240
21 changed files with 366 additions and 14 deletions
+2
View File
@@ -39,6 +39,7 @@ export const PLAYER_SOURCE = {
FUNIMATION: 'funimation.',
ROOSTERTEETH: 'roosterteeth.',
STAN: 'stan.',
HOTSTAR: 'hotstar.',
LOCAL: 'localhost',
};
@@ -60,6 +61,7 @@ export const getPlayerSource = () => {
if (HREF.includes(PLAYER_SOURCE.FUNIMATION)) return PLAYER_SOURCE.FUNIMATION;
if (HREF.includes(PLAYER_SOURCE.ROOSTERTEETH)) return PLAYER_SOURCE.ROOSTERTEETH;
if (HREF.includes(PLAYER_SOURCE.STAN)) return PLAYER_SOURCE.STAN;
if (HREF.includes(PLAYER_SOURCE.HOTSTAR)) return PLAYER_SOURCE.HOTSTAR;
if (HREF.includes(PLAYER_SOURCE.LOCAL)) return PLAYER_SOURCE.LOCAL;
};
+1 -1
View File
@@ -27,7 +27,7 @@ import {
} from './Api';
import Tutorial from './Tutorial';
const APP_VERSION = '1.7.5';
const APP_VERSION = '1.7.6';
const APP_VERSION_STRING = APP_VERSION.replace(/\./g, '');
const darkTheme = createMuiTheme({
+24
View File
@@ -174,6 +174,9 @@ export default class VideoListener {
case PLAYER_SOURCE.STAN:
this.video.element.currentTime = serverPlayer.time;
break;
case PLAYER_SOURCE.HOTSTAR:
this.video.element.currentTime = serverPlayer.time;
break;
default:
break;
}
@@ -364,6 +367,14 @@ export default class VideoListener {
const stanShow = stanShowContainer ? stanShowContainer.innerHTML : '';
const stanEpisode = stanEpisodeContainer ? stanEpisodeContainer.innerHTML : '';
return stanShow === '' && stanEpisode === '' ? null : stanShow + '\n' + stanEpisode;
case PLAYER_SOURCE.HOTSTAR:
const hotstarShowContainer = document.querySelector(nS.show);
const hotstarEpisodeContainer = document.querySelector(nS.episode);
const hotstarShow = hotstarShowContainer ? hotstarShowContainer.innerText : '';
const hotstarEpisode = hotstarEpisodeContainer ? hotstarEpisodeContainer.innerText : '';
return hotstarShow === '' && hotstarEpisode === ''
? null
: hotstarShow + '\n' + hotstarEpisode;
default:
break;
}
@@ -781,6 +792,19 @@ export default class VideoListener {
}, 1000);
}
break;
case PLAYER_SOURCE.HOTSTAR:
const hotstarVideoElement = document.querySelector(this.selectors[PLAYER_SOURCE.HOTSTAR]);
if (hotstarVideoElement) {
this.firstTimeSync(hotstarVideoElement);
} else {
setInterval(() => {
var hsve = document.querySelector(this.selectors[PLAYER_SOURCE.HOTSTAR]);
if (hsve && !this.video.element && this.video.element !== hsve) {
this.firstTimeSync(hsve);
}
}, 1000);
}
break;
default:
break;
}
+12 -1
View File
@@ -81,7 +81,8 @@ body.hulu #party_wrapper *,
body.peacock #party_wrapper *,
body.disney #party_wrapper *,
body.apple #party_wrapper *,
body.funimation #party_wrapper * {
body.funimation #party_wrapper *,
body.hotstar #party_wrapper * {
box-sizing: inherit;
}
@@ -314,6 +315,16 @@ body.stan .party-content-wrapper input {
padding-bottom: 10.5px;
height: initial;
}
/* HOTSTAR */
body.hotstar.visible .header {
max-width: var(--body-width);
z-index: 9999 !important;
}
body.hotstar .party-content-wrapper input,
body.hotstar .party-content-wrapper textarea {
background: transparent !important;
height: initial !important;
}
#party-loading {
position: absolute;
+3
View File
@@ -120,6 +120,9 @@ switch (getPlayerSource()) {
case PLAYER_SOURCE.STAN:
document.body.classList.add('stan');
break;
case PLAYER_SOURCE.HOTSTAR:
document.body.classList.add('hotstar');
break;
case PLAYER_SOURCE.LOCAL:
document.body.classList.add('local');
break;