JW Player getCurrent Function is not working

Viewed 12

I am trying to add a button click event in JW Player to seek 10 seconds forward from current frame. But default getCurrent() function is not working.

Here is my code -

jwplayer('#myElement');

const forwardDisplayButton = (<HTMLElement>forwardContainer.querySelector('.jw-icon-rewind'));
const forwardControlBarButton = (<HTMLElement>forwardContainer.querySelector('.jw-icon-rewind'));

[forwardDisplayButton, forwardControlBarButton].forEach(button => {
      button.onclick = () => {
        player.seek((player.getPosition() + 10));
      }
    })

And Here is my error -

player.getPosition is not a function

Thank you in advance

0 Answers
Related