youtube-player icon indicating copy to clipboard operation
youtube-player copied to clipboard

Working fine but problem with event handler

Open cell0901 opened this issue 7 months ago • 0 comments

player.on('stateChange', (event) => {
    // event.data
});

while using event change when event.data === 0 basically the youtube player video ends to call a function but first time it works fine if i dont load the page or dont click anywhere else.

but while the video is playing and i click on other tab opened and came back to this tab the stateChange(i check logging the event.data) doesnt works and do whatever i told the function to do.

cell0901 avatar Sep 03 '25 17:09 cell0901