简体   繁体   English

如何在Buzz音频中加载SoundCloud曲目

[英]How to load SoundCloud track in Buzz audio

I'm trying to load a track from SoundCloud into a Buzz audio object. 我正在尝试将SoundCloud中的曲目加载到Buzz音频对象中。 The streaming url redirects as expected when I paste it into my browser, but for some reason does not work correctly when I try to load it in the Buzz object. 当我将流媒体URL粘贴到浏览器中时,它会按预期的方向进行重定向,但是由于某些原因,当我尝试将其加载到Buzz对象中时,它无法正常工作。 I suspect it is the redirect that is breaking it (though I'm not sure why it would). 我怀疑是重定向破坏了它(尽管我不确定为什么会这样)。 I've tried a lot of different variations on 我尝试了许多不同的变化

SC.get('/resolve', { url: track_url }, function(track, err) {
  mySound = new buzz.sound(track.stream_url+'?client_id=201b55a1a16e7c0a122d112590b32e4a');
});  

JSFiddle JSFiddle

Am I missing something? 我想念什么吗?

UPDATE 更新
I ran the above fiddle on a Linux machine and it ran fine. 我在Linux机器上运行了上述小提琴,并且运行良好。 I was originally running this on Windows and that's where the problem is occurring. 我最初是在Windows上运行此程序的,而这正是问题所在。 The loadstart event fires and then 1 or 2 progress events fire and then nothing else happens. 触发loadstart事件,然后触发1或2个progress事件,然后什么也没有发生。

Machine where it runs: 运行它的机器:
Ubuntu 12.04 64-bit Ubuntu 12.04 64位
Intel i5; 英特尔i5; 8 GB 8 GB
Chromium (fairly recent version) 铬(相当新的版本)

Machine where it does not run: 无法运行的机器:
Windows 7 64-bit Windows 7 64位
Intel i7; 英特尔i7; 8 GB 8 GB
SRWare Iron Version 30.0.1650.0 (230000) SRWare铁版本30.0.1650.0(230000)
also on Firefox 31 也在Firefox 31上

The problem was the browser. 问题是浏览器。 I'd thought I'd ruled that out by running the fiddle on Firefox v31, but turns out what I'd actually run on FF was one of the variants that didn't work anywhere. 我以为我可以通过在Firefox v31上运行小提琴来排除这种情况,但是事实证明,我实际上在FF上运行的功能是无法在任何地方运行的变体之一。 When I tried the fiddle I linked in the question, on Firefox v31 running on the Windows machine, the track played correctly. 当我尝试在问题中链接的小提琴时,在Windows计算机上运行的Firefox v31上,曲目正确播放。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM