Skip to content

Commit

Permalink
Merge pull request OwlCarousel2#932 from smashingboxes/fix-mixed-cont…
Browse files Browse the repository at this point in the history
…ent-errors

Removes mixed content errors by moving to protocol agnostic paths in video.js. Fixes OwlCarousel2#931
  • Loading branch information
greg5green committed Jul 14, 2015
2 parents 4ac1778 + 8f64024 commit ceefc88
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/js/owl.video.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,12 @@
}

if (video.type === 'youtube') {
path = "http://img.youtube.com/vi/" + video.id + "/hqdefault.jpg";
path = "//img.youtube.com/vi/" + video.id + "/hqdefault.jpg";
create(path);
} else if (video.type === 'vimeo') {
$.ajax({
type: 'GET',
url: 'http://vimeo.com/api/v2/video/' + video.id + '.json',
url: '//vimeo.com/api/v2/video/' + video.id + '.json',
jsonp: 'callback',
dataType: 'jsonp',
success: function(data) {
Expand All @@ -205,7 +205,7 @@
} else if (video.type === 'vzaar') {
$.ajax({
type: 'GET',
url: 'http://vzaar.com/api/videos/' + video.id + '.json',
url: '//vzaar.com/api/videos/' + video.id + '.json',
jsonp: 'callback',
dataType: 'jsonp',
success: function(data) {
Expand Down Expand Up @@ -254,10 +254,10 @@
this._core.reset(item.index());

if (video.type === 'youtube') {
html = '<iframe width="' + width + '" height="' + height + '" src="http://www.youtube.com/embed/' +
html = '<iframe width="' + width + '" height="' + height + '" src="//www.youtube.com/embed/' +
video.id + '?autoplay=1&v=' + video.id + '" frameborder="0" allowfullscreen></iframe>';
} else if (video.type === 'vimeo') {
html = '<iframe src="http://player.vimeo.com/video/' + video.id +
html = '<iframe src="//player.vimeo.com/video/' + video.id +
'?autoplay=1" width="' + width + '" height="' + height +
'" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';
} else if (video.type === 'vzaar') {
Expand Down

0 comments on commit ceefc88

Please sign in to comment.