javascript - SoundCloud SC.oEmbed returns html iframe with 404 -


i'm trying stream track soundcloud using javascript api, keep getting 404 when asking stream url:

 sc.oembed(track_url, { auto_play: false }).then(function(oembed) {        var iframecontainer = document.getelementbyid('soundcloud-preview-iframe-<?php echo $track->id; ?>')        iframecontainer.innerhtml = oembed.html;        var iframe = iframecontainer.getelementsbytagname("iframe")[0];        widget<?php echo $track->id; ?> = sc.widget(iframe);        widget<?php echo $track->id; ?>.bind(sc.widget.events.ready, function() {          jquery(".soundcloud-preview-control-<?php echo $track->id; ?>").addclass("soundcloud-preview-control-play").html('<!-- -->');        });        widget<?php echo $track->id; ?>.bind(sc.widget.events.play_progress, function() {          widget<?php echo $track->id; ?>.getposition(function(positionsc) {            if( (secondslimit*1000)<math.floor(positionsc) ) {              widget<?php echo $track->id; ?>.pause();              cursongid = '';              jquery(".soundcloud-preview-control-<?php echo $track->id; ?>").removeclass("soundcloud-preview-control-stop").addclass("soundcloud-preview-control-play");            }          });        });      });

i receive multiple 404 errors on console related @ call related @ oembed.html json object: https://soundcloud.com/oembed.json?auto_play=false&url=xxx

i'd know why using js api doesn't work.


Comments

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

transpose - Maple isnt executing function but prints function term -