【发布时间】:2015-06-20 19:41:36
【问题描述】:
我有一个响应式音乐网络应用程序,允许移动使用。我无法让 soundcloud 流在 iphone 上的 chrome 或 safari 浏览器中运行。
歌曲加载(加载曲目名称)但它只是像这样坐在那里:
我已经用我的客户端 ID ({"http_mp3_128_url":"https://cf-media.sndcdn.com/u8ouac3FqckU.128.mp3?) 测试了这首歌确实是一首 mp3。
什么可能导致歌曲无法在移动浏览器中播放?
支持它的代码是这样的:
<i class="fa fa-play falist" ng-click="player.play(show, $index)" ng-show="$index != trackPlayingIndex"></i>
<i class="fa fa-pause falist" ng-click="player.pause(show, $index)" ng-show="$index == trackPlayingIndex"></i></span>
控制器/服务:
SC.stream(track.properties.stream_url, function(sound){
if (playingSound) {
playingSound.stop();
}
sound.play({
whileplaying: function () {
player.duration = Math.floor(this.durationEstimate / 1000);
player.position = Math.floor(this.position / 1000);
player.progress = (this.position / this.durationEstimate) * 100;
$rootScope.$broadcast('statusChanged', true);
},
onfinish: function () {
$rootScope.$broadcast('finished');
}
});
它在网络浏览器中运行良好,所以我必须为移动浏览器缺少一些东西。
【问题讨论】:
标签: ios iphone audio soundcloud soundmanager2