join us on Discord for support, updates, and all things Snap AR! See you there!
Video won't load on Web
Hi! I've been trying to add a video to a lens, and while it works fine on Snapchat, it doesn't show up as a Hosted WebAR lens or in CameraKit Web.
Here's test snapcode where the video is loading
And here's the Hosted WebAR link:
Here's the error in on the web console:
Refused to load media from 'blob:https://lens.snap.com/8b170e00-9ada-46d1-b90d-6941cd029fa8' because it violates the following Content Security Policy directive: "media-src 'self' https://*.googleapis.com".
dd022776-442d-4a41-87f4-bfa4fd7ca55f:1 Uncaught (in promise) DOMException: Failed to load because no supported source was found.
Please help!
Answers
-
https://www.dropbox.com/scl/fi/vgvytcpv86m7n4fviosjo/videotest.zip?rlkey=m6bqanvf4p28yue28z7okaxpw&st=g3zgaq8q&dl=0 here's the project (blank with just a video)
0 -
It looks like the Content Security Policy (CSP) is blocking the media source. You need to update the CSP to include the blob URL where the video is hosted. Add blob: to the media-src directive in your CSP settings. This should allow the video to load correctly.
0