Continuing the discussion from Twitter Onebox prevents video from going full screen:
I think this issue has recurred. When I click the full screen button, the icon changes but the video stays the same size:
iPhone XS, Discourse native app
Users are reporting that Twitter onebox videos fail to go full screen on iOS devices, specifically within the Discourse native app and Safari. ChrisBeach confirmed the issue persists even in safe mode on meta. bletch tested the same video on Chrome (mobile and desktop) and found it works normally, suggesting the issue is platform-specific. j.jaffeux investigated and noted that Twitter’s embedded video player, running inside an iframe, appears to mishandle touch events on iOS — triggering a JavaScript error related to touch tracking. This may stem from Safari’s iframe security policies or CSP restrictions. Falco noted the feature works on Android, reinforcing the iOS/Safari specificity. pmusaraj replicated the issue in a CodePen using raw iframe code, concluding that the problem lies with Twitter’s player and Safari, not Discourse — meaning it’s likely unfixable on Discourse’s end.
Continuing the discussion from Twitter Onebox prevents video from going full screen:
I think this issue has recurred. When I click the full screen button, the icon changes but the video stays the same size:
iPhone XS, Discourse native app
I’ve added the embedded video from my post that you linked avove, does the video fail to go full screen for you?
I’ve tried the full screen control on mobile and desktop Chrome and it works as expected.
What theme and theme components are active?
Thanks for replying. Yes, that video fails to fullscreen for me on iPhone
I tried it in safe mode on meta and the video still fails to full screen.
AFAICT it seems twitter has its own video player and when embed in an iframe I think some touch events are not correctly sent to iframe maybe.
So when clicking on full screen this error is triggered:
Cannot record touch end without a touch start.
Touch End: Touch Bank: %s
– "{\"identifier\":-1425494188,\"pageX\":129,\"pageY\":224,\"timestamp\":1547807906957}" – "[]"
k — TwitterVideoPlayerIframe.9f3fa50c5fbf9f33.js:1:326717
forEach
recordTouchTrack — TwitterVideoPlayerIframe.9f3fa50c5fbf9f33.js:1:328997
extractEvents — TwitterVideoPlayerIframe.9f3fa50c5fbf9f33.js:1:330453
E — TwitterVideoPlayerIframe.9f3fa50c5fbf9f33.js:1:225571
Wr — TwitterVideoPlayerIframe.9f3fa50c5fbf9f33.js:1:301445
Oe — TwitterVideoPlayerIframe.9f3fa50c5fbf9f33.js:1:233786
batchedUpdates — TwitterVideoPlayerIframe.9f3fa50c5fbf9f33.js:1:269686
Z — TwitterVideoPlayerIframe.9f3fa50c5fbf9f33.js:1:229783
Ae — TwitterVideoPlayerIframe.9f3fa50c5fbf9f33.js:1:234235
Ae
k — TwitterVideoPlayerIframe.9f3fa50c5fbf9f33.js:1:326717
I’m not sure we can fix this.
It works fine on Android.
Interesting, might be some safari specific security things with iframe then. Maybe CSP related.
That video also fails to go to fullscreen on Safari iOS when I put the iframe code in a codepen: https://codepen.io/anon/pen/NeZzGQ, so Joffrey’s right, it doesn’t look like we can fix this.