Index: trunk/phase3/js2/mwEmbed/php/languages/mwEmbed.i18n.php |
— | — | @@ -102,6 +102,7 @@ |
103 | 103 | 'mwe-size-megabytes' => '$1 MB', |
104 | 104 | 'mwe-size-kilobytes' => '$1 K', |
105 | 105 | 'mwe-size-bytes' => '$1 B', |
| 106 | + 'mwe-error_load_lib' => 'Error:: Javascript $1 was not retrievable OR does not define $2', |
106 | 107 | |
107 | 108 | /* |
108 | 109 | * js file: /libAddMedia/mvFirefogg.js |
— | — | @@ -228,8 +229,6 @@ |
229 | 230 | 'mwe-loading_plugin' => 'loading plugin <blink>...</blink>', |
230 | 231 | 'mwe-select_playback' => 'Set playback preference', |
231 | 232 | 'mwe-link_back' => 'Link back', |
232 | | - 'mwe-error_load_lib' => 'Error: mv_embed was unable to load required JavaScript libraries. |
233 | | -Insert script via DOM has failed. Please try reloading this page.', |
234 | 233 | 'mwe-error_swap_vid' => 'Error: mv_embed was unable to swap the video tag for the mv_embed interface', |
235 | 234 | 'mwe-add_to_end_of_sequence' => 'Add to end of sequence', |
236 | 235 | 'mwe-missing_video_stream' => 'The video file for this stream is missing', |
Index: trunk/phase3/js2/mwEmbed/mv_embed.js |
— | — | @@ -118,7 +118,7 @@ |
119 | 119 | "mwe-size-megabytes" : "$1 MB", |
120 | 120 | "mwe-size-kilobytes" : "$1 K", |
121 | 121 | "mwe-size-bytes" : "$1 B", |
122 | | - "mwe-error_load_lib" : "Error: mv_embed was unable to load required JavaScript libraries.\nInsert script via DOM has failed. Please try reloading this page." |
| 122 | + "mwe-error_load_lib" : "Error:: Javascript $1 was not retrievable OR does not define $2" |
123 | 123 | }); |
124 | 124 | |
125 | 125 | /** |
— | — | @@ -462,8 +462,11 @@ |
463 | 463 | this.callbacks.push( callback ); |
464 | 464 | } |
465 | 465 | if( this.checkLoading() ) { |
466 | | - if( this.load_time++ > 2000 ){ // Time out after ~80 seconds |
467 | | - js_error( gM('mwe-error_load_lib') + this.missing_path ); |
| 466 | + //@@todo we should check the <script> Element .onLoad property to |
| 467 | + //make sure its just not a very slow connection |
| 468 | + |
| 469 | + if( this.load_time++ > 4000 ){ // Time out after ~80 seconds |
| 470 | + js_error( gM('mwe-error_load_lib', mvGetClassPath(this.missing_path), this.missing_path) ); |
468 | 471 | this.load_error = true; |
469 | 472 | } else { |
470 | 473 | setTimeout( 'mvJsLoader.doLoad()', 20 ); |
— | — | @@ -524,7 +527,6 @@ |
525 | 528 | if( !this.libreq[i] ) { |
526 | 529 | loadExternalJs( this.libs[i] ); |
527 | 530 | } |
528 | | - |
529 | 531 | this.libreq[i] = 1; |
530 | 532 | //js_log("has not yet loaded: " + i); |
531 | 533 | loading = 1; |
— | — | @@ -541,7 +543,7 @@ |
542 | 544 | cur_path = (cur_path == '') ? cur_path + objPath[p] : cur_path + '.' + objPath[p]; |
543 | 545 | eval( 'var ptest = typeof ( '+ cur_path + ' ); '); |
544 | 546 | if( ptest == 'undefined' ) { |
545 | | - this.missing_path = cur_path; |
| 547 | + this.missing_path = cur_path; |
546 | 548 | return false; |
547 | 549 | } |
548 | 550 | } |