You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the latest build (0.10.2) it seems setting the src property of a Video Node causes a url resolution failure when using a relative path to access files inside the public directory.
src=/video.mp4 -> error src=/public/video.mp4 -> error src=http://localhost:9000/public/video.mp4 -> works
This is the error reported inside the editor :
Failed to construct 'URL': Invalid URL
The problem occurred here:
33 | <Video
| ^
34 | src={'/video.mp4'}
35 | play={true}/>
at Video2.video (/node_modules/.vite/deps/chunk-QDB5CW75.js:106083:25)
at ComputedContext.invoke (/node_modules/.vite/deps/chunk-AYLKIJZ5.js:6067:26)
at Video2.mediaElement (/node_modules/.vite/deps/chunk-QDB5CW75.js:106068:17)
at Video2.setVolume (/node_modules/.vite/deps/chunk-QDB5CW75.js:73945:24)
at new Media2 (/node_modules/.vite/deps/chunk-QDB5CW75.js:73900:10)
at new Video2 (/node_modules/.vite/deps/chunk-QDB5CW75.js:106051:5)
at jsx (/node_modules/.vite/deps/chunk-A5ZTJLWB.js:14:18)
at Scene2D.runnerFactory (/src/project.tsx:33:8)
at Thread.next (/node_modules/.vite/deps/chunk-AYLKIJZ5.js:8746:32)
at threads (/node_modules/.vite/deps/chunk-AYLKIJZ5.js:8814:29)
at (/node_modules/.vite/deps/chunk-AYLKIJZ5.js:9331:49)
at Scene2D.execute (/node_modules/.vite/deps/chunk-AYLKIJZ5.js:9425:16)
at Scene2D.next (/node_modules/.vite/deps/chunk-AYLKIJZ5.js:9331:23)
at Scene2D.next (/node_modules/.vite/deps/chunk-QDB5CW75.js:106327:18)
at Scene2D.reset (/node_modules/.vite/deps/chunk-AYLKIJZ5.js:9370:16)
at Scene2D.reset (/node_modules/.vite/deps/chunk-QDB5CW75.js:106353:18)
at Scene2D.recalculate (/node_modules/.vite/deps/chunk-AYLKIJZ5.js:9308:16)
at PlaybackManager.recalculate (/node_modules/.vite/deps/chunk-AYLKIJZ5.js:7540:21)
at Player.prepare (/node_modules/.vite/deps/chunk-AYLKIJZ5.js:8097:29)
at Player.run (/node_modules/.vite/deps/chunk-AYLKIJZ5.js:8118:30)
at (/node_modules/.vite/deps/chunk-AYLKIJZ5.js:8153:22)
How to reproduce
Add a <Video> Node to the scene and try setting src={'/some-file.mp4'}
Versions
Tested on Revideo 0.10.2 (all revideo packages on same version), Chrome 131.0.6778.86, MacOS 14 (arm64)
The text was updated successfully, but these errors were encountered:
rgdev
changed the title
Failed to construct 'URL': Invalid URL wh
Failed to construct 'URL': Invalid URL when using files in /public directory
Dec 6, 2024
rgdev
linked a pull request
Dec 7, 2024
that will
close
this issue
Problem
In the latest build (0.10.2) it seems setting the
src
property of aVideo
Node causes a url resolution failure when using a relative path to access files inside thepublic
directory.src=/video.mp4
-> errorsrc=/public/video.mp4
-> errorsrc=http://localhost:9000/public/video.mp4
-> worksThis is the error reported inside the editor :
How to reproduce
Add a
<Video>
Node to the scene and try settingsrc={'/some-file.mp4'}
Versions
Tested on Revideo 0.10.2 (all revideo packages on same version), Chrome 131.0.6778.86, MacOS 14 (arm64)
The text was updated successfully, but these errors were encountered: