From 1be0db4777cbe5fdb62e7b272940f3a2e851d569 Mon Sep 17 00:00:00 2001 From: Hampton Maxwell Date: Fri, 28 Sep 2018 17:07:38 -0700 Subject: [PATCH] Various cleanups --- dom/RCTVideo.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dom/RCTVideo.js b/dom/RCTVideo.js index db6fc55e..d6842e55 100644 --- a/dom/RCTVideo.js +++ b/dom/RCTVideo.js @@ -41,6 +41,7 @@ class RCTVideo extends RCTView { this.muted = false; this.rate = 1.0; this.volume = 1.0; + this.videoElement.autoplay = true; this.childContainer.appendChild(this.videoElement); } @@ -97,7 +98,7 @@ class RCTVideo extends RCTView { if (value) { this.videoElement.pause(); } else { - this.playPromise = this.videoElement.play().catch(console.error); + this.playPromise = this.videoElement.play(); } }); this._paused = value; @@ -106,7 +107,9 @@ class RCTVideo extends RCTView { set progressUpdateInterval(value: number) { this._progressUpdateInterval = value; this.stopProgressTimer(); - this.startProgressTimer(); + if (!this._paused) { + this.startProgressTimer(); + } } set rate(value: number) {