javascript-samples
javascript-samples copied to clipboard
Deezer JavaScript SDK invisible player not working in Chrome.
It looks like because of Chrome restriction to iframe autoplay I can't get invisible player working in Chrome.
DZ.player.play()
just not seems to work and DZ.player.seek(1)
fails with this one:
player-HTML5Renderer.8af98a26e99674f368c5.js:1 Uncaught (in promise) DOMException: play() failed because the user didn't interact with the document first. https://goo.gl/xX8pDD
Any ideas how to handle it?
Hi,
Actually, it's not a Deezer issue. Chrome made some change in it's autoplay policy and you need first to get a user interaction on the page to make it works (mouse click) :
https://developers.google.com/web/updates/2017/09/autoplay-policy-changes
hope it helps,
Hi, thanks for your answer.
But the problem is that I have to make user click hidden iframe to make player work. Clicks on the outer page in Chrome does not help. I've already tried to set up PWA but it does not help too.
And I still need to keep it without visible iframe. So I'll be very grateful for any ideas.