的SoundCloud API V3流在Chrome中不工作 [英] SoundCloud API v3 Stream not working in Chrome

查看:164
本文介绍了的SoundCloud API V3流在Chrome中不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在试图让这几个月工作,但它仍然没有工作。它除了谷歌浏览器的所有浏览器工作正常。问题是音频Chrome不流。

I have been trying to get this to work for months but it's still not working. It works fine in all browsers except Google Chrome. The problem is audio doesn't stream in Chrome.

下面是最基本的例子的JS提琴。 https://jsfiddle.net/sq23uxqs/

Here's a JS fiddle of the most basic example. https://jsfiddle.net/sq23uxqs/

首先,我有新的JavaScript SDK

First I include the new javascript SDK

 <script src="https://connect.soundcloud.com/sdk/sdk-3.0.0.js"></script>

然后在我的Javascript

Then in my Javascript

 SC.initialize({
            client_id: "78c2f0ffbef212328769a921e5663879"
          });


 SC.stream('/tracks/293').then(function(player){
         player.play();
 });

有谁知道这是为什么还是与API的问题吗?

Does anyone know why this is or is it a problem with the API?

推荐答案

经过调查似乎涉及与Flash播放器的问题。证据是,如果你去这里铬://插件/和不启动Flash播放器将在Chrome重新工作。但很明显,开发一个网站,当你不希望自己的网站只是为你工作。

After investigation it seems to be related to issues with the flash player. Proof is that if you go here chrome://plugins/ and disactivate the flash player it will work again in Chrome. But obviously when developing a site you don't want the site to work just for you.

的SoundCloud阿比似乎使用soundmanager2作为基础来处理音频流本身有2种模式Flash和HTML5。问题是,如果Flash播放器是avaible它会尝试使用它,失明,如果它不是用它只会使用HTML5和工作的时候了。

Soundcloud Api seems to use soundmanager2 as a base to handle audio stream that itself have 2 modes flash and html5. The issue is that if the flash player is avaible it will try to use it and fail while if it's not available it will just use html5 and work right away.

https://github.com/soundcloud/soundcloud-javascript/issues/39

这篇关于的SoundCloud API V3流在Chrome中不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆