In my HTML5 projects, the assets I use that I put in an Assets folder end up in an assets folder inside the folder created by the build.
Why does Assets.exists(filename) return false but Assets.exists(assets/filename) return true?
Why does Assets.getPath(filepath) return a string with ?number tacked on the end?
I am using them to try load and play a video file. The code is based on the PlayingVideo example. Locally on my system everything works fine. When on a server with the assets folder placed in a folder named simulation, it doesn’t work.
To make sure that the filepath I use is good, an image file was added to the same folder as the video file. Using simulation/assets/image_name.png, I can successfully load the image. But using simulation/assets/video_name.mp4 gives:
ERROR: There is no asset with an ID of "simulation/assets/video_name.mp4
If I use a nonexistent file name, a standard 404 error is given instead.
What’s the different between a “no asset with an ID of” error and a standard 404 error?
Using Assets.getPath(assets/video_name.mp4 ) returns simulation//assets/video_name.png?125508
Why the // instead just /?
If need be I can post the code for the class I made to load and play a video file.