For an upcoming art exhibition, I have a video installation that consists of large videos (several GBs) and an online hosted web application.
To conserve bandwidth during the exhibition, I am considering packaging the videos into an electron app. This way, the webpage can be loaded once during startup, and the videos can then be accessed from the local filesystem or the packaged electron app.
I have successfully disabled webSecurity (as this is a private application), but I am encountering an error message in the JavaScript console:
GET file:///idle.mp4 net::ERR_FILE_NOT_FOUND
.
I am struggling to find the correct path or folder structure to reference the local files. Could you provide any guidance on how to achieve this? It is important to note that using a fixed or absolute filepath is not feasible since the online server does not have access to the local filepath.
I have attempted placing the video files in both the main and renderer folders, but it has not resolved the issue and the error message persists. Thank you for your help!
The current method of referencing the videos in my web application is as follows:
<video id="id12">
<source src="file:///ship.mp4" type="video/mp4"></source>
</video>
Here is the folder structure I am working with: https://i.sstatic.net/ZG7Wz.png