PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.3-a.5
Jetpack – WP Security, Backup, Speed, & Growth v16.3-a.5
16.3-a.5 16.3-a.7 16.3-a.3 16.3-a.1 16.2 16.2-beta 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 All 506 releases
jetpack / modules / shortcodes / js / brightcove.js

brightcove.js in Jetpack – WP Security, Backup, Speed, & Growth 16.3-a.5, at modules/shortcodes/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