Commit 69fb9ed6 by Masaru Abe

パフォーマンス改善 JS暗号化エラー対応

parent 999c601a
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
//名前空間用のオブジェクトを用意する //名前空間用のオブジェクトを用意する
var CONTENTVIEW_FILESYSTEM = {}; var CONTENTVIEW_FILESYSTEM = {};
CONTENTVIEW_FILESYSTEM.fs = null;
CONTENTVIEW_FILESYSTEM.isXhrBusy = false; CONTENTVIEW_FILESYSTEM.isXhrBusy = false;
//$(function () { //$(function () {
...@@ -18,6 +19,7 @@ CONTENTVIEW_FILESYSTEM.initFS = function( func ) { ...@@ -18,6 +19,7 @@ CONTENTVIEW_FILESYSTEM.initFS = function( func ) {
if( func != null ){ if( func != null ){
func(); func();
} }
return;
} }
window.requestFileSystem( window.requestFileSystem(
...@@ -116,7 +118,7 @@ CONTENTVIEW_FILESYSTEM.checkUpdate = function(contentId, data, func) { ...@@ -116,7 +118,7 @@ CONTENTVIEW_FILESYSTEM.checkUpdate = function(contentId, data, func) {
if (!CONTENTVIEW_FILESYSTEM.fs) { if (!CONTENTVIEW_FILESYSTEM.fs) {
console.log('CONTENTVIEW_FILESYSTEM.fs is null. id=' + contentId); console.log('CONTENTVIEW_FILESYSTEM.fs is null. id=' + contentId);
//おまじない ajaxカウントをインクリする必要有り //おまじない ajaxカウントをインクリする必要有り
nAjaxLoad++; //nAjaxLoad++;
//ファンクションがあれば実行 //ファンクションがあれば実行
if( func != null ){ if( func != null ){
func(data); func(data);
...@@ -324,9 +326,10 @@ CONTENTVIEW_FILESYSTEM.showVideoObjectCache = function(x, y, width, height, src, ...@@ -324,9 +326,10 @@ CONTENTVIEW_FILESYSTEM.showVideoObjectCache = function(x, y, width, height, src,
} else { } else {
if( this.readyState == 2 ){ if( this.readyState == 2 ){
console.log("onreadystatechange:" + this.readyState + " " + this.status);
$('#divImageLoading').css('display', 'block'); $('#divImageLoading').css('display', 'block');
CONTENTVIEW_FILESYSTEM.isXhrBusy = true;
} }
console.log("onreadystatechange:" + this.readyState + " " + this.status);
} }
} }
...@@ -334,7 +337,6 @@ CONTENTVIEW_FILESYSTEM.showVideoObjectCache = function(x, y, width, height, src, ...@@ -334,7 +337,6 @@ CONTENTVIEW_FILESYSTEM.showVideoObjectCache = function(x, y, width, height, src,
xhr.open('GET', src); xhr.open('GET', src);
xhr.responseType = 'blob'; xhr.responseType = 'blob';
xhr.send(); xhr.send();
CONTENTVIEW_FILESYSTEM.isXhrBusy = true;
} else { } else {
console.log("xhr is busy."); console.log("xhr is busy.");
} }
...@@ -371,6 +373,7 @@ CONTENTVIEW_FILESYSTEM.errorHandler = function(e) { ...@@ -371,6 +373,7 @@ CONTENTVIEW_FILESYSTEM.errorHandler = function(e) {
break; break;
}; };
//CONTENTVIEW_FILESYSTEM.fs = null; //CONTENTVIEW_FILESYSTEM.fs = null;
console.log('FileSystemAPI Error: ' + msg);
alert('FileSystemAPI Error: ' + msg); alert('FileSystemAPI Error: ' + msg);
}; };
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment