src/js/iframe_embed/embedder.js
changeset 1072 ac1eacb3aa33
parent 910 b9f1bd52df9a
equal deleted inserted replaced
1071:02c04d2c8fd8 1072:ac1eacb3aa33
     1 /* This piece of code is directly requested by the page the player is embedded
     1 /* This piece of code is directly requested by the page the player is embedded
     2    on. It creates the iframe the player is embedded in and it reflects changes
     2    on. It creates the iframe the player is embedded in and it reflects changes
     3    to the iframe url in the page url.   
     3    to the iframe url in the page url.   
     4 */
     4 */
     5 
     5 
     6 if (typeof IriSP === "undefined") {
     6 const iFrameUpdater = function(_frameId) {
     7     IriSP = {};
       
     8 }
       
     9 
       
    10 IriSP.iFrameUpdater = function(_frameId) {
       
    11     
     7     
    12     var _frame = document.getElementById(_frameId),
     8     var _frame = document.getElementById(_frameId),
    13         _blocked = false,
     9         _blocked = false,
    14         _updater = function() {
    10         _updater = function() {
    15             _blocked = true;
    11             _blocked = true;
    32     });
    28     });
    33     
    29     
    34     window.setTimeout(_updater, 2000);
    30     window.setTimeout(_updater, 2000);
    35     
    31     
    36 };
    32 };
       
    33 
       
    34 export default iFrameUpdater;