0

I'm serving some static HTML, CSS and JS files and also a folder called tmp with some images and video files using Express.js for my Node app:

app.use(express.static("build"));

app.use(express.static("../tmp"));

When I go to http://localhost:3003, it loads up my app very nicely and it loads all the images on my webpage(located in the tmp folder) but the problem is every video file looks like this:

enter image description here

If I press fullscreen on the video player or even visit the url directly http://localhost:3003/video_1.mp4, it works.

Is this a problem with Express.js trying to stream the video data from the tmp folder? I really don't know how to solve this issue. I tried to delay the playback and use a 3rd party library to play the video but no luck.

jones
  • 585
  • 3
  • 10
  • 30
  • Given the fact your video is effectively acquired by the client, this will most likely be an error with the video player itself. – Azami Jan 15 '19 at 10:24
  • Strange, im just using a native element. Shouldn't that work? – jones Jan 15 '19 at 10:39
  • There is some litterature on the Internet about some .mp4 files not working with the html5 video tag. [Here](https://stackoverflow.com/questions/11588654/why-wont-some-mp4-files-play-via-html5) is some, on StackOveflow. – Azami Jan 15 '19 at 11:00
  • Seems to work when I directly specify the whole path http://localhost:3003/picture.png in src of the video element – jones Jan 18 '19 at 12:47

1 Answers1

0

Seems to work when I directly specify the whole path localhost:3003/picture.png in src of the video element

jones
  • 585
  • 3
  • 10
  • 30