问题
"player.play()" doesn't work on Chrome(v.72). This bug happens on windows7 and Android phone.(I don't know about iOS.) It works well on other versions. Is there anyone who knows about this bug?
回答1:
I ran into the same problem.
Adding allow="autoplay" to my parent iframe fixed it as well
回答2:
Is your youtube iframe wrapped in another iframe (crossdomain)?
If so then it could be caused by the new user activation api v2 (https://developers.google.com/web/updates/2019/01/user-activation)?
And you can solve the issue by adding the allow="autoplay" attribute to your parent iframe.
It didn't make 100% sense to me at first but it fixed the issue we had.
来源:https://stackoverflow.com/questions/54457759/youtube-iframe-api-doesnt-work-on-chrome-v-72