Various cleanups

This commit is contained in:
Hampton Maxwell 2018-09-28 17:07:38 -07:00 committed by Hampton Maxwell
parent 8bda6546e8
commit 1be0db4777

View File

@ -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) {