collab-project / videojs-wavesurfer

video.js plugin that adds a navigable waveform for audio and video files
https://collab-project.github.io/videojs-wavesurfer
MIT License
365 stars 54 forks source link

VIDEOJS: ERROR: Error: HTTP error status: 0 #160

Closed esukmonica closed 2 years ago

esukmonica commented 2 years ago

I have taken the "Wavesurfer Plugin Video Example" and change the video file to be played to:

// load file player.src({src: 'test.mp4', type: 'video/mp4'});

When loading the page I get "ERROR: Error: HTTP error status: 0". The video file plays, but no waveform is displayed.

Any ideas?

Thanks

videojswavesurfer.zip videojswaveform_notworking

thijstriemstra commented 2 years ago

@esukmonica are you able to play the video file directly in the browser using a URL?

esukmonica commented 2 years ago

Yes, I can play the video in Chrome via: http://localhost/video/test.mp4

However, if I replace

player.src({src: 'test.MP4', type: 'video/mp4'});

with

player.src({src: 'http://localhost/video/test.mp4', type: 'video/mp4'});

then I still get the same error and no waveform, but now I cannot play the video neither. I do not get any of the player controls either (play, volume buttons)

video.min.js:12 VIDEOJS: ERROR: Error: HTTP error status: 0 at wavesurfer.js:2850:11

sample_with_url

Tests are being done with: Chrome Version 99.0.4844.51/Windows 10 Pro

Thanks

thijstriemstra commented 2 years ago

Can you try other browsers, e.g. firefox or edge?

esukmonica commented 2 years ago

Firefox: 98.0 (64-bit). Applies to both scenarios (having a video source as URL or within the page)

EDGE: Version 99.0.1150.36 (Official build) (64-bit), behaves in the same way as chrome. if video is within page, it can be played but no waveform is displayed, if video source uses the video URL, the video cannot be played and no waveform is displayed

thijstriemstra commented 2 years ago

The regular example works ok: https://collab-project.github.io/videojs-wavesurfer/demo/video.html

Can you try a different video, and maybe also paste output of ffprobe (part of ffmpeg) for the video here.

esukmonica commented 2 years ago

Thanks thijstriemstra

All working now. The error was caused by opening the .html directly from disk.

I have now opened the html via the URL and I get the waveform