From 62ca0b92fe08647b8661f751771c272abbaf1355 Mon Sep 17 00:00:00 2001 From: Vlad Misyura Date: Tue, 13 Nov 2018 15:23:08 +0200 Subject: [PATCH] fix(PSVAMB-4560): Chromecast nested iframes issue (#3899) --- modules/Chromecast/resources/sender/chromecast.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/Chromecast/resources/sender/chromecast.js b/modules/Chromecast/resources/sender/chromecast.js index e8d62e9641..cf516992fa 100644 --- a/modules/Chromecast/resources/sender/chromecast.js +++ b/modules/Chromecast/resources/sender/chromecast.js @@ -42,7 +42,9 @@ this.isInIframeApi = false; } catch ( e ) { window[ '__onGCastApiAvailable' ] = this.toggleCastButton.bind( this ); - kWidget.appendScriptUrl( this.CAST_SENDER_V3_URL ); + // PSVAMB-4560 + // For some reason, Chrome appends script to a player's iframe parent document unless specified explicitly + kWidget.appendScriptUrl( this.CAST_SENDER_V3_URL, null, window.document ); this.isInIframeApi = true; } } else {