Commit 1ee56143 by vietdo

#9394 タップしてPlayで再生中に再度タップしても止まらない

parent d2e384b5
......@@ -34,15 +34,12 @@ TEXTOBJECT.getTextObjectImage = function(width, height, htmlData) {
var startRight = 0;
/* remove escape charactor '\' */
dataHtml = htmlData.replace(/\\/, '');
//dataHtml = dataHtml.toLowerCase();
console.log(dataHtml)
//console.log('dataHtml:' + dataHtml);
// parse
HTMLParser(dataHtml,
{
start: function (tag, attrs, unary) {
console.log(attrs);
var t = tag.toLowerCase();
/*
* DIVタグ
......
......@@ -1086,6 +1086,9 @@ CONTENTVIEW_CREATEOBJECT.audioType3 = function (mediaType, actionType, id, image
//詳細ログ作成
var objectLog = new ObjectLogEntity();
objectLog.contentid = CONTENTVIEW_GENERAL.contentID;
objectLog.pageNo = CONTENTVIEW_GETDATA.getPageIndex() + 1; //0始まりのページ番号
objectLog.objectId = objectId;
......@@ -1098,10 +1101,12 @@ CONTENTVIEW_CREATEOBJECT.audioType3 = function (mediaType, actionType, id, image
objectLog.locationY = y;
objectLog.locationHeight = h;
objectLog.locationWidth = w;
COMMON.SetObjectLog(CONTENTVIEW_GENERAL.contentID, objectLog);
//---
CONTENTVIEW_CREATEOBJECT.createAudio(audioFile, playType);
};
}
else {
......@@ -1749,7 +1754,7 @@ CONTENTVIEW_CREATEOBJECT.audioType1 = function (mediaType, actionType, id, image
COMMON.SetObjectLog(CONTENTVIEW_GENERAL.contentID, objectLog);
//---
CONTENTVIEW_CREATEOBJECT.createAudio(audioFile, "0")
CONTENTVIEW_CREATEOBJECT.createAudio(audioFile, "0");
};
};
CONTENTVIEW_CREATEOBJECT.audioType1.prototype = new CONTENTVIEW_CREATEOBJECT.PageObject();
......@@ -2566,24 +2571,6 @@ CONTENTVIEW_CREATEOBJECT.createAudio = function(audio, type) {
if (audio != '') {
if (type == "0") { /* play when click */
console.log("length"+$('#play_audio_0').length);
//
if($('#play_audio_0').length){
//pouseできるようにする
$("#playaudio").on("play", function (me) {
jQuery('audio').each(function (i,e) {
if (e != me.currentTarget)
{
this.pause();
}
});
});
//CONTENTVIEW.stopAllAudio();
//return;
}
CONTENTVIEW.stopAllAudio();
CONTENTVIEW.TypeAudio0 = type;
......@@ -2604,14 +2591,28 @@ CONTENTVIEW_CREATEOBJECT.createAudio = function(audio, type) {
} else {
//既に再生中か判定
$('#playaudio').html(
' <audio id="play_audio_0" loop="loop" autoplay ="autoplay">' +
' <source src="' + audio + '&key=' + (new Date()).toIdString() + '" type="audio/mpeg" />' +
' </audio>'
);
if($('#play_audio_0').length){
if(document.getElementById("play_audio_0").played) {
CONTENTVIEW_GENERAL.number ++;
} else {
CONTENTVIEW_GENERAL.number ++;
}
}
if(CONTENTVIEW_GENERAL.number % 2 == 0) {
document.getElementById("play_audio_0").pause();
} else {
document.getElementById("play_audio_0").play();
}
/* $('#playaudio').html(
' <audio id="play_audio_0" loop="loop" autoplay ="autoplay">' +
......
......@@ -843,12 +843,18 @@ CONTENTVIEW_EVENTS.onClick_CanvasMain = function(event) {
/* click pageObject */
if (isClickMemo == false) {
var isClickLinkList = false;
/* check exist object in mouse position */
CONTENTVIEW_GENERAL.positonX = CONTENTVIEW_GENERAL.newpositionX;
CONTENTVIEW_GENERAL.positonY = CONTENTVIEW_GENERAL.newpositionY;
var hitPageObj = CONTENTVIEW_GETDATA.getContent().currentPage.hitTest(imagePt.x, imagePt.y);
// newPostion
CONTENTVIEW_GENERAL.newpositionX = hitPageObj.x;
CONTENTVIEW_GENERAL.newpositionY = hitPageObj.y;
if (hitPageObj) {
if(!CONTENTVIEW.is3DObject(hitPageObj)){
if(((CONTENTVIEW_GENERAL.positonX != CONTENTVIEW_GENERAL.newpositionX) || (CONTENTVIEW_GENERAL.positonY != CONTENTVIEW_GENERAL.newpositionY)) && (CONTENTVIEW_GENERAL.positonX != undefined)) {
CONTENTVIEW_GENERAL.number = 0;
}
hitPageObj.action();
}
else{
......
......@@ -477,6 +477,11 @@ CONTENTVIEW_GENERAL.ready = function(initContentId){
CONTENTVIEW_GENERAL.standardRatio = 1; //未使用
CONTENTVIEW_GENERAL.currentRatio = 1; //未使用
CONTENTVIEW_GENERAL.resourceImage = new Image();
CONTENTVIEW_GENERAL.number = 0;
CONTENTVIEW_GENERAL.positonX = undefined;
CONTENTVIEW_GENERAL.positonY = undefined;
CONTENTVIEW_GENERAL.newpositionX = undefined;
CONTENTVIEW_GENERAL.newpositionY = undefined;
//START TRB00097 - Editor: Long - Date: 09/30/2013 - Summary : Get All Page size of content
//Array of pages size
......
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