@@ -85,7 +85,7 @@ var player, OKEvents, options;
85
85
86
86
// load the youtube api
87
87
base . loadYouTubeAPI = function ( callback ) {
88
- base . insertJS ( 'http: //www.youtube.com/player_api' ) ;
88
+ base . insertJS ( '//www.youtube.com/player_api' ) ;
89
89
} ;
90
90
91
91
base . loadYouTubePlaylist = function ( ) {
@@ -95,12 +95,13 @@ var player, OKEvents, options;
95
95
// load the vimeo api by replacing the div with an iframe and loading js
96
96
base . loadVimeoAPI = function ( ) {
97
97
$ ( '#okplayer' ) . replaceWith ( function ( ) {
98
- return '<iframe src="http: //player.vimeo.com/video/' + base . options . video . id + '?api=1&title=0&byline=0&portrait=0&playbar=0&loop=' + base . options . loop + '&autoplay=' + ( base . options . autoplay === 1 ? 1 : 0 ) + '&player_id=okplayer" frameborder="0" style="' + $ ( this ) . attr ( 'style' ) + 'visibility:hidden;background-color:black;" id="' + $ ( this ) . attr ( 'id' ) + '"></iframe>' ;
98
+ return '<iframe src="//player.vimeo.com/video/' + base . options . video . id + '?api=1&title=0&byline=0&portrait=0&playbar=0&loop=' + base . options . loop + '&autoplay=' + ( base . options . autoplay === 1 ? 1 : 0 ) + '&player_id=okplayer" frameborder="0" style="' + $ ( this ) . attr ( 'style' ) + 'visibility:hidden;background-color:black;" id="' + $ ( this ) . attr ( 'id' ) + '"></iframe>' ;
99
99
} ) ;
100
100
101
101
// if necessary, debug with the most recent version of froogaloop
102
102
// base.insertJS('https://rawgithub.com/vimeo/player-api/master/javascript/froogaloop.js', function(){
103
- base . insertJS ( 'http://a.vimeocdn.com/js/froogaloop2.min.js' , function ( ) {
103
+ // base.insertJS('http://a.vimeocdn.com/js/froogaloop2.min.js', function(){
104
+ base . insertJS ( '//origin-assets.vimeo.com/js/froogaloop2.min.js' , function ( ) {
104
105
vimeoPlayerReady ( ) ;
105
106
} ) ;
106
107
} ;
@@ -237,6 +238,7 @@ function onYouTubePlayerAPIReady() {
237
238
'enablejsapi' : 1 ,
238
239
'fs' : 0 ,
239
240
'modestbranding' : 1 ,
241
+ 'origin' : window . location . origin || ( window . location . protocol + '//' + window . location . hostname ) ,
240
242
'iv_load_policy' : options . annotations ,
241
243
'loop' : options . loop ,
242
244
'showinfo' : 0 ,
0 commit comments