Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/396.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Wavesurfer+;Soundcloud在Safari上不起作用_Javascript_Api_Soundcloud - Fatal编程技术网

Javascript Wavesurfer+;Soundcloud在Safari上不起作用

Javascript Wavesurfer+;Soundcloud在Safari上不起作用,javascript,api,soundcloud,Javascript,Api,Soundcloud,我的网站使用wavesurfer.js插件和API Soundcloud来播放我的音乐。我有个问题。问题出在Safari浏览器上,我有一个错误:加载ressource失败:服务器响应状态为403(禁止)。我在另一个浏览器(例如Firefox和Chrome)上尝试了我的代码。成功了 var wavesurfer = Object.create(WaveSurfer); // init wavesurfer wavesurfer.init({ container : '#wf', wave

我的网站使用wavesurfer.js插件和API Soundcloud来播放我的音乐。我有个问题。问题出在Safari浏览器上,我有一个错误:加载ressource失败:服务器响应状态为403(禁止)。我在另一个浏览器(例如Firefox和Chrome)上尝试了我的代码。成功了

var wavesurfer = Object.create(WaveSurfer);
 // init wavesurfer
wavesurfer.init({
  container : '#wf',
  waveColor : '#E0E0E0',
  progressColor : '#222',
  cursorColor : 'transparent',
  scrollParent : true,
});


$('#app').on('click','#spotlightplayer__play',function(event){
    $this = $(this);
    $parent = $this.parents('div.spotlightplayer');
    SC.stream('/tracks/' + SPOTLIGHT_PLAYER_CONFIGURE.track_id,function(stream){
       wavesurfer.on('ready', function () {
            //wavesurfer.play();
            console.log("I'm ready");
        });
        wavesurfer.on('loading',function(){
            console.log('loading');
        });
        wavesurfer.on('error',function(){
            console.log('error');
        });
        wavesurfer.load(stream.url);

    });
});

谢谢

找到解决方案了吗?