Various cleanups
This commit is contained in:
parent
8bda6546e8
commit
1be0db4777
@ -41,6 +41,7 @@ class RCTVideo extends RCTView {
|
|||||||
this.muted = false;
|
this.muted = false;
|
||||||
this.rate = 1.0;
|
this.rate = 1.0;
|
||||||
this.volume = 1.0;
|
this.volume = 1.0;
|
||||||
|
this.videoElement.autoplay = true;
|
||||||
this.childContainer.appendChild(this.videoElement);
|
this.childContainer.appendChild(this.videoElement);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -97,7 +98,7 @@ class RCTVideo extends RCTView {
|
|||||||
if (value) {
|
if (value) {
|
||||||
this.videoElement.pause();
|
this.videoElement.pause();
|
||||||
} else {
|
} else {
|
||||||
this.playPromise = this.videoElement.play().catch(console.error);
|
this.playPromise = this.videoElement.play();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this._paused = value;
|
this._paused = value;
|
||||||
@ -106,7 +107,9 @@ class RCTVideo extends RCTView {
|
|||||||
set progressUpdateInterval(value: number) {
|
set progressUpdateInterval(value: number) {
|
||||||
this._progressUpdateInterval = value;
|
this._progressUpdateInterval = value;
|
||||||
this.stopProgressTimer();
|
this.stopProgressTimer();
|
||||||
this.startProgressTimer();
|
if (!this._paused) {
|
||||||
|
this.startProgressTimer();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
set rate(value: number) {
|
set rate(value: number) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user