Commit 2333695b by vietdo

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

parent bb946e0e
......@@ -1616,7 +1616,6 @@ CONTENTVIEW_CREATEOBJECT.videoType1.prototype = new CONTENTVIEW_CREATEOBJECT.Pag
CONTENTVIEW_CREATEOBJECT.audioType1 = function (mediaType, actionType, id, imageUrl, x, y, w, h, visible, audioFile, audio, audioResourceId, objectId) {
this.setup(mediaType, actionType, id, imageUrl, x, y, w, h, visible, null, null, objectId);
this.action = function () {
//abe
//alert("audioType1");
//詳細ログ作成
......@@ -2384,8 +2383,7 @@ CONTENTVIEW_CREATEOBJECT.createTextConfirmAudio = function() {
CONTENTVIEW_CREATEOBJECT.createPage = function(pageNumber, pageImage, pageObjects, onCompleteFunc) {
//abe 次のページを作成している
//console.log("CreateObj_createPage:" + pageNumber)
console.log("CreateObj_createPage:" + pageNumber);
var page = new CONTENTVIEW.ContentPage(pageNumber, pageImage);
/* add page Object */
//Start Function: No.12
......@@ -2455,6 +2453,23 @@ CONTENTVIEW_CREATEOBJECT.createAudio = function(audio, type) {
if (audio != '') {
if (type == "0") { /* play when click */
//
if($('#play_audio_0').length){
//pouseできるようにする
var myAudio=document.getElementById("play_audio_0");
if (myAudio.paused)
{
myAudio.play();
} else {
myAudio.pause();
}
//CONTENTVIEW.stopAllAudio();
return;
}
CONTENTVIEW.stopAllAudio();
CONTENTVIEW.TypeAudio0 = type;
......@@ -2473,11 +2488,22 @@ CONTENTVIEW_CREATEOBJECT.createAudio = function(audio, type) {
' </audio>'
);
} else {
//既に再生中か判定
$('#playaudio').html(
' <audio id="play_audio_0" loop="loop" autoplay ="autoplay">' +
' <source src="' + audio + '&key=' + (new Date()).toIdString() + '" type="audio/mpeg" />' +
' </audio>'
);
/* $('#playaudio').html(
' <audio id="play_audio_0" loop="loop" autoplay ="autoplay">' +
' <source src="' + audio + '&key=' + (new Date()).toIdString() + '" type="audio/mpeg" />' +
' </audio>'
);*/
}
} else {
......
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