Hi, I’ve been exploring the layers API’s capabilities, mostly utilizing the sample apps.
I’m curious, has anybody been able to get an HTML video element to play in the camera mode webview?
I tried both autoplay (with muted), which works on the sidebar but not in camera view, and I also tried triggering dynamically via Javascript with .play().
To be clear, I don’t need audio to also send through, but it would be really nice if the video actually worked. Does the camera view do something special here that disables video or am I missing something?
I started from zoomapps-cameramode-vuejs and just loaded a standard 10 second video.
@micah thanks for the video, I just confirmed I have the same issue trying to play an mp4 video in Camera Mode.
Maybe it’s something like the Content-Security-Policy, since the sidebar uses WKWebView (Safari / Edge) but Camera Mode uses Chrome (CEF), so they process things like this differently. It definitely looks like a bug.
Also on my server I see it make two hits to the trailer.mp4 file when I call runRenderingContext, so I know the browser is getting it, but not why it’s not loading it.
Yeah, I played with the CSP a little bit, but in the camera mode sample Vue JS mode the dev server can actually set the CSP headers. As a result, I was able to get it both working and not working in the sidebar, so I think my CSP headers should be set fine because I verified them going from not working to working. While it’s definitely a possibility I did something wrong and chromium may handle things differently (and it could be double checked), I think the bug or issue might be something else. Please someone else correct me if I’m wrong though.
Curious, do you think a Zoom engineer internally could somehow boot the CEF with the devtools enabled using remote debugging/port forwarding and just get an error message from CEF from your sample code? https://groups.google.com/g/cefglue/c/dJw54PcVe5I?pli=1 has an example of that; might be out of date but looks like that kind of thing might be possible?
I think knowing the exact error here would be incredibly helpful for deciding what potentially next to pursue in terms of trying to get this kind of thing working.
Currently camera mode is difficult to debug because there aren’t logs/devtools that we can see.
Changing from .mp4 to .webm fixed the issue. It turns out that CEF doesn’t support mp4 as noted above. I re-encoded the video from .mp4 to .webm and it works now.
ffmpeg -i trailer.mp4 trailer.webm
Then changed the video src to the webm file and removed the type attribute.
Thanks for looking into this everyone and for the quick responses. Really cool to see it was literally just the file format/codec, and nice find on the CEF limitation there.