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

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();
	
	//送信終了を通知
	if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() || CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
		var url = "abooksendlog://?send=true";
		location.href = url;
		//$("#debug").html("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;
		$("#debug").html("send abookopenfinish://?init=true");
	}
	
};

