Commit c855cacf by Masaru Abe

動画キャッシュ無効対応

parent 1a424114
...@@ -262,8 +262,6 @@ CONTENTVIEW_FILESYSTEM.checkUpdate = function(contentId, data, func) { ...@@ -262,8 +262,6 @@ CONTENTVIEW_FILESYSTEM.checkUpdate = function(contentId, data, func) {
CONTENTVIEW_FILESYSTEM.showVideoObjectCache = function(x, y, width, height, src, isFullscreen, contentId, resourceId ){ CONTENTVIEW_FILESYSTEM.showVideoObjectCache = function(x, y, width, height, src, isFullscreen, contentId, resourceId ){
//AVWEB.avwLog('CONTENTVIEW_FILESYSTEM.showVideoObjectCache');
if (!CONTENTVIEW_FILESYSTEM.fs) { if (!CONTENTVIEW_FILESYSTEM.fs) {
//AVWEB.avwLog('CONTENTVIEW_FILESYSTEM.fs is null. id=' + contentId); //AVWEB.avwLog('CONTENTVIEW_FILESYSTEM.fs is null. id=' + contentId);
CONTENTVIEW.showVideoObject(x, y, width, height, src, isFullscreen, true); CONTENTVIEW.showVideoObject(x, y, width, height, src, isFullscreen, true);
...@@ -384,9 +382,12 @@ CONTENTVIEW_FILESYSTEM.createMovieCache = function(resourceUrl, fileName) { ...@@ -384,9 +382,12 @@ CONTENTVIEW_FILESYSTEM.createMovieCache = function(resourceUrl, fileName) {
fileWriter.onwriteend = function(e) { fileWriter.onwriteend = function(e) {
AVWEB.avwLog('RES書き込み完了 size=' + fileWriter.length); AVWEB.avwLog('RES書き込み完了 size=' + fileWriter.length);
if(downloadSize){ if(downloadSize){
if( downloadSize > AVWEB.avwSysSetting().movieCacheLimitMB * COMMON.MB_BYTE ){ //if( downloadSize > AVWEB.avwSysSetting().movieCacheLimitMB * COMMON.MB_BYTE ){
CONTENTVIEW_FILESYSTEM.deleteMovieCache(fileName); // CONTENTVIEW_FILESYSTEM.deleteMovieCache(fileName);
} else if( downloadSize != fileWriter.length ){ //} else if( downloadSize != fileWriter.length ){
// CONTENTVIEW_FILESYSTEM.deleteMovieCache(fileName);
//}
if( downloadSize != fileWriter.length ){
CONTENTVIEW_FILESYSTEM.deleteMovieCache(fileName); CONTENTVIEW_FILESYSTEM.deleteMovieCache(fileName);
} }
} }
...@@ -411,11 +412,20 @@ CONTENTVIEW_FILESYSTEM.createMovieCache = function(resourceUrl, fileName) { ...@@ -411,11 +412,20 @@ CONTENTVIEW_FILESYSTEM.createMovieCache = function(resourceUrl, fileName) {
AVWEB.avwLog("Content-Length:" + downloadSize); AVWEB.avwLog("Content-Length:" + downloadSize);
AVWEB.avwLog("Cachelimit:" + AVWEB.avwSysSetting().movieCacheLimitMB); AVWEB.avwLog("Cachelimit:" + AVWEB.avwSysSetting().movieCacheLimitMB);
//制限値チェック //制限値チェック
if( downloadSize && downloadSize > AVWEB.avwSysSetting().movieCacheLimitMB * COMMON.MB_BYTE ){ if( AVWEB.avwSysSetting().movieCacheLimitMB == 0 ){
AVWEB.avwLog("CacheLimit abort"); //無制限
xhr.abort(); CONTENTVIEW_FILESYSTEM.isXhrBusy = true;
} else { } else {
CONTENTVIEW_FILESYSTEM.isXhrBusy = true; //制限有り
if( downloadSize && downloadSize > AVWEB.avwSysSetting().movieCacheLimitMB * COMMON.MB_BYTE ){
AVWEB.avwLog("CacheLimit abort");
xhr.abort();
} else {
CONTENTVIEW_FILESYSTEM.isXhrBusy = true;
}
}
if(CONTENTVIEW_FILESYSTEM.isXhrBusy){
$('#divCacheLoading').css('z-index', '99999'); $('#divCacheLoading').css('z-index', '99999');
$('#divCacheLoading').css('display', 'block'); $('#divCacheLoading').css('display', 'block');
} }
......
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