v1.1.0-beta/version update, play err catch
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
+13
-2
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+5
-2
@@ -61,8 +61,11 @@
|
||||
<section data-page="2">
|
||||
<div class="page">
|
||||
<img src="./intro.gif" alt="Watch Party Intro" />
|
||||
<p>Watch your favorites on Netflix, Hulu & Amazon Prime with your favorite people</p>
|
||||
<mark>Disney+ And More Coming Soon.</mark>
|
||||
<p>
|
||||
Watch your favorites on Netflix, Disney+, Amazon Prime, & Hulu (Beta) with your favorite
|
||||
people
|
||||
</p>
|
||||
<mark>More Coming Soon.</mark>
|
||||
</div>
|
||||
</section>
|
||||
<section data-page="3">
|
||||
|
||||
Reference in New Issue
Block a user