Skip to content

Commit 620dfa2

Browse files
committed
chore(pronto): don't mute but set a quite low volume
When Pronto runs in a sandboxed mode of Chrome, with puppeteer, the audio track doesn't produce any frames when `video.muted = true`. Instead, we keep in unmuted, but we set quite a low volume. This fixes the issue and is a good tradeoff :)
1 parent 90fddbc commit 620dfa2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sample-apps/react/react-dogfood/components/RemoteFilePublisher.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ export const publishRemoteFile = async (
2828
): Promise<RemoteFilePublisher> => {
2929
const videoElement = document.createElement('video');
3030
videoElement.crossOrigin = 'anonymous';
31-
videoElement.muted = true;
31+
// videoElement.muted = true;
32+
videoElement.volume = 0.001; // otherwise, it doesn't work with puppeteer
3233
videoElement.autoplay = true;
3334
videoElement.loop = true;
3435
videoElement.src = videoFileUrl;

0 commit comments

Comments
 (0)