Skip to content

Commit

Permalink
Merge pull request #12 from dboulet/https
Browse files Browse the repository at this point in the history
Prevent mixed content warnings on secure pages
  • Loading branch information
Mantish committed Dec 23, 2015
2 parents 8f61bd0 + 28ead1e commit e7db58e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions js/async-media-load.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
//Only for Vimeo
var getVideoDetails = function getVideoDetails($a, id, width, height) {
$.ajax({
url: 'http://vimeo.com/api/v2/video/' + id + '.json',
url: 'https://vimeo.com/api/v2/video/' + id + '.json',
dataType: 'jsonp',
success: function (data) {
var img_src;
Expand All @@ -100,12 +100,12 @@
var $embed;

if (e.data.provider === 'vimeo') {
embed_url = 'http://player.vimeo.com/video/' + e.data.id + '?autoplay=1';
embed_url = 'https://player.vimeo.com/video/' + e.data.id + '?autoplay=1';
if (/(^[0-9A-F]{6}$)|(^[0-9A-F]{3}$)/i.test(opts.color)) {
embed_url += '&color=' + opts.color;
}
} else {
embed_url = 'http://www.youtube.com/embed/' + e.data.id + '?rel=0&autoplay=1&wmode=opaque';
embed_url = 'https://www.youtube.com/embed/' + e.data.id + '?rel=0&autoplay=1&wmode=opaque';
}

if (opts.responsive) {
Expand All @@ -131,7 +131,7 @@
if (provider === 'vimeo') {
getVideoDetails($this, video_id, width, height);
} else {
var img_src = 'http://img.youtube.com/vi/' + video_id + '/hqdefault.jpg';
var img_src = 'https://img.youtube.com/vi/' + video_id + '/hqdefault.jpg';
insertImg($this, img_src, width, height, 'youtube');
}
} else {
Expand Down

0 comments on commit e7db58e

Please sign in to comment.