Closed par5ul1 closed 8 months ago
I have opened a PR to address this, and I tested it to the best of my ability.
Also happens when the document has been loaded with the file:
protocol.
Minimal reproduction: https://github.com/mateusrachid/remotion-location-origin-issue
When loading a
<Player />
from an iframe with a srcdoc,window.location.origin
will return'null'
. This is used, among other functions, ingetAbsoluteSrc
.This issue was first observed by me when attempting to use the
<Video />
component with an absolute url. The project renders properly via SSR, but in my sandboxed iframe environment, I got the following error:Proposed fix is to use
window.origin
instead ofwindow.location.origin
. See: https://html.spec.whatwg.org/multipage/webappapis.html#dom-origin-dev