contentview_Streaming.js 2.15 KB
Newer Older
Masaru Abe committed
1 2 3 4

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

Masaru Abe committed
5 6
CONTENTVIEW_STREAMING.isShowMenu = false;

Masaru Abe committed
7 8 9 10 11 12 13 14
CONTENTVIEW_STREAMING.ready = function(){
	
	//CONTENTVIEW.handleDisplayToolbar();
	
};

CONTENTVIEW_STREAMING.movePage = function(pageNo){
	
Masaru Abe committed
15
	//console.log("CONTENTVIEW_STREAMING.movePage");
Masaru Abe committed
16 17 18 19 20 21 22 23 24 25
	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){
	
Masaru Abe committed
26
	//console.log("CONTENTVIEW_STREAMING.moveContent");
Masaru Abe committed
27 28 29 30 31 32 33 34 35 36
	if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() || CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
		//コンテンツIDを送信
		var url = "abookopen://?contentId=" + contentId;
		location.href = url;
	}
	
};

CONTENTVIEW_STREAMING.sendLog = function(){
	
Masaru Abe committed
37
	//console.log("CONTENTVIEW_STREAMING.sendLog");
Masaru Abe committed
38 39 40
	COMMON.SetEndLog(CONTENTVIEW_GENERAL.contentID);
	COMMON.RegisterLog();
	
Masaru Abe committed
41 42 43
	//サウンド再生中なら停止
	CONTENTVIEW.stopAllAudio();
	
Masaru Abe committed
44 45 46 47
	//送信終了を通知
	if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() || CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
		var url = "abooksendlog://?send=true";
		location.href = url;
Masaru Abe committed
48
		//CONTENTVIEW_STREAMING.debugLog("abooksendlog://?send=true");
Masaru Abe committed
49 50 51 52 53
	}
};

CONTENTVIEW_STREAMING.initPageView = function(){
	
Masaru Abe committed
54
	//console.log("CONTENTVIEW_STREAMING.initPageView");
Masaru Abe committed
55 56 57 58 59
	//初期描画完了を通知
	//if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() || CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
	if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos()) {
		var url = "abookopenfinish://?init=true";
		location.href = url;
Masaru Abe committed
60
		//CONTENTVIEW_STREAMING.debugLog("send abookopenfinish://?init=true");
Masaru Abe committed
61 62 63 64
	}
	
};

Masaru Abe committed
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
CONTENTVIEW_STREAMING.handleDisplayToolbar = function(){
	
	if(ClientData.isStreamingMode()){
		if ($('#menu').is(':hidden')) {
		    // 非表示の場合の処理
			$('#menu').show();
		} else {
		    // 表示されている場合の処理
			$('#menu').hide();
		}		
	}
	
};

CONTENTVIEW_STREAMING.debugLog = function(msg){
	
	//$("#debug").html(msg);
	
};