Commit fe83191c by Masaru Abe

ストリーミング対応

parent f9e9d170
...@@ -2298,12 +2298,13 @@ COMMON.SetStartLog = function(strContentId) { ...@@ -2298,12 +2298,13 @@ COMMON.SetStartLog = function(strContentId) {
for (var nIndex = 0; nIndex < arrContentLogs.length; nIndex++) { for (var nIndex = 0; nIndex < arrContentLogs.length; nIndex++) {
if (arrContentLogs[nIndex].contentid == strContentId) { if (arrContentLogs[nIndex].contentid == strContentId) {
arrContentLogs[nIndex].readingStartDate = new Date();
arrContentLogs[nIndex].readingEndDate = (new Date()).addSeconds(1); if(!ClientData.isStreamingMode()){
arrContentLogs[nIndex].readingStartDate = new Date();
// Reading time arrContentLogs[nIndex].readingEndDate = (new Date()).addSeconds(1);
arrContentLogs[nIndex].readingTime = arrContentLogs[nIndex].readingEndDate.subtractBySeconds(arrContentLogs[nIndex].readingStartDate); // Reading time
arrContentLogs[nIndex].readingTime = arrContentLogs[nIndex].readingEndDate.subtractBySeconds(arrContentLogs[nIndex].readingStartDate);
}
isFound = true; isFound = true;
break; break;
} }
......
...@@ -77,7 +77,8 @@ ...@@ -77,7 +77,8 @@
</script> </script>
</head> </head>
<body id="viewer" oncontextmenu="return false;"> <!-- oncontextmenu="return false;" -->
<body id="viewer" >
<div id="wrapper"> <div id="wrapper">
<!--Viewer component is added here --> <!--Viewer component is added here -->
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<meta http-equiv="Cache-Control" content="no-store"> <meta http-equiv="Cache-Control" content="no-store">
<meta http-equiv="Cache-Control" content="no-cache"> <meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Expires" content="-1"> <meta http-equiv="Expires" content="-1">
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" /> <meta name="viewport" content="target-densitydpi=device-dpi,width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<!-- <!--
<meta name="viewport" content="width=device-width,target-densitydpi=128" /> <meta name="viewport" content="width=device-width,target-densitydpi=128" />
--> -->
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
opacity: 0.6; opacity: 0.6;
} }
#menu li { #menu li {
width: 14.3%; width: 14.2%;
float: left; float: left;
padding: 0; padding: 0;
margin: 0; margin: 0;
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
font-size: 14px; font-size: 14px;
font-weight: bold; font-weight: bold;
margin: 0; margin: 0;
padding: 12px 0; padding: 6px 0;
text-decoration: none; text-decoration: none;
display: block; display: block;
} }
...@@ -111,6 +111,9 @@ ...@@ -111,6 +111,9 @@
$(document).ready(function() { $(document).ready(function() {
//CONTENTVIEW.ready(); //CONTENTVIEW.ready();
//CONTENTVIEW_STREAMING.ready(); //CONTENTVIEW_STREAMING.ready();
//$('#menu').hide();
}); });
//デバイスから呼ばれるGPS情報 //デバイスから呼ばれるGPS情報
...@@ -495,14 +498,14 @@ ...@@ -495,14 +498,14 @@
</div> </div>
<div id="debug"></div> <div id="debug"></div>
<ul id="menu"> <ul id="menu" style="display:none;">
<li><a id="firstpage" >最初</a></li> <li><a id="firstpage" ><img src="img/menu/icon-fast-forward.png" alt=""></a></li>
<li><a id="prevpage" ></a></li> <li><a id="prevpage" ><img src="img/menu/icon-chevron-left.png" alt=""></a></li>
<li><a id="nextpage" ></a></li> <li><a id="nextpage" ><img src="img/menu/icon-chevron-right.png" alt=""></a></li>
<li><a id="lastpage" >最後</a></li> <li><a id="lastpage" ><img src="img/menu/icon-fast-backward.png" alt=""></a></li>
<li><a id="zoomin" ></a></li> <li><a id="zoomin" ><img src="img/menu/icon-zoom-in.png" alt=""></a></li>
<li><a id="zoomfit" ></a></li> <li><a id="zoomfit" ><img src="img/menu/icon-resize-small.png" alt=""></a></li>
<li><a id="zoomout" ></a></li> <li><a id="zoomout" ><img src="img/menu/icon-zoom-out.png" alt=""></a></li>
</ul> </ul>
<iframe style="height:0px;width:0px;visibility:hidden" src="about:blank"> <iframe style="height:0px;width:0px;visibility:hidden" src="about:blank">
...@@ -510,3 +513,4 @@ ...@@ -510,3 +513,4 @@
</iframe> </iframe>
</body> </body>
</html> </html>
...@@ -1602,7 +1602,7 @@ CONTENTVIEW.oldContent_Back = function() { ...@@ -1602,7 +1602,7 @@ CONTENTVIEW.oldContent_Back = function() {
/* handle display or hide toolbar */ /* handle display or hide toolbar */
CONTENTVIEW.handleDisplayToolbar = function() { CONTENTVIEW.handleDisplayToolbar = function() {
console.log("CONTENTVIEW_GENERAL.isLoadingObject:" + CONTENTVIEW_GENERAL.isLoadingObject); //console.log("CONTENTVIEW_GENERAL.isLoadingObject:" + CONTENTVIEW_GENERAL.isLoadingObject);
if (CONTENTVIEW_GENERAL.isLoadingObject == false) { if (CONTENTVIEW_GENERAL.isLoadingObject == false) {
/* save marking */ /* save marking */
...@@ -2642,6 +2642,7 @@ CONTENTVIEW.ContentPage.prototype.addPageObjects = function (pageObjects) { ...@@ -2642,6 +2642,7 @@ CONTENTVIEW.ContentPage.prototype.addPageObjects = function (pageObjects) {
obj.objectId obj.objectId
); );
} else if (obj.actionType == 6) { /*send mail */ } else if (obj.actionType == 6) { /*send mail */
pageObj = new CONTENTVIEW_CREATEOBJECT.sendMail( pageObj = new CONTENTVIEW_CREATEOBJECT.sendMail(
obj.mediaType, obj.mediaType,
obj.actionType, obj.actionType,
...@@ -2912,8 +2913,10 @@ CONTENTVIEW.ContentPage.prototype.addPageObjects = function (pageObjects) { ...@@ -2912,8 +2913,10 @@ CONTENTVIEW.ContentPage.prototype.addPageObjects = function (pageObjects) {
obj.objectId obj.objectId
); );
} }
// add pageObject if( pageObj != null ){
this.addPageObject(pageObj); // add pageObject
this.addPageObject(pageObj);
}
} }
}; };
//Start Function: No.4 - Editor : Long - Date : 08/09/2013 - Summary: Edit function to draw on multi canvas //Start Function: No.4 - Editor : Long - Date : 08/09/2013 - Summary: Edit function to draw on multi canvas
......
...@@ -31,16 +31,25 @@ CONTENTVIEW_ANKET.showAnket = function(url, fullscreen, objectId) { ...@@ -31,16 +31,25 @@ CONTENTVIEW_ANKET.showAnket = function(url, fullscreen, objectId) {
+ '</iframe></div>' + '</iframe></div>'
+ '<div class="anket-commands" id="anket-commands"><input type="button" value="' + I18N.i18nText('txtTransparent') + '" id="btnFullOpacity"/> <input type="button" value="' + I18N.i18nText('txtSemiTransparent') + '" id="btnApartOpacity"/> <input type="button" value="' + I18N.i18nText('txtNoTransparent') + '" id="btnNoOpacity"/></div><div style="clear:both;"></div>' + '<div class="anket-commands" id="anket-commands"><input type="button" value="' + I18N.i18nText('txtTransparent') + '" id="btnFullOpacity"/> <input type="button" value="' + I18N.i18nText('txtSemiTransparent') + '" id="btnApartOpacity"/> <input type="button" value="' + I18N.i18nText('txtNoTransparent') + '" id="btnNoOpacity"/></div><div style="clear:both;"></div>'
); );
$('#dialog h1 img').click(function(){
//時間記録 $("#dialog h1 img").on({
var dateEnd = new Date(); 'click touchend': function(ev){
var actionTime = dateEnd.subtractBySeconds(dateStart);
//alert("actionTime:" + actionTime); //時間記録
COMMON.SetObjectLogActionTime( CONTENTVIEW_GENERAL.contentID, objectId, actionTime ); var dateEnd = new Date();
var actionTime = dateEnd.subtractBySeconds(dateStart);
$container.removeAttr('style'); //alert("actionTime:" + actionTime);
CONTENTVIEW_GENERAL.hideDialog(); COMMON.SetObjectLogActionTime( CONTENTVIEW_GENERAL.contentID, objectId, actionTime );
$container.removeAttr('style');
CONTENTVIEW_GENERAL.hideDialog();
return false;
},
'touchstart touchmove': function(){
//これを入れないと次にダイアログを開くと表示位置が大きくズレる
return false;
}
}); });
//時間記録 //時間記録
......
...@@ -927,7 +927,7 @@ CONTENTVIEW_EVENTS.onClick_CanvasMain = function(event) { ...@@ -927,7 +927,7 @@ CONTENTVIEW_EVENTS.onClick_CanvasMain = function(event) {
if(!CONTENTVIEW_EVENTS.isPreventClick){ if(!CONTENTVIEW_EVENTS.isPreventClick){
//その他のエリア //その他のエリア
console.log("click!!"); //console.log("click!!");
} }
} }
...@@ -1416,22 +1416,15 @@ CONTENTVIEW_EVENTS.resetNaviAction = function(){ ...@@ -1416,22 +1416,15 @@ CONTENTVIEW_EVENTS.resetNaviAction = function(){
}; };
CONTENTVIEW_EVENTS.onTouchstart = function(evt){ CONTENTVIEW_EVENTS.onTouchstart = function(evt){
//evt.preventDefault();
//if(ClientData.isStreamingMode()){
// if ($('#menu').is(':hidden')) {
// // 非表示の場合の処理
// $('#menu').show();
// } else {
// // 表示されている場合の処理
// $('#menu').hide();
// }
//}
if(ClientData.IsAddingMarking() == true){ if(ClientData.IsAddingMarking() == true){
return; return;
} }
//evt.preventDefault();
//$('#debug').html("CONTENTVIEW_EVENTS.onTouchstart");
//CONTENTVIEW_STREAMING.handleDisplayToolbar();
var bContinue = true; var bContinue = true;
//if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() || CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) { //if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() || CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
...@@ -2180,6 +2173,10 @@ CONTENTVIEW_EVENTS.onTouchend = function(evt){ ...@@ -2180,6 +2173,10 @@ CONTENTVIEW_EVENTS.onTouchend = function(evt){
CONTENTVIEW_EVENTS.nextPage_click(); CONTENTVIEW_EVENTS.nextPage_click();
} }
} }
//CONTENTVIEW_STREAMING.debugLog("CONTENTVIEW_EVENTS.onTouchEnd");
CONTENTVIEW_STREAMING.handleDisplayToolbar();
} }
} }
} }
......
...@@ -36,7 +36,6 @@ CONTENTVIEW_GETDATA.getPageObjectsByPageIndex = function(contentData, nIndexPage ...@@ -36,7 +36,6 @@ CONTENTVIEW_GETDATA.getPageObjectsByPageIndex = function(contentData, nIndexPage
/*get object page*/ /*get object page*/
if (currentPageObjects[nIndex].mediaType == 1) {/*media type = 1 */ if (currentPageObjects[nIndex].mediaType == 1) {/*media type = 1 */
var pageObject = CONTENTVIEW_GETDATA.getMediaType1(currentPageObjects[nIndex]); var pageObject = CONTENTVIEW_GETDATA.getMediaType1(currentPageObjects[nIndex]);
/*add object to page */ /*add object to page */
CONTENTVIEW_GENERAL.pageObjects.push(pageObject); CONTENTVIEW_GENERAL.pageObjects.push(pageObject);
} else if (currentPageObjects[nIndex].mediaType == 2) { /*mediaType = 2 */ } else if (currentPageObjects[nIndex].mediaType == 2) { /*mediaType = 2 */
...@@ -96,6 +95,13 @@ CONTENTVIEW_GETDATA.getMediaType1 = function(iValueObj) { ...@@ -96,6 +95,13 @@ CONTENTVIEW_GETDATA.getMediaType1 = function(iValueObj) {
* Action Type = 11 : html * Action Type = 11 : html
*/ */
//ストリーミングならemailは表示しない
//if(ClientData.isStreamingMode()){
// if (iValueObj.action.actionType == 6) {
// return null;
// }
//}
var pageObject = []; var pageObject = [];
pageObject['mediaType'] = iValueObj.mediaType; pageObject['mediaType'] = iValueObj.mediaType;
...@@ -318,6 +324,8 @@ CONTENTVIEW_GETDATA.getMediaType1 = function(iValueObj) { ...@@ -318,6 +324,8 @@ CONTENTVIEW_GETDATA.getMediaType1 = function(iValueObj) {
} }
//END TRB00093 - Editor : Long - Date: 09/26/2013 - Summary : Check undefine before get //END TRB00093 - Editor : Long - Date: 09/26/2013 - Summary : Check undefine before get
//CONTENTVIEW_STREAMING.debugLog("resourceUrl:" + obj.resourceUrl);
pageObject["imageUrl"] = AVWEB.getURL("webResourceDownload") + "&sid=" + ClientData.userInfo_sid() + "&resourceId=" + iValueObj.mediaInfo.resourceId; pageObject["imageUrl"] = AVWEB.getURL("webResourceDownload") + "&sid=" + ClientData.userInfo_sid() + "&resourceId=" + iValueObj.mediaInfo.resourceId;
pageObject["resourceUrl"] = resourceUrl; pageObject["resourceUrl"] = resourceUrl;
} }
...@@ -1262,14 +1270,13 @@ CONTENTVIEW_GETDATA.renderPrevPage = function(){ ...@@ -1262,14 +1270,13 @@ CONTENTVIEW_GETDATA.renderPrevPage = function(){
CONTENTVIEW.showErrorScreen(); CONTENTVIEW.showErrorScreen();
}); });
} }
//Start Function : No.12 - Editor : Long - Date : 08/28/2013 - Summary : Render next page content image the same with the current one
else if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_NoFile){ else if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_NoFile){
CONTENTVIEW_GENERAL.prevPageImage = CONTENTVIEW_GENERAL.pageImages; CONTENTVIEW_GENERAL.prevPageImage = CONTENTVIEW_GENERAL.pageImages;
CONTENTVIEW_GENERAL.prevContent.setPageImages(CONTENTVIEW_GENERAL.totalPage, CONTENTVIEW_GENERAL.prevPageImage) CONTENTVIEW_GENERAL.prevContent.setPageImages(CONTENTVIEW_GENERAL.totalPage, CONTENTVIEW_GENERAL.prevPageImage)
.setPageObjects(CONTENTVIEW_GENERAL.prevPageObjects) .setPageObjects(CONTENTVIEW_GENERAL.prevPageObjects)
.previousPage(); .previousPage();
} }
//End Function : No.12 - Editor : Long - Date : 08/28/2013 - Summary : Render next page content image the same with the current one
}; };
//Get next page objects by page index //Get next page objects by page index
...@@ -1299,8 +1306,8 @@ CONTENTVIEW_GETDATA.getNextPageObjectsByPageIndex = function(contentData, nIndex ...@@ -1299,8 +1306,8 @@ CONTENTVIEW_GETDATA.getNextPageObjectsByPageIndex = function(contentData, nIndex
/*get object page*/ /*get object page*/
if (currentPageObjects[nIndex].mediaType == 1) {/*media type = 1 */ if (currentPageObjects[nIndex].mediaType == 1) {/*media type = 1 */
var pageObject = CONTENTVIEW_GETDATA.getMediaType1(currentPageObjects[nIndex]); var pageObject = CONTENTVIEW_GETDATA.getMediaType1(currentPageObjects[nIndex]);
/*add object to page */ /*add object to page */
CONTENTVIEW_GENERAL.nextPageObjects.push(pageObject); CONTENTVIEW_GENERAL.nextPageObjects.push(pageObject);
} else if (currentPageObjects[nIndex].mediaType == 2) { /*mediaType = 2 */ } else if (currentPageObjects[nIndex].mediaType == 2) { /*mediaType = 2 */
var pageObject = CONTENTVIEW_GETDATA.getMediaType2(currentPageObjects[nIndex]); var pageObject = CONTENTVIEW_GETDATA.getMediaType2(currentPageObjects[nIndex]);
/*add object to page */ /*add object to page */
...@@ -1345,6 +1352,7 @@ CONTENTVIEW_GETDATA.getNextPageObjectsByPageIndex = function(contentData, nIndex ...@@ -1345,6 +1352,7 @@ CONTENTVIEW_GETDATA.getNextPageObjectsByPageIndex = function(contentData, nIndex
//Get prev page objects by page index //Get prev page objects by page index
CONTENTVIEW_GETDATA.getPrevPageObjectsByPageIndex = function(contentData, nIndexPage) { CONTENTVIEW_GETDATA.getPrevPageObjectsByPageIndex = function(contentData, nIndexPage) {
CONTENTVIEW_GENERAL.prevPageObjects = []; CONTENTVIEW_GENERAL.prevPageObjects = [];
var currentPageObjects; var currentPageObjects;
...@@ -1369,8 +1377,8 @@ CONTENTVIEW_GETDATA.getPrevPageObjectsByPageIndex = function(contentData, nIndex ...@@ -1369,8 +1377,8 @@ CONTENTVIEW_GETDATA.getPrevPageObjectsByPageIndex = function(contentData, nIndex
/*get object page*/ /*get object page*/
if (currentPageObjects[nIndex].mediaType == 1) {/*media type = 1 */ if (currentPageObjects[nIndex].mediaType == 1) {/*media type = 1 */
var pageObject = CONTENTVIEW_GETDATA.getMediaType1(currentPageObjects[nIndex]); var pageObject = CONTENTVIEW_GETDATA.getMediaType1(currentPageObjects[nIndex]);
/*add object to page */ /*add object to page */
CONTENTVIEW_GENERAL.prevPageObjects.push(pageObject); CONTENTVIEW_GENERAL.prevPageObjects.push(pageObject);
} else if (currentPageObjects[nIndex].mediaType == 2) { /*mediaType = 2 */ } else if (currentPageObjects[nIndex].mediaType == 2) { /*mediaType = 2 */
var pageObject = CONTENTVIEW_GETDATA.getMediaType2(currentPageObjects[nIndex]); var pageObject = CONTENTVIEW_GETDATA.getMediaType2(currentPageObjects[nIndex]);
/*add object to page */ /*add object to page */
...@@ -1410,6 +1418,7 @@ CONTENTVIEW_GETDATA.getPrevPageObjectsByPageIndex = function(contentData, nIndex ...@@ -1410,6 +1418,7 @@ CONTENTVIEW_GETDATA.getPrevPageObjectsByPageIndex = function(contentData, nIndex
} }
} }
} }
}; };
//Switch canvas when flipping page //Switch canvas when flipping page
......
...@@ -122,11 +122,21 @@ CONTENTVIEW_IMAGEPREVIEW.optimizeSizeImagePreview = function() { ...@@ -122,11 +122,21 @@ CONTENTVIEW_IMAGEPREVIEW.optimizeSizeImagePreview = function() {
var maxW = "798"; var maxW = "798";
var ratio = 1.566; var ratio = 1.566;
var maxH = maxW / ratio; var maxH = maxW / ratio;
var canvas = document.getElementById('main');
if(ClientData.isStreamingMode()){
if( canvas.width < maxW ){
maxW = canvas.width * 0.9;
maxH = maxW / ratio;
}
}
$("#dialog").css('width', maxW + 'px');
$("#dialog").css('height', maxH + 'px');
/*
if ($("#dialog").width() < maxW || $("#dialog").height() < maxH) { if ($("#dialog").width() < maxW || $("#dialog").height() < maxH) {
if ($("#dialog").width() < maxW) { if ($("#dialog").width() < maxW) {
$("#dialog").css('width', maxW + 'px'); $("#dialog").css('width', maxW + 'px');
$("#dialog").css('height', maxH + 'px'); $("#dialog").css('height', maxH + 'px');
...@@ -140,6 +150,7 @@ CONTENTVIEW_IMAGEPREVIEW.optimizeSizeImagePreview = function() { ...@@ -140,6 +150,7 @@ CONTENTVIEW_IMAGEPREVIEW.optimizeSizeImagePreview = function() {
$("#dialog").css('width', maxW + 'px'); $("#dialog").css('width', maxW + 'px');
$("#dialog").css('height', maxH + 'px'); $("#dialog").css('height', maxH + 'px');
} }
*/
$("#dialog").center(); $("#dialog").center();
}; };
......
...@@ -133,8 +133,6 @@ CONTENTVIEW_INITOBJECT.initPage = function() { ...@@ -133,8 +133,6 @@ CONTENTVIEW_INITOBJECT.initPage = function() {
// Lock screen // Lock screen
//COMMON.LockScreen(); //COMMON.LockScreen();
$("#debug").html("test_111");
CONTENTVIEW.StartTimerUpdateLog(); CONTENTVIEW.StartTimerUpdateLog();
...@@ -250,8 +248,8 @@ CONTENTVIEW_INITOBJECT.initPage = function() { ...@@ -250,8 +248,8 @@ CONTENTVIEW_INITOBJECT.initPage = function() {
/*Init Page */ /*Init Page */
CONTENTVIEW_GENERAL.nAjaxLoad++; CONTENTVIEW_GENERAL.nAjaxLoad++;
console.log("nAjaxLoad:" + CONTENTVIEW_GENERAL.nAjaxLoad); //console.log("nAjaxLoad:" + CONTENTVIEW_GENERAL.nAjaxLoad);
$("#debug").html("nAjaxLoad:" + CONTENTVIEW_GENERAL.nAjaxLoad); //CONTENTVIEW_STREAMING.debugLog("nAjaxLoad:" + CONTENTVIEW_GENERAL.nAjaxLoad);
if (CONTENTVIEW_GENERAL.nAjaxLoad == 8) { if (CONTENTVIEW_GENERAL.nAjaxLoad == 8) {
...@@ -278,7 +276,7 @@ CONTENTVIEW_INITOBJECT.initPage = function() { ...@@ -278,7 +276,7 @@ CONTENTVIEW_INITOBJECT.initPage = function() {
.setUpPage(0); .setUpPage(0);
CONTENTVIEW_CREATEOBJECT.createPageBGM(); CONTENTVIEW_CREATEOBJECT.createPageBGM();
//Get next //Get next
if(CONTENTVIEW_GENERAL.totalPage > 1){ if(CONTENTVIEW_GENERAL.totalPage > 1){
CONTENTVIEW_GETDATA.getNextPageObjectsByPageIndex(CONTENTVIEW_GENERAL.pageObjectsData, CONTENTVIEW_GETDATA.getPageIndex() + 1); CONTENTVIEW_GETDATA.getNextPageObjectsByPageIndex(CONTENTVIEW_GENERAL.pageObjectsData, CONTENTVIEW_GETDATA.getPageIndex() + 1);
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
//名前空間用のオブジェクトを用意する //名前空間用のオブジェクトを用意する
var CONTENTVIEW_STREAMING = {}; var CONTENTVIEW_STREAMING = {};
CONTENTVIEW_STREAMING.isShowMenu = false;
CONTENTVIEW_STREAMING.ready = function(){ CONTENTVIEW_STREAMING.ready = function(){
//CONTENTVIEW.handleDisplayToolbar(); //CONTENTVIEW.handleDisplayToolbar();
...@@ -10,7 +12,7 @@ CONTENTVIEW_STREAMING.ready = function(){ ...@@ -10,7 +12,7 @@ CONTENTVIEW_STREAMING.ready = function(){
CONTENTVIEW_STREAMING.movePage = function(pageNo){ CONTENTVIEW_STREAMING.movePage = function(pageNo){
console.log("CONTENTVIEW_STREAMING.movePage"); //console.log("CONTENTVIEW_STREAMING.movePage");
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() || CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) { if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() || CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
//ページ番号を送信 //ページ番号を送信
var url = "abookpagemove://?contentId=" + CONTENTVIEW_GENERAL.contentID + "&page=" + pageNo; var url = "abookpagemove://?contentId=" + CONTENTVIEW_GENERAL.contentID + "&page=" + pageNo;
...@@ -21,7 +23,7 @@ CONTENTVIEW_STREAMING.movePage = function(pageNo){ ...@@ -21,7 +23,7 @@ CONTENTVIEW_STREAMING.movePage = function(pageNo){
CONTENTVIEW_STREAMING.moveContent = function(contentId){ CONTENTVIEW_STREAMING.moveContent = function(contentId){
console.log("CONTENTVIEW_STREAMING.moveContent"); //console.log("CONTENTVIEW_STREAMING.moveContent");
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() || CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) { if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() || CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
//コンテンツIDを送信 //コンテンツIDを送信
var url = "abookopen://?contentId=" + contentId; var url = "abookopen://?contentId=" + contentId;
...@@ -32,28 +34,51 @@ CONTENTVIEW_STREAMING.moveContent = function(contentId){ ...@@ -32,28 +34,51 @@ CONTENTVIEW_STREAMING.moveContent = function(contentId){
CONTENTVIEW_STREAMING.sendLog = function(){ CONTENTVIEW_STREAMING.sendLog = function(){
console.log("CONTENTVIEW_STREAMING.sendLog"); //console.log("CONTENTVIEW_STREAMING.sendLog");
COMMON.SetEndLog(CONTENTVIEW_GENERAL.contentID); COMMON.SetEndLog(CONTENTVIEW_GENERAL.contentID);
COMMON.RegisterLog(); COMMON.RegisterLog();
//サウンド再生中なら停止
CONTENTVIEW.stopAllAudio();
//送信終了を通知 //送信終了を通知
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() || CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) { if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() || CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
var url = "abooksendlog://?send=true"; var url = "abooksendlog://?send=true";
location.href = url; location.href = url;
//$("#debug").html("abooksendlog://?send=true"); //CONTENTVIEW_STREAMING.debugLog("abooksendlog://?send=true");
} }
}; };
CONTENTVIEW_STREAMING.initPageView = function(){ CONTENTVIEW_STREAMING.initPageView = function(){
console.log("CONTENTVIEW_STREAMING.initPageView"); //console.log("CONTENTVIEW_STREAMING.initPageView");
//初期描画完了を通知 //初期描画完了を通知
//if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() || CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) { //if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() || CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos()) { if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos()) {
var url = "abookopenfinish://?init=true"; var url = "abookopenfinish://?init=true";
location.href = url; location.href = url;
$("#debug").html("send abookopenfinish://?init=true"); //CONTENTVIEW_STREAMING.debugLog("send abookopenfinish://?init=true");
} }
}; };
CONTENTVIEW_STREAMING.handleDisplayToolbar = function(){
if(ClientData.isStreamingMode()){
if ($('#menu').is(':hidden')) {
// 非表示の場合の処理
$('#menu').show();
} else {
// 表示されている場合の処理
$('#menu').hide();
}
}
};
CONTENTVIEW_STREAMING.debugLog = function(msg){
//$("#debug").html(msg);
};
...@@ -19,16 +19,9 @@ STVIEW.processLogin = function(cid,sid) { ...@@ -19,16 +19,9 @@ STVIEW.processLogin = function(cid,sid) {
var apiLoginUrl = ClientData.conf_apiLoginUrl(); var apiLoginUrl = ClientData.conf_apiLoginUrl();
//alert("aaaa"); //alert("aaaa");
$('#main-error-message').html("aaaaaa"); $('#main-error-message').html("loading...");
$('#main-error-message').show(); $('#main-error-message').show();
//window.location.href = "abvw/" + COMMON.ScreenIds.ContentViewStreaming;
//window.location.href = "./login.html";
//location.href = "http://web3.agentec.jp/";
//$('#main-error-message').html("bcdef");
//$('#main-error-message').show();
AVWEB.avwCmsApiWithUrl(apiLoginUrl, null, 'webClientStreamingLogin', 'GET', params, function (data) { AVWEB.avwCmsApiWithUrl(apiLoginUrl, null, 'webClientStreamingLogin', 'GET', params, function (data) {
//requirePasswordChange = data.requirePasswordChange; //requirePasswordChange = data.requirePasswordChange;
LOGIN.userinfo_sid = data.sid; LOGIN.userinfo_sid = data.sid;
...@@ -48,23 +41,24 @@ STVIEW.processLogin = function(cid,sid) { ...@@ -48,23 +41,24 @@ STVIEW.processLogin = function(cid,sid) {
//ストリーミングモード有効化 //ストリーミングモード有効化
ClientData.isStreamingMode(true); ClientData.isStreamingMode(true);
//GPS情報 //GPS情報
ClientData.latitude(STVIEW.latitude); if( STVIEW.latitude != '' ){
ClientData.longitude(STVIEW.longitude); ClientData.latitude(STVIEW.latitude);
}
if( STVIEW.longitude != '' ){
ClientData.longitude(STVIEW.longitude);
}
$('#main-error-message').css('display', 'none'); $('#main-error-message').css('display', 'none');
if (data.requirePasswordChange == 0) { if (data.requirePasswordChange == 0) {
ClientData.userInfo_sid(ClientData.userInfo_sid_local()); ClientData.userInfo_sid(ClientData.userInfo_sid_local());
$('#main-error-message').html("login ok move to:" + COMMON.ScreenIds.ContentViewStreaming); //$('#main-error-message').html("login ok move to:" + COMMON.ScreenIds.ContentViewStreaming);
$('#main-error-message').show(); //$('#main-error-message').show();
//コンテンツIDセット //コンテンツIDセット
ClientData.contentInfo_contentId(cid); ClientData.contentInfo_contentId(cid);
//ストリーミングのビューアへ移動 //ストリーミングのビューアへ移動
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.ContentViewStreaming); AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.ContentViewStreaming + "?123456");
//$('#main-error-message').html("move...");
//$('#main-error-message').show();
} else { } else {
$('#main-error-message').html(AVWEB.format(I18N.i18nText('msgLoginErrWrong'), 'E001')); $('#main-error-message').html(AVWEB.format(I18N.i18nText('msgLoginErrWrong'), 'E001'));
...@@ -135,15 +129,39 @@ STVIEW.ready = function(){ ...@@ -135,15 +129,39 @@ STVIEW.ready = function(){
//location.href="http://freebsd.csie.nctu.edu.tw/~freedom/html5/"; //location.href="http://freebsd.csie.nctu.edu.tw/~freedom/html5/";
//return; //return;
//console.log("STVIEW.ready");
//引数の確認
var sid = COMMON.getUrlParam('sid', '');
var cid = COMMON.getUrlParam('cid', '');
var page = COMMON.getUrlParam('page', '');
var latitude = COMMON.getUrlParam('latitude', '');
var longitude = COMMON.getUrlParam('longitude', '');
var reload = COMMON.getUrlParam('reload', '');
var isView = false;
if( !sid || !cid ){
//表示出来ない
$('#main-error-message').html(AVWEB.format(I18N.i18nText('msgLoginErrWrong'), 'E001'));
$('#main-error-message').show();
return;
}
console.log("STVIEW.ready"); var isReload = false;
if( reload != "" ){
if( reload == "true" ){
isReload = true;
}
}
//---初期化 //---初期化
//セッションストレージクリア if( isReload == false ){
SessionStorageUtils.clear(); //セッションストレージクリア
AVWEB.avwUserSessionObj = null; SessionStorageUtils.clear();
// create new session AVWEB.avwUserSessionObj = null;
AVWEB.avwCreateUserSession(); // create new session
AVWEB.avwCreateUserSession();
}
I18N.initi18n(); I18N.initi18n();
var sysSettings = AVWEB.avwSysSetting(); // get info in conf.json var sysSettings = AVWEB.avwSysSetting(); // get info in conf.json
...@@ -157,23 +175,9 @@ console.log("STVIEW.ready"); ...@@ -157,23 +175,9 @@ console.log("STVIEW.ready");
ClientData.conf_apiLoginUrl( sysSettings.apiLoginUrl ); ClientData.conf_apiLoginUrl( sysSettings.apiLoginUrl );
ClientData.conf_apiResourceDlUrl( sysSettings. apiResourceDlUrl ); ClientData.conf_apiResourceDlUrl( sysSettings. apiResourceDlUrl );
//念のため前回までの閲覧ログは削除 if( isReload == false ){
ClientData.ContentLogData([]); //念のため前回までの閲覧ログは削除
//---初期化 ClientData.ContentLogData([]);
//引数の確認
var sid = COMMON.getUrlParam('sid', '');
var cid = COMMON.getUrlParam('cid', '');
var page = COMMON.getUrlParam('page', '');
var latitude = COMMON.getUrlParam('latitude', '');
var longitude = COMMON.getUrlParam('longitude', '');
var isView = false;
if( !sid || !cid ){
//表示出来ない
$('#main-error-message').html(AVWEB.format(I18N.i18nText('msgLoginErrWrong'), 'E001'));
$('#main-error-message').show();
return;
} }
//ページ番号指定有り //ページ番号指定有り
...@@ -186,7 +190,7 @@ console.log("STVIEW.ready"); ...@@ -186,7 +190,7 @@ console.log("STVIEW.ready");
if( latitude != "" ){ if( latitude != "" ){
STVIEW.latitude = latitude; STVIEW.latitude = latitude;
} }
if( latitude != "" ){ if( longitude != "" ){
STVIEW.longitude = longitude; STVIEW.longitude = longitude;
} }
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<script type="text/javascript" src="./abvw/common/js/common.js?__UPDATEID__"></script> <script type="text/javascript" src="./abvw/common/js/common.js?__UPDATEID__"></script>
<script type="text/javascript" src="./abvw/js/Limit_Access_Content.js?__UPDATEID__"></script> <script type="text/javascript" src="./abvw/js/Limit_Access_Content.js?__UPDATEID__"></script>
<script type="text/javascript" src="./abvw/js/login.js?__UPDATEID__"></script> <script type="text/javascript" src="./abvw/js/login.js?__UPDATEID__"></script>
<script type="text/javascript" src="./abvw/js/stview.js?__UPDATEID__"></script> <script type="text/javascript" src="./abvw/js/stview.js?__UPDATEID__2"></script>
<style> <style>
#loader-bg { #loader-bg {
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
//デバイスから呼ばれる //デバイスから呼ばれる
function setLocation(latitude, longitude){ function setLocation(latitude, longitude){
alert("stview receive setLocation:" + latitude + "," + longitude ); //alert("stview receive setLocation:" + latitude + "," + longitude );
if( STVIEW.latitude != null ){ if( STVIEW.latitude != null ){
STVIEW.latitude = latitude; STVIEW.latitude = latitude;
} }
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
//デバイスから呼ばれる閲覧ログ送信指示 //デバイスから呼ばれる閲覧ログ送信指示
function sendLog(){ function sendLog(){
alert("stview receive sendLog "); //alert("stview receive sendLog ");
//送信終了を通知 //送信終了を通知
//if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() || CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) { //if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() || CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
var url = "abooksendlog://?send=true"; var url = "abooksendlog://?send=true";
......
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