diff --git a/src/camera/core-impl.ts b/src/camera/core-impl.ts index 16b36dc..eea2bf3 100644 --- a/src/camera/core-impl.ts +++ b/src/camera/core-impl.ts @@ -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( @@ -205,7 +205,7 @@ class RenderedCameraImpl implements RenderedCamera { aspectRatioConstraint); } - renderedCamera.setupSurface(); + await renderedCamera.setupSurface(); return renderedCamera; }