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
Make asset paths relative so that vidat does not need to be installed in the root directory of a webserver. E.g., src="/assets/index.fa81e040.js" becomes src="./assets/index.fa81e040.js"
The text was updated successfully, but these errors were encountered:
We pass the URL into the worker, and use fetch to load the files.
The URL can be in any format since it is passed via URL parameter by user.
So, it can be
http/https/ftp://example.com/video.mp4
or absolute path
/vidat/video/example.mp4
or relative path
video/example.mp4
For relative path, the worker's full path will start with /vidat/assets, e.g., video/example.mp4 -> /vidat/assets/video/example.mp4.
Solution
Redirect to parent directory: (new URL(<path to video>, new URL('../', event.target.location)).href).
Still won't work in situation C, because it starts with /vidat/src/work, but never mind.
Router
Solution
As we are using History API for frontend routing, the router uses the url for routing, so in situation B, e.g. the main route does not match. / != /vidat/
Besides that, nginx needs to have extra config to support user refresh.
location / {
try_files $uri $uri/ /index.html;
}
Unfortunately, there is no workaround without modifying the nginx config.
Therefore, just fallback with traditional hash history.
Make asset paths relative so that vidat does not need to be installed in the root directory of a webserver. E.g.,
src="/assets/index.fa81e040.js"
becomessrc="./assets/index.fa81e040.js"
The text was updated successfully, but these errors were encountered: