Skype URIs not working under HTTPS on Chrome, iPad, iPhone
Asked Answered
G

2

11

I'm attempting to use the Skype javascript API and noticing some craziness: If my page is HTTP, everything works fine (all the skype buttons, and skype: protocol hrefs) but once I move it to HTTPS it breaks in Chrome, iPad, and iPhone. Case and point:

Call buttons work here: http://developer.skype.com/skype-uris/skype-uri-tutorial-webpages#uriTJS_Generator

Call buttons DO NOT work here: https://developer.skype.com/skype-uris/skype-uri-tutorial-webpages#uriTJS_Generator

This is on their own site and it's no workie...

Can anyone suggest some series of rain dances I should do to fix this? Praying to the Skype gods? I'm only a mere mortal.

Geddes answered 26/10, 2013 at 12:5 Comment(5)
Just a wild guess: The resources you are loading from the API are fetched via HTTP, and some browser do not fetch HTTP Elements when the site itself is using HTTPS (for security reasons). You might be able to configure that.Wrenn
On either http or https, they both request to launch the Skype program for me in Chrome 30.Aponeurosis
Yeah - you can acquire the skype-uri.js via http or https, the problem is when I acquire it via HTTPS, when you click the Skype button it says you don't have Skype installed (when I clearly do), but when I switch everything under HTTP - it magically works fine again.Geddes
MackieeE - i'm seeing this issue on Mac, Chrome Version 30.0.1599.101Geddes
i'm using linux, for me it do not works when i set it open skype, but it does work when i set the browser to open xdg-open to handle skype: links.Ddene
A
4

On click script is creating iframe and adding src="skype:echo123;+16505550123?call" and then as mb21 said bug occurs or "restrictive security policy" happens.

function a(s, v, t) {
    var u = true;
    window.onblur = function () {
        u = false
    };
    var r = document.getElementById(v);
    if (r !== null) {
        r.src = s         //here error happens....
    }
    setTimeout(function () {
        if (u) {
            alert(Skype.installSkypeMsg);
            Skype.tryAnalyzeSkypeUri("redirect", t);
            window.location = Skype.SkypeClientDownloadUrl
        }
    }, 2000)
}

How about just using:

<a onclick="window.location='skype:echo123;+16505550123?call';return false;" href="">link</a>
Adelaadelaida answered 12/11, 2013 at 15:8 Comment(0)
R
2

I think this is a bug (or a quite restrictive security policy) in Chrome (and other browsers). In the Chrome developer console I get:

[blocked] The page at https://developer.skype.com/skype-uris/skype-uri-tutorial-webpages#uriTJS_Generator ran insecure content from skype:echo123;+16505550123?call.

It treats skype:echo123;+16505550123?call as a URL and finds it not to be secure (i.e. not https) so the browser refuses to load it. Probably, the JavaScript in the Skype SDK uses window.open or something similar, so digging around in their code might bring up a solution.

Maybe you can adapt this ugly workaround?

Rockel answered 12/11, 2013 at 14:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.