Status Update
Comments
ha...@gmail.com <ha...@gmail.com> #2
I did some more research and found that the issue seems to be with Capacitor's cookies plugin. This plugin patches document.cookie
using WKHTTPCookieStore
. Accessing the patched document.cookie
causes the player to pause. I'll open a similar issue on the Capacitor side as well.
ha...@gmail.com <ha...@gmail.com> #3
After further research and verification, I believe this issue is related to the code here:
Capacitor uses window.prompt
to transfer data. And YouTube iframe player pauses after the prompt is called. I don't know why the YouTube iframe player pauses after a prompt call, and whether this behavior is necessary.
Is it possible to prevent the YouTube iframe player from pausing when a prompt is triggered?
Description
Please fill out the following:
When developing an iOS app with Capacitor, I noticed that whenever any code accesses
document.cookie
, the YouTube iframe player automatically pauses playback. This issue doesn't occur in iOS Safari and only happens in Capacitor (which uses WKWebView).I created a project to reproduce this issue:https://github.com/anson0370/yt-player-capacitor-issue
No
No
The player won't pause playback when accessing document.cookie.
Yes, see my reproduce project.
No