'Disable pausing and seeking video - jwplayer 8.21

Hi I am using jwplayer (8.21) for my angular project. I need to disable pausing or seeking video and here is my code:

    let currentTime = 0;
    jwplayer('player')
      .setup({
        file: 'https://cph-p2p-msl.akamaized.net/hls/live/2000341/test/master.m3u8',
        autostart: 'true',
        width: '100%'
      })
      .on('pause', function () {
        this.play();
      })
      .on('displayClick', function () {
        alert('haha');
        this.play();
      })
      .on('seek', function (event) {
        currentTime = event.position;
        seeking = true;
      })
      .on('seeked', function () {
        this.seek(currentTime);
        seeking = false;
      });

Please help me



Solution 1:[1]

I just needed to do this for a live stream. The way to approach it without fail is to add css rules.

        .jw-display-container {
            display: none;
        }
        .jw-media {
            pointer-events: none;
        }
        .jw-slider-horizontal {
            display: none;
        }

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 somedirection