v1.7.10/version change, add google drive support
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "watch-party-admin",
|
"name": "watch-party-admin",
|
||||||
"version": "1.7.9",
|
"version": "1.7.10",
|
||||||
"private": true,
|
"private": true,
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@ant-design/icons": "^4.2.2",
|
"@ant-design/icons": "^4.2.2",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "watch-party-crx",
|
"name": "watch-party-crx",
|
||||||
"version": "1.7.9",
|
"version": "1.7.10",
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {},
|
"dependencies": {},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ try {
|
|||||||
console.info("CHROME ENV");
|
console.info("CHROME ENV");
|
||||||
}
|
}
|
||||||
|
|
||||||
const APP_VERSION = "1.7.9";
|
const APP_VERSION = "1.7.10";
|
||||||
const APP_VERSION_STRING = APP_VERSION.replace(/\./g, "");
|
const APP_VERSION_STRING = APP_VERSION.replace(/\./g, "");
|
||||||
|
|
||||||
const firebaseConfig = {
|
const firebaseConfig = {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "Watch Party",
|
"name": "Watch Party",
|
||||||
"short_name": "WP",
|
"short_name": "WP",
|
||||||
"version": "1.7.9",
|
"version": "1.7.10",
|
||||||
"description": "Watch streamed content together.",
|
"description": "Watch streamed content together.",
|
||||||
"background": {
|
"background": {
|
||||||
"page": "background.html"
|
"page": "background.html"
|
||||||
@@ -47,6 +47,7 @@
|
|||||||
"https://*.airtelxstream.in/*",
|
"https://*.airtelxstream.in/*",
|
||||||
"https://*.vimeo.com/*",
|
"https://*.vimeo.com/*",
|
||||||
"https://*.dailymotion.com/*",
|
"https://*.dailymotion.com/*",
|
||||||
|
"https://drive.google.com/*",
|
||||||
"https://api.giphy.com/*",
|
"https://api.giphy.com/*",
|
||||||
"https://*.voxeet.com/*"
|
"https://*.voxeet.com/*"
|
||||||
],
|
],
|
||||||
@@ -89,7 +90,8 @@
|
|||||||
"https://*.hotstar.com/*",
|
"https://*.hotstar.com/*",
|
||||||
"https://*.airtelxstream.in/*",
|
"https://*.airtelxstream.in/*",
|
||||||
"https://*.vimeo.com/*",
|
"https://*.vimeo.com/*",
|
||||||
"https://*.dailymotion.com/*"
|
"https://*.dailymotion.com/*",
|
||||||
|
"https://drive.google.com/*"
|
||||||
],
|
],
|
||||||
"run_at": "document_idle",
|
"run_at": "document_idle",
|
||||||
"js": ["/static/js/content.js"],
|
"js": ["/static/js/content.js"],
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ export const PLAYER_SOURCE = {
|
|||||||
AIRTEL: "airtelxstream.",
|
AIRTEL: "airtelxstream.",
|
||||||
VIMEO: "vimeo.",
|
VIMEO: "vimeo.",
|
||||||
DAILYMOTION: "dailymotion.",
|
DAILYMOTION: "dailymotion.",
|
||||||
|
GOOGLEDRIVE: "drive.google.",
|
||||||
LOCAL: "localhost",
|
LOCAL: "localhost",
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -71,6 +72,8 @@ export const getPlayerSource = () => {
|
|||||||
if (HREF.includes(PLAYER_SOURCE.VIMEO)) return PLAYER_SOURCE.VIMEO;
|
if (HREF.includes(PLAYER_SOURCE.VIMEO)) return PLAYER_SOURCE.VIMEO;
|
||||||
if (HREF.includes(PLAYER_SOURCE.DAILYMOTION))
|
if (HREF.includes(PLAYER_SOURCE.DAILYMOTION))
|
||||||
return PLAYER_SOURCE.DAILYMOTION;
|
return PLAYER_SOURCE.DAILYMOTION;
|
||||||
|
if (HREF.includes(PLAYER_SOURCE.GOOGLEDRIVE))
|
||||||
|
return PLAYER_SOURCE.GOOGLEDRIVE;
|
||||||
if (HREF.includes(PLAYER_SOURCE.LOCAL)) return PLAYER_SOURCE.LOCAL;
|
if (HREF.includes(PLAYER_SOURCE.LOCAL)) return PLAYER_SOURCE.LOCAL;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -34,7 +34,7 @@ import {
|
|||||||
} from "./Api";
|
} from "./Api";
|
||||||
import Tutorial from "./Tutorial";
|
import Tutorial from "./Tutorial";
|
||||||
|
|
||||||
const APP_VERSION = "1.7.9";
|
const APP_VERSION = "1.7.10";
|
||||||
const APP_VERSION_STRING = APP_VERSION.replace(/\./g, "");
|
const APP_VERSION_STRING = APP_VERSION.replace(/\./g, "");
|
||||||
|
|
||||||
const darkTheme = createMuiTheme({
|
const darkTheme = createMuiTheme({
|
||||||
|
|||||||
@@ -143,6 +143,7 @@ export default class VideoListener {
|
|||||||
case PLAYER_SOURCE.CRUNCHYROLL:
|
case PLAYER_SOURCE.CRUNCHYROLL:
|
||||||
case PLAYER_SOURCE.FUNIMATION:
|
case PLAYER_SOURCE.FUNIMATION:
|
||||||
case PLAYER_SOURCE.ROOSTERTEETH:
|
case PLAYER_SOURCE.ROOSTERTEETH:
|
||||||
|
case PLAYER_SOURCE.GOOGLEDRIVE:
|
||||||
window.postMessage(
|
window.postMessage(
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
watchPartyDirection: "TO_SCRIPT",
|
watchPartyDirection: "TO_SCRIPT",
|
||||||
@@ -175,7 +176,8 @@ export default class VideoListener {
|
|||||||
PLAYER_SOURCE.HULU === this.video.source ||
|
PLAYER_SOURCE.HULU === this.video.source ||
|
||||||
PLAYER_SOURCE.NETFLIX === this.video.source ||
|
PLAYER_SOURCE.NETFLIX === this.video.source ||
|
||||||
PLAYER_SOURCE.HBOMAX === this.video.source ||
|
PLAYER_SOURCE.HBOMAX === this.video.source ||
|
||||||
PLAYER_SOURCE.HBONOW === this.video.source
|
PLAYER_SOURCE.HBONOW === this.video.source ||
|
||||||
|
PLAYER_SOURCE.GOOGLEDRIVE === this.video.source
|
||||||
) {
|
) {
|
||||||
if (
|
if (
|
||||||
serverPlayer.status === PLAYER_STATUS.PAUSED ||
|
serverPlayer.status === PLAYER_STATUS.PAUSED ||
|
||||||
@@ -500,6 +502,38 @@ export default class VideoListener {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case PLAYER_SOURCE.GOOGLEDRIVE:
|
||||||
|
const googleDriveInject = `var watchPartyInteraction=function(e){const data=JSON.parse(e.data);const player=document.querySelector("${vS}").contentWindow.document.querySelector('video');if(player){if(data.watchPartyDirection==='TO_SCRIPT'){if(data.type==='WATCH_PARTY_SEEK'){player.currentTime(data.time)}else if(data.type==='WATCH_PARTY_STATUS'){if(data.status==='PAUSED')player.pause();if(data.status==='PLAYING')player.play()}}}};window.addEventListener("message",watchPartyInteraction);`;
|
||||||
|
const googleDriveInjectScript = document.createElement("script");
|
||||||
|
googleDriveInjectScript.text = googleDriveInject;
|
||||||
|
document.head.appendChild(googleDriveInjectScript);
|
||||||
|
const googleDrivePlayerIframe = document.querySelector(vS);
|
||||||
|
if (googleDrivePlayerIframe) {
|
||||||
|
const googleDrivePlayer = googleDrivePlayerIframe.contentWindow.document.querySelector(
|
||||||
|
"video"
|
||||||
|
);
|
||||||
|
if (googleDrivePlayer) {
|
||||||
|
this.firstTimeSync(googleDrivePlayerIframe);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
setInterval(
|
||||||
|
this.video.element
|
||||||
|
? null
|
||||||
|
: () => {
|
||||||
|
const gdif = document.querySelector(vS);
|
||||||
|
if (gdif) {
|
||||||
|
const gdp = gdif.contentWindow.document.querySelector(
|
||||||
|
"video"
|
||||||
|
);
|
||||||
|
if (gdp) {
|
||||||
|
this.firstTimeSync(gdif);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
1000
|
||||||
|
);
|
||||||
|
}
|
||||||
|
break;
|
||||||
case PLAYER_SOURCE.CRUNCHYROLL:
|
case PLAYER_SOURCE.CRUNCHYROLL:
|
||||||
const crunchyRollInject = `var sendToWatchPartyApp = function(pS, pT) { var customWatchPartyEvent = new CustomEvent('watchParty', { detail: { watchPartyDirection: 'TO_APP', type: 'WATCH_PARTY_PLAYER_UPDATE', status: pS, time: pT } }); window.dispatchEvent(customWatchPartyEvent); }, watchPartyGetTimeAndSend = function(pS) { if (window.VILOS_PLAYERJS) { window.VILOS_PLAYERJS.getCurrentTime(function(pT) { sendToWatchPartyApp(pS, pT); }); } }, watchPartySendPlaying = function() { watchPartyGetTimeAndSend('PLAYING'); }, watchPartySendPaused = function() { watchPartyGetTimeAndSend('PAUSED'); }, watchPartyInteraction = function(e) { if (e.source === window) { const data = JSON.parse(e.data); if (data.watchPartyDirection === 'TO_SCRIPT') { if (data.type === 'WATCH_PARTY_ADD_LISTENERS') { if (window.VILOS_PLAYERJS) { window.VILOS_PLAYERJS.on('play', watchPartySendPlaying, 'player.js'); window.VILOS_PLAYERJS.on('pause', watchPartySendPaused, 'player.js'); } } else if (data.type === 'WATCH_PARTY_SEEK') { if (window.VILOS_PLAYERJS) { window.VILOS_PLAYERJS.setCurrentTime(data.time); } } else if (data.type === 'WATCH_PARTY_STATUS') { if (window.VILOS_PLAYERJS) { if (data.status === 'PAUSED') window.VILOS_PLAYERJS.pause(); if (data.status === 'PLAYING') window.VILOS_PLAYERJS.play(); } } } } }; window.addEventListener("message", watchPartyInteraction);`;
|
const crunchyRollInject = `var sendToWatchPartyApp = function(pS, pT) { var customWatchPartyEvent = new CustomEvent('watchParty', { detail: { watchPartyDirection: 'TO_APP', type: 'WATCH_PARTY_PLAYER_UPDATE', status: pS, time: pT } }); window.dispatchEvent(customWatchPartyEvent); }, watchPartyGetTimeAndSend = function(pS) { if (window.VILOS_PLAYERJS) { window.VILOS_PLAYERJS.getCurrentTime(function(pT) { sendToWatchPartyApp(pS, pT); }); } }, watchPartySendPlaying = function() { watchPartyGetTimeAndSend('PLAYING'); }, watchPartySendPaused = function() { watchPartyGetTimeAndSend('PAUSED'); }, watchPartyInteraction = function(e) { if (e.source === window) { const data = JSON.parse(e.data); if (data.watchPartyDirection === 'TO_SCRIPT') { if (data.type === 'WATCH_PARTY_ADD_LISTENERS') { if (window.VILOS_PLAYERJS) { window.VILOS_PLAYERJS.on('play', watchPartySendPlaying, 'player.js'); window.VILOS_PLAYERJS.on('pause', watchPartySendPaused, 'player.js'); } } else if (data.type === 'WATCH_PARTY_SEEK') { if (window.VILOS_PLAYERJS) { window.VILOS_PLAYERJS.setCurrentTime(data.time); } } else if (data.type === 'WATCH_PARTY_STATUS') { if (window.VILOS_PLAYERJS) { if (data.status === 'PAUSED') window.VILOS_PLAYERJS.pause(); if (data.status === 'PLAYING') window.VILOS_PLAYERJS.play(); } } } } }; window.addEventListener("message", watchPartyInteraction);`;
|
||||||
const crunchyRollInjectScript = document.createElement("script");
|
const crunchyRollInjectScript = document.createElement("script");
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "watch-party-api",
|
"name": "watch-party-api",
|
||||||
"version": "1.7.9",
|
"version": "1.7.10",
|
||||||
"description": "Cloud Functions for Watch Party",
|
"description": "Cloud Functions for Watch Party",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
|
|||||||
@@ -72,8 +72,12 @@ module.exports = async (req, res) => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
var ids = await roomIdList(roomList);
|
if (roomList.length > 0) {
|
||||||
batchDeleteRooms(ids, ids.length);
|
var ids = await roomIdList(roomList);
|
||||||
|
if (ids.length > 0) {
|
||||||
|
batchDeleteRooms(ids, ids.length);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "watch-party",
|
"name": "watch-party",
|
||||||
"version": "1.7.9",
|
"version": "1.7.10",
|
||||||
"description": "Watch Party",
|
"description": "Watch Party",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "firebase emulators:start",
|
"start": "firebase emulators:start",
|
||||||
|
|||||||
Reference in New Issue
Block a user