Commit fe83191c by Masaru Abe

ストリーミング対応

parent f9e9d170
......@@ -2298,12 +2298,13 @@ COMMON.SetStartLog = function(strContentId) {
for (var nIndex = 0; nIndex < arrContentLogs.length; nIndex++) {
if (arrContentLogs[nIndex].contentid == strContentId) {
arrContentLogs[nIndex].readingStartDate = new Date();
arrContentLogs[nIndex].readingEndDate = (new Date()).addSeconds(1);
// Reading time
arrContentLogs[nIndex].readingTime = arrContentLogs[nIndex].readingEndDate.subtractBySeconds(arrContentLogs[nIndex].readingStartDate);
if(!ClientData.isStreamingMode()){
arrContentLogs[nIndex].readingStartDate = new Date();
arrContentLogs[nIndex].readingEndDate = (new Date()).addSeconds(1);
// Reading time
arrContentLogs[nIndex].readingTime = arrContentLogs[nIndex].readingEndDate.subtractBySeconds(arrContentLogs[nIndex].readingStartDate);
}
isFound = true;
break;
}
......
......@@ -77,7 +77,8 @@
</script>
</head>
<body id="viewer" oncontextmenu="return false;">
<!-- oncontextmenu="return false;" -->
<body id="viewer" >
<div id="wrapper">
<!--Viewer component is added here -->
......
......@@ -7,7 +7,7 @@
<meta http-equiv="Cache-Control" content="no-store">
<meta http-equiv="Cache-Control" content="no-cache">
<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" />
-->
......@@ -84,7 +84,7 @@
opacity: 0.6;
}
#menu li {
width: 14.3%;
width: 14.2%;
float: left;
padding: 0;
margin: 0;
......@@ -96,7 +96,7 @@
font-size: 14px;
font-weight: bold;
margin: 0;
padding: 12px 0;
padding: 6px 0;
text-decoration: none;
display: block;
}
......@@ -111,6 +111,9 @@
$(document).ready(function() {
//CONTENTVIEW.ready();
//CONTENTVIEW_STREAMING.ready();
//$('#menu').hide();
});
//デバイスから呼ばれるGPS情報
......@@ -495,14 +498,14 @@
</div>
<div id="debug"></div>
<ul id="menu">
<li><a id="firstpage" >最初</a></li>
<li><a id="prevpage" ></a></li>
<li><a id="nextpage" ></a></li>
<li><a id="lastpage" >最後</a></li>
<li><a id="zoomin" ></a></li>
<li><a id="zoomfit" ></a></li>
<li><a id="zoomout" ></a></li>
<ul id="menu" style="display:none;">
<li><a id="firstpage" ><img src="img/menu/icon-fast-forward.png" alt=""></a></li>
<li><a id="prevpage" ><img src="img/menu/icon-chevron-left.png" alt=""></a></li>
<li><a id="nextpage" ><img src="img/menu/icon-chevron-right.png" alt=""></a></li>
<li><a id="lastpage" ><img src="img/menu/icon-fast-backward.png" alt=""></a></li>
<li><a id="zoomin" ><img src="img/menu/icon-zoom-in.png" alt=""></a></li>
<li><a id="zoomfit" ><img src="img/menu/icon-resize-small.png" alt=""></a></li>
<li><a id="zoomout" ><img src="img/menu/icon-zoom-out.png" alt=""></a></li>
</ul>
<iframe style="height:0px;width:0px;visibility:hidden" src="about:blank">
......@@ -510,3 +513,4 @@
</iframe>
</body>
</html>
......@@ -1602,7 +1602,7 @@ CONTENTVIEW.oldContent_Back = function() {
/* handle display or hide toolbar */
CONTENTVIEW.handleDisplayToolbar = function() {
console.log("CONTENTVIEW_GENERAL.isLoadingObject:" + CONTENTVIEW_GENERAL.isLoadingObject);
//console.log("CONTENTVIEW_GENERAL.isLoadingObject:" + CONTENTVIEW_GENERAL.isLoadingObject);
if (CONTENTVIEW_GENERAL.isLoadingObject == false) {
/* save marking */
......@@ -2642,6 +2642,7 @@ CONTENTVIEW.ContentPage.prototype.addPageObjects = function (pageObjects) {
obj.objectId
);
} else if (obj.actionType == 6) { /*send mail */
pageObj = new CONTENTVIEW_CREATEOBJECT.sendMail(
obj.mediaType,
obj.actionType,
......@@ -2912,8 +2913,10 @@ CONTENTVIEW.ContentPage.prototype.addPageObjects = function (pageObjects) {
obj.objectId
);
}
// add pageObject
this.addPageObject(pageObj);
if( pageObj != null ){
// add pageObject
this.addPageObject(pageObj);
}
}
};
//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) {
+ '</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>'
);
$('#dialog h1 img').click(function(){
//時間記録
var dateEnd = new Date();
var actionTime = dateEnd.subtractBySeconds(dateStart);
//alert("actionTime:" + actionTime);
COMMON.SetObjectLogActionTime( CONTENTVIEW_GENERAL.contentID, objectId, actionTime );
$container.removeAttr('style');
CONTENTVIEW_GENERAL.hideDialog();
$("#dialog h1 img").on({
'click touchend': function(ev){
//時間記録
var dateEnd = new Date();
var actionTime = dateEnd.subtractBySeconds(dateStart);
//alert("actionTime:" + actionTime);
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) {
if(!CONTENTVIEW_EVENTS.isPreventClick){
//その他のエリア
console.log("click!!");
//console.log("click!!");
}
}
......@@ -1416,22 +1416,15 @@ CONTENTVIEW_EVENTS.resetNaviAction = function(){
};
CONTENTVIEW_EVENTS.onTouchstart = function(evt){
//evt.preventDefault();
//if(ClientData.isStreamingMode()){
// if ($('#menu').is(':hidden')) {
// // 非表示の場合の処理
// $('#menu').show();
// } else {
// // 表示されている場合の処理
// $('#menu').hide();
// }
//}
if(ClientData.IsAddingMarking() == true){
return;
}
//evt.preventDefault();
//$('#debug').html("CONTENTVIEW_EVENTS.onTouchstart");
//CONTENTVIEW_STREAMING.handleDisplayToolbar();
var bContinue = true;
//if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() || CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
......@@ -2180,6 +2173,10 @@ CONTENTVIEW_EVENTS.onTouchend = function(evt){
CONTENTVIEW_EVENTS.nextPage_click();
}
}
//CONTENTVIEW_STREAMING.debugLog("CONTENTVIEW_EVENTS.onTouchEnd");
CONTENTVIEW_STREAMING.handleDisplayToolbar();
}
}
}
......
......@@ -36,7 +36,6 @@ CONTENTVIEW_GETDATA.getPageObjectsByPageIndex = function(contentData, nIndexPage
/*get object page*/
if (currentPageObjects[nIndex].mediaType == 1) {/*media type = 1 */
var pageObject = CONTENTVIEW_GETDATA.getMediaType1(currentPageObjects[nIndex]);
/*add object to page */
CONTENTVIEW_GENERAL.pageObjects.push(pageObject);
} else if (currentPageObjects[nIndex].mediaType == 2) { /*mediaType = 2 */
......@@ -96,6 +95,13 @@ CONTENTVIEW_GETDATA.getMediaType1 = function(iValueObj) {
* Action Type = 11 : html
*/
//ストリーミングならemailは表示しない
//if(ClientData.isStreamingMode()){
// if (iValueObj.action.actionType == 6) {
// return null;
// }
//}
var pageObject = [];
pageObject['mediaType'] = iValueObj.mediaType;
......@@ -318,6 +324,8 @@ CONTENTVIEW_GETDATA.getMediaType1 = function(iValueObj) {
}
//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["resourceUrl"] = resourceUrl;
}
......@@ -1262,14 +1270,13 @@ CONTENTVIEW_GETDATA.renderPrevPage = function(){
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){
CONTENTVIEW_GENERAL.prevPageImage = CONTENTVIEW_GENERAL.pageImages;
CONTENTVIEW_GENERAL.prevContent.setPageImages(CONTENTVIEW_GENERAL.totalPage, CONTENTVIEW_GENERAL.prevPageImage)
.setPageObjects(CONTENTVIEW_GENERAL.prevPageObjects)
.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
......@@ -1299,8 +1306,8 @@ CONTENTVIEW_GETDATA.getNextPageObjectsByPageIndex = function(contentData, nIndex
/*get object page*/
if (currentPageObjects[nIndex].mediaType == 1) {/*media type = 1 */
var pageObject = CONTENTVIEW_GETDATA.getMediaType1(currentPageObjects[nIndex]);
/*add object to page */
CONTENTVIEW_GENERAL.nextPageObjects.push(pageObject);
/*add object to page */
CONTENTVIEW_GENERAL.nextPageObjects.push(pageObject);
} else if (currentPageObjects[nIndex].mediaType == 2) { /*mediaType = 2 */
var pageObject = CONTENTVIEW_GETDATA.getMediaType2(currentPageObjects[nIndex]);
/*add object to page */
......@@ -1345,6 +1352,7 @@ CONTENTVIEW_GETDATA.getNextPageObjectsByPageIndex = function(contentData, nIndex
//Get prev page objects by page index
CONTENTVIEW_GETDATA.getPrevPageObjectsByPageIndex = function(contentData, nIndexPage) {
CONTENTVIEW_GENERAL.prevPageObjects = [];
var currentPageObjects;
......@@ -1369,8 +1377,8 @@ CONTENTVIEW_GETDATA.getPrevPageObjectsByPageIndex = function(contentData, nIndex
/*get object page*/
if (currentPageObjects[nIndex].mediaType == 1) {/*media type = 1 */
var pageObject = CONTENTVIEW_GETDATA.getMediaType1(currentPageObjects[nIndex]);
/*add object to page */
CONTENTVIEW_GENERAL.prevPageObjects.push(pageObject);
/*add object to page */
CONTENTVIEW_GENERAL.prevPageObjects.push(pageObject);
} else if (currentPageObjects[nIndex].mediaType == 2) { /*mediaType = 2 */
var pageObject = CONTENTVIEW_GETDATA.getMediaType2(currentPageObjects[nIndex]);
/*add object to page */
......@@ -1410,6 +1418,7 @@ CONTENTVIEW_GETDATA.getPrevPageObjectsByPageIndex = function(contentData, nIndex
}
}
}
};
//Switch canvas when flipping page
......
......@@ -122,11 +122,21 @@ CONTENTVIEW_IMAGEPREVIEW.optimizeSizeImagePreview = function() {
var maxW = "798";
var ratio = 1.566;
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").css('width', maxW + 'px');
$("#dialog").css('height', maxH + 'px');
......@@ -140,6 +150,7 @@ CONTENTVIEW_IMAGEPREVIEW.optimizeSizeImagePreview = function() {
$("#dialog").css('width', maxW + 'px');
$("#dialog").css('height', maxH + 'px');
}
*/
$("#dialog").center();
};
......
......@@ -133,8 +133,6 @@ CONTENTVIEW_INITOBJECT.initPage = function() {
// Lock screen
//COMMON.LockScreen();
$("#debug").html("test_111");
CONTENTVIEW.StartTimerUpdateLog();
......@@ -250,8 +248,8 @@ CONTENTVIEW_INITOBJECT.initPage = function() {
/*Init Page */
CONTENTVIEW_GENERAL.nAjaxLoad++;
console.log("nAjaxLoad:" + CONTENTVIEW_GENERAL.nAjaxLoad);
$("#debug").html("nAjaxLoad:" + CONTENTVIEW_GENERAL.nAjaxLoad);
//console.log("nAjaxLoad:" + CONTENTVIEW_GENERAL.nAjaxLoad);
//CONTENTVIEW_STREAMING.debugLog("nAjaxLoad:" + CONTENTVIEW_GENERAL.nAjaxLoad);
if (CONTENTVIEW_GENERAL.nAjaxLoad == 8) {
......@@ -278,7 +276,7 @@ CONTENTVIEW_INITOBJECT.initPage = function() {
.setUpPage(0);
CONTENTVIEW_CREATEOBJECT.createPageBGM();
//Get next
if(CONTENTVIEW_GENERAL.totalPage > 1){
CONTENTVIEW_GETDATA.getNextPageObjectsByPageIndex(CONTENTVIEW_GENERAL.pageObjectsData, CONTENTVIEW_GETDATA.getPageIndex() + 1);
......
......@@ -2,6 +2,8 @@
//名前空間用のオブジェクトを用意する
var CONTENTVIEW_STREAMING = {};
CONTENTVIEW_STREAMING.isShowMenu = false;
CONTENTVIEW_STREAMING.ready = function(){
//CONTENTVIEW.handleDisplayToolbar();
......@@ -10,7 +12,7 @@ CONTENTVIEW_STREAMING.ready = function(){
CONTENTVIEW_STREAMING.movePage = function(pageNo){
console.log("CONTENTVIEW_STREAMING.movePage");
//console.log("CONTENTVIEW_STREAMING.movePage");
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() || CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
//ページ番号を送信
var url = "abookpagemove://?contentId=" + CONTENTVIEW_GENERAL.contentID + "&page=" + pageNo;
......@@ -21,7 +23,7 @@ CONTENTVIEW_STREAMING.movePage = function(pageNo){
CONTENTVIEW_STREAMING.moveContent = function(contentId){
console.log("CONTENTVIEW_STREAMING.moveContent");
//console.log("CONTENTVIEW_STREAMING.moveContent");
if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() || CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
//コンテンツIDを送信
var url = "abookopen://?contentId=" + contentId;
......@@ -32,28 +34,51 @@ CONTENTVIEW_STREAMING.moveContent = function(contentId){
CONTENTVIEW_STREAMING.sendLog = function(){
console.log("CONTENTVIEW_STREAMING.sendLog");
//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;
//$("#debug").html("abooksendlog://?send=true");
//CONTENTVIEW_STREAMING.debugLog("abooksendlog://?send=true");
}
};
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()) {
var url = "abookopenfinish://?init=true";
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) {
var apiLoginUrl = ClientData.conf_apiLoginUrl();
//alert("aaaa");
$('#main-error-message').html("aaaaaa");
$('#main-error-message').html("loading...");
$('#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) {
//requirePasswordChange = data.requirePasswordChange;
LOGIN.userinfo_sid = data.sid;
......@@ -48,23 +41,24 @@ STVIEW.processLogin = function(cid,sid) {
//ストリーミングモード有効化
ClientData.isStreamingMode(true);
//GPS情報
ClientData.latitude(STVIEW.latitude);
ClientData.longitude(STVIEW.longitude);
if( STVIEW.latitude != '' ){
ClientData.latitude(STVIEW.latitude);
}
if( STVIEW.longitude != '' ){
ClientData.longitude(STVIEW.longitude);
}
$('#main-error-message').css('display', 'none');
if (data.requirePasswordChange == 0) {
ClientData.userInfo_sid(ClientData.userInfo_sid_local());
$('#main-error-message').html("login ok move to:" + COMMON.ScreenIds.ContentViewStreaming);
$('#main-error-message').show();
//$('#main-error-message').html("login ok move to:" + COMMON.ScreenIds.ContentViewStreaming);
//$('#main-error-message').show();
//コンテンツIDセット
ClientData.contentInfo_contentId(cid);
//ストリーミングのビューアへ移動
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.ContentViewStreaming);
//$('#main-error-message').html("move...");
//$('#main-error-message').show();
AVWEB.avwScreenMove("abvw/" + COMMON.ScreenIds.ContentViewStreaming + "?123456");
} else {
$('#main-error-message').html(AVWEB.format(I18N.i18nText('msgLoginErrWrong'), 'E001'));
......@@ -135,15 +129,39 @@ STVIEW.ready = function(){
//location.href="http://freebsd.csie.nctu.edu.tw/~freedom/html5/";
//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;
}
}
//---初期化
//セッションストレージクリア
SessionStorageUtils.clear();
AVWEB.avwUserSessionObj = null;
// create new session
AVWEB.avwCreateUserSession();
if( isReload == false ){
//セッションストレージクリア
SessionStorageUtils.clear();
AVWEB.avwUserSessionObj = null;
// create new session
AVWEB.avwCreateUserSession();
}
I18N.initi18n();
var sysSettings = AVWEB.avwSysSetting(); // get info in conf.json
......@@ -157,23 +175,9 @@ console.log("STVIEW.ready");
ClientData.conf_apiLoginUrl( sysSettings.apiLoginUrl );
ClientData.conf_apiResourceDlUrl( sysSettings. apiResourceDlUrl );
//念のため前回までの閲覧ログは削除
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;
if( isReload == false ){
//念のため前回までの閲覧ログは削除
ClientData.ContentLogData([]);
}
//ページ番号指定有り
......@@ -186,7 +190,7 @@ console.log("STVIEW.ready");
if( latitude != "" ){
STVIEW.latitude = latitude;
}
if( latitude != "" ){
if( longitude != "" ){
STVIEW.longitude = longitude;
}
......
......@@ -16,7 +16,7 @@
<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/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>
#loader-bg {
......@@ -64,7 +64,7 @@
//デバイスから呼ばれる
function setLocation(latitude, longitude){
alert("stview receive setLocation:" + latitude + "," + longitude );
//alert("stview receive setLocation:" + latitude + "," + longitude );
if( STVIEW.latitude != null ){
STVIEW.latitude = latitude;
}
......@@ -75,7 +75,7 @@
//デバイスから呼ばれる閲覧ログ送信指示
function sendLog(){
alert("stview receive sendLog ");
//alert("stview receive sendLog ");
//送信終了を通知
//if (CONTENTVIEW_GENERAL.avwUserEnvObj.isIos() || CONTENTVIEW_GENERAL.avwUserEnvObj.isAndroid()) {
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