Search code examples
javascriptangularvideo-streaminghtml5-videovideo.js

videojs: Video streaming loading when url throws 404


I am using video.js library to stream live video and it is working as expected

but after some time url throws a 404 error while streaming and the whole player will stuck on loading, now i want to catch that 404 error in any event and handle that

i also tried with player.on("error") but it is not firing when chunk is throwing 404

enter image description here


Solution

  • I installed new library videojs-errors

    import videojs from 'video.js';
    import 'videojs-errors';
    

    which solved my problem with reach message options and customization