【发布时间】:2014-04-30 07:54:54
【问题描述】:
使用 HTML5 标签,我为 iPhone 和 iPad 创建了一个包含多个文件的网页。所有这些标签都是使用 java 脚本动态创建的。我们可以同时播放多个音频文件,并且音频会重叠。
我尝试了几个解决方案,但没有一个对我有用。我需要解决使用 java 脚本或 jquery 以允许用户一次只播放一个音频文件。
下面是我实际在做的代码sn-p。
callDetailItems.push("<div class='notes' id='"+ notes.note_id +"'><div class='existingnote'><span class='existingnotetoedit' id='notedId"+ notes.note_id +"'>" + note_text + "</span><div><audio class=audioNote id='"+ notes.note_id +"' src='"+ audioNotePath +"' type=audio/mpeg preload=auto></audio><span class='timeduration'>" + timeDuration + "</span></div><span><p class=createdBy>-" + noteCreatedBy + "," + noteCreatedDateTimeAMPM + "</p></span></div><div class='notemenu'><div class='deletcallenote'>Delete Note</div></div><div class='editaddednote edtaddnote'><textarea class='editnt' id='editnt'></textarea><p class='formbtadd'><input type='button' value='Cancel' class='canceleditnote editnotebt' style='background: none repeat scroll 0 0 #848484;border: 1px solid #CCCCCC;color: #FFFFFF;font-size: 1em;padding: 5px; vertical-align:top;' data-role='none' /><input type='button' value='Save' class='saveeditnote editnotebt' style='background: none repeat scroll 0 0 #848484;border: 1px solid #CCCCCC;color: #FFFFFF;font-size: 1em;padding: 5px;' data-role='none' /> </p></div></div>");
请提供一些解决方案。
【问题讨论】:
标签: javascript jquery iphone html audio