play: h264 HLS player doesn't load video

Issue #226 resolved
Trek Hopton created an issue

When a h264 video is found via the search page it has a link to ‘play’. Which this is clicked, the play page should load the HLS h264 play and load the video ready for playback. This is something that has been unknowingly broken at some point.

Upon initial inspection, I see an error reported in the javascript for the page:

Uncaught TypeError: Cannot read properties of null (reading 'addEventListener')
    at initH264 (play.js:160:39)
    at load (play.js:60:9)
    at HTMLDocument.<anonymous> (play.js:29:63)

This may be a good starting point.

To recreate this error, go to site: Benham Lab, select device: saxPi, pin V0, search between 22/11/2019 13:12 and 13:24. Play the first video, then look in the browser console (right click, inspect element).

Comments (4)

  1. David Sutton

    The hls player can be loaded in if line 160 is removed:

    document.getElementById('fileInput').addEventListener('change', play);
    

    This function fails as fileInput is not a valid id on the page. This then seems to prevent the video player being created on line 161

    document.getElementById('view').innerHTML = `<video controls id="video" class="responsive"></video>`
    

    However, the video still does not load and is not playable.

  2. Log in to comment