PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.2-a.3
Jetpack – WP Security, Backup, Speed, & Growth v16.2-a.3
12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 13.8.3 13.9.2 14.0.1 14.1.1 14.2.2 14.3.1 14.4.2 All 500 releases
jetpack / modules / shortcodes / js / brightcove.js
brightcove.js
30 lines 893 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /* global brightcove, brightcoveData */
2 ( function ( $ ) {
3 var script = document.createElement( 'script' ),
4 tld = 'co.jp' === brightcoveData.tld ? 'co.jp' : 'com',
5 timer = false;
6
7 // Load Brightcove script
8 script.src = 'https://sadmin.brightcove.' + tld + '/js/BrightcoveExperiences.js';
9 script.type = 'text/javascript';
10 script.language = 'JavaScript';
11 document.head.appendChild( script );
12
13 // Start detection for Brightcove script loading in its object
14 try_brightcove();
15
16 // Detect if Brightcove script has loaded and bind some events once loaded
17 function try_brightcove() {
18 clearTimeout( timer );
19
20 if ( 'object' === typeof brightcove ) {
21 $( document ).ready( brightcove.createExperiences );
22 $( 'body' ).on( 'post-load', brightcove.createExperiences );
23
24 brightcove.createExperiences();
25 } else {
26 timer = setTimeout( try_brightcove, 100 );
27 }
28 }
29 } )( jQuery );
30