diff --git a/public/manifest.json b/public/manifest.json index 8d4df38..4c7675d 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -1,7 +1,7 @@ { "name": "Watch Party", "short_name": "WP", - "version": "1.0.2", + "version": "1.1.0", "description": "Watch streamed content together.", "background": { "page": "popup.html" diff --git a/src/Chat.js b/src/Chat.js index feeea65..ac98bfe 100644 --- a/src/Chat.js +++ b/src/Chat.js @@ -97,6 +97,9 @@ export default class Chat extends Component { // DONE WITH MOUNTING TASKS this.props.updateLoading(false); } + componentWillUnmount() { + this.mVideoListener.end(); + } videoEventListener(video) { this.syncPlayer(video); } diff --git a/src/VideoListener.js b/src/VideoListener.js index 0f22861..36bb79a 100644 --- a/src/VideoListener.js +++ b/src/VideoListener.js @@ -62,7 +62,10 @@ export default class VideoListener { window.postMessage({ type: 'SEEK', time: serverPlayer.time * 1000 }, '*'); break; case PLAYER_SOURCE.AMAZON: - if (this.video.status === PLAYER_STATUS.PAUSED) await this.video.element.play(); + if (this.video.status === PLAYER_STATUS.PAUSED) + await this.video.element + .play() + .catch((err) => console.error('WatchParty erred when syncing time.')); this.video.element.currentTime = serverPlayer.time; await this.timeout(500); break; @@ -80,7 +83,9 @@ export default class VideoListener { await this.video.element.pause(); break; case PLAYER_STATUS.PLAYING: - await this.video.element.play(); + await this.video.element + .play() + .catch((err) => console.error('WatchParty erred when syncing play.')); break; default: break; @@ -246,4 +251,10 @@ export default class VideoListener { break; } } + end() { + if (this.video.element) { + this.video.element.removeEventListener('playing', this.onplay); + this.video.element.removeEventListener('pause', this.onpause); + } + } } diff --git a/website/index.html b/website/index.html index ddf1c67..65625a4 100644 --- a/website/index.html +++ b/website/index.html @@ -61,8 +61,11 @@
Watch Party Intro -

Watch your favorites on Netflix, Hulu & Amazon Prime with your favorite people

- Disney+ And More Coming Soon. +

+ Watch your favorites on Netflix, Disney+, Amazon Prime, & Hulu (Beta) with your favorite + people +

+ More Coming Soon.