contentview_Streaming.js 2.15 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84

//名前空間用のオブジェクトを用意する
var CONTENTVIEW_STREAMING = {};

CONTENTVIEW_STREAMING.isShowMenu = false;

CONTENTVIEW_STREAMING.ready = function(){
	
	//CONTENTVIEW.handleDisplayToolbar();
	
};

CONTENTVIEW_STREAMING.movePage = function(pageNo){
	
	//console.log("CONTENTVIEW_STREAMING.movePage");
	if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() || CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
		//ページ番号を送信
		var url = "abookpagemove://?contentId=" + CONTENTVIEW_GENERAL.contentID + "&page=" + pageNo;
		location.href = url;
	}
	
};

CONTENTVIEW_STREAMING.moveContent = function(contentId){
	
	//console.log("CONTENTVIEW_STREAMING.moveContent");
	if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() || CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
		//コンテンツIDを送信
		var url = "abookopen://?contentId=" + contentId;
		location.href = url;
	}
	
};

CONTENTVIEW_STREAMING.sendLog = function(){
	
	//console.log("CONTENTVIEW_STREAMING.sendLog");
	COMMON.SetEndLog(CONTENTVIEW_GENERAL.contentID);
	COMMON.RegisterLog();
	
	//サウンド再生中なら停止
	CONTENTVIEW.stopAllAudio();
	
	//送信終了を通知
	if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() || CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
		var url = "abooksendlog://?send=true";
		location.href = url;
		//CONTENTVIEW_STREAMING.debugLog("abooksendlog://?send=true");
	}
};

CONTENTVIEW_STREAMING.initPageView = function(){
	
	//console.log("CONTENTVIEW_STREAMING.initPageView");
	//初期描画完了を通知
	//if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() || CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
	if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos()) {
		var url = "abookopenfinish://?init=true";
		location.href = url;
		//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);
	
};