Fix react race condition

This commit is contained in:
Nicolas Mowen 2024-03-14 20:19:04 -06:00
parent e97c445fb9
commit 4b30c5536b

View File

@ -81,7 +81,8 @@ export class DynamicVideoController {
this.playerController.currentTime = seekSeconds; this.playerController.currentTime = seekSeconds;
if (play) { if (play) {
this.playerController.play(); // use timeout to avoid race condition with other data loading
setTimeout(() => this.playerController.play()), 1;
} else { } else {
this.playerController.pause(); this.playerController.pause();
} }