我正忙于一个音乐商店web应用程序,后端使用JAVA,前端使用Angular JS/HTML5/CSS3。 ammm,对于音乐播放我使用Sound Manager Java Script Library,所有的东西都可以和静态360播放器一起使用,但是当我尝试在ng-repeat指令中使用声音管理器时,这不起作用,请提供任何建议?并且是健全的管理者,通过角度js“ng-repeat”创建的live dom元素来工作?Soundmanager 2不能与角度js“ng-repeat”指令一起工作
声音管理器初始化
// init Sound Manager
soundManager.setup({
// path to directory containing SM2 SWF
url: 'player/'
});
threeSixtyPlayer.config.scaleFont = (navigator.userAgent.match(/msie/i)?false:true);
threeSixtyPlayer.config.showHMSTime = true;
// enable some spectrum stuffs
threeSixtyPlayer.config.useWaveformData = true;
threeSixtyPlayer.config.useEQData = true;
// enable this in SM2 as well, as needed
if (threeSixtyPlayer.config.useWaveformData) {
soundManager.flash9Options.useWaveformData = true;
}
if (threeSixtyPlayer.config.useEQData) {
soundManager.flash9Options.useEQData = true;
}
if (threeSixtyPlayer.config.usePeakData) {
soundManager.flash9Options.usePeakData = true;
}
if (threeSixtyPlayer.config.useWaveformData || threeSixtyPlayer.flash9Options.useEQData || threeSixtyPlayer.flash9Options.usePeakData) {
// even if HTML5 supports MP3, prefer flash so the visualization features can be used.
soundManager.preferFlash = true;
}
角NG重复
<div class="mod-contents">
<div class="questions-block" ng-repeat="question in filtered = (questionList | filter:searchKey | orderBy : predicate : reverse)">
<div class="col-xs-12 col-sm-4 col-md-3 pull-right">
<div class="thumbnail block-black ">
<h3 class="block-title rtl-element">{{ question.description }}<span class="text-muted"> ({{ question.cat_code }}) </span></h3>
<div class="ui360 ui360-vis player-wrapper-md player-md "><a href="pac_test.mp3"></a></div>
</div>
</div>
</div>
</div>
SoundManager只负责处理现有的DOM元素。如果您在SoundManager运行后添加新的DOM元素,那么它就成为您的责任。 – idbehold