Domanda

I've had lots of progress on this and wanted to implement the "invisible player" on the chromecast receiver as explained here:Deezer invisible player

I have my demo app running, and am able to pass from the sender to the receiver my access token and my token expires. Instanciating the DZ player like so:

DZ.init({
                    appId  : deezer_app_id,
                    channelUrl : deezer_channel_url,
                    player : {
                        onload : onPlayerLoaded,
                        token : {
                            accessToken:event.message.accessToken,
                            expire:event.message.expire
                        }
                    }
                });

the onPlayerLoaded function just logs a message for the time being.

I am currently getting:

Unsafe JavaScript attempt to access frame with URL http://mydomain/chrome/myreceiver.html from frame with URL http://www.deezer.com/es/plugins/player.php?channel=http://Mydomain/chrome/channel.php&app_id=IDVALUE&emptyPlayer=true. Domains, protocols and ports must match.
 external-v00202097.js:40
FB.getLoginStatus() called before calling FB.init(). vb.js:56
Flash is not installed or is too old vb.js:56
Unsafe JavaScript attempt to access frame with URL http://mydomain/chrome/myreceiver.html from frame with URL http://static.ak.facebook.com/connect/xd_arbiter.php?version=27#channel=f3a…Ffb_xd_fragment%23xd_sig%3Df2d6a19d8%26&origin=http%3A%2F%2Fwww.deezer.com. The frame requesting access set 'document.domain' to 'facebook.com', but the frame being accessed did not. Both must set 'document.domain' to the same value to allow access.
 xd_arbiter.php:18
Unsafe JavaScript attempt to access frame with URL http://Mydomain/chrome/myreceiver.html from frame with URL https://s-static.ak.facebook.com/connect/xd_arbiter.php?version=27#channel=…Ffb_xd_fragment%23xd_sig%3Df2d6a19d8%26&origin=http%3A%2F%2Fwww.deezer.com. The frame requesting access has a protocol of 'https', the frame being accessed has a protocol of 'http'. Protocols must match.

now the first one does not make sense, as I have my channelURL set to the same domain, looking with the inspector I can guarantee both on the channelURl and on the chrome cast receiver that we have the same document.domain .

the second error seems to be from deezer loading something in flash (weird as the example does not state anything in flash).

the third error would be deezer calling FB for some reason.

I know the youtube api through Iframe has been made to work with chromecast, so I think this is possible, however the flash problem and cross domain seems to be an issue.

Any advice?

È stato utile?

Soluzione

About the domain, sometimes you get errors when the domain you specified for your app on http://developers.deezer.com contains http:// as it shouldn't.

About Flash, the Deezer player is based on Flash for encryption so you need to install it to get it to work.

Facebook is included in the Deezer player (for sharing, login purposes) and you get warnings when your page is loaded within iframes. You can ignore these warnings.

Altri suggerimenti

I am not familiar with Deezer so won't be able to comment on Deezer related issues but the "Unsdafe ..." message can also be caused by trying to use file://*; this is an additional security measure in Chrome. In addition, what are the sanbox properties of the iframe? Does it include "allow-same-origin" ?

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top