Skip to content

Commit

Permalink
add await to this.surface.play() (#648)
Browse files Browse the repository at this point in the history
  • Loading branch information
pholawat-tle authored Jan 22, 2023
1 parent d28c09a commit 4d384a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/camera/core-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ class RenderedCameraImpl implements RenderedCamera {

this.surface.addEventListener("playing", onVideoStart);
this.surface.srcObject = this.mediaStream;
this.surface.play();
return this.surface.play();
}

static async create(
Expand All @@ -205,7 +205,7 @@ class RenderedCameraImpl implements RenderedCamera {
aspectRatioConstraint);
}

renderedCamera.setupSurface();
await renderedCamera.setupSurface();
return renderedCamera;
}

Expand Down

0 comments on commit 4d384a0

Please sign in to comment.