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:
Call buttons DO NOT work here:
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.
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./skype-uris/skype-uri-tutorial-webpages#uriTJS_Generator
Call buttons DO NOT work here: https://developer.skype./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.
Share Improve this question edited Oct 26, 2013 at 12:17 Devin McQueeney asked Oct 26, 2013 at 12:05 Devin McQueeneyDevin McQueeney 1,2872 gold badges14 silver badges31 bronze badges 5- 1 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. – Janis F Commented Nov 6, 2013 at 12:39
-
On either
http
orhttps
, they both request to launch the Skype program for me in Chrome 30. – MackieeE Commented Nov 6, 2013 at 12:39 - 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. – Devin McQueeney Commented Nov 6, 2013 at 12:50
- MackieeE - i'm seeing this issue on Mac, Chrome Version 30.0.1599.101 – Devin McQueeney Commented Nov 6, 2013 at 12:52
- 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. – Ohad Cohen Commented Nov 9, 2013 at 23:02
2 Answers
Reset to default 4 +50On 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>
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./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?