ruby on rails - Soundcloud Embed: Uncaught TypeError: Layer must be a document node -
i have rails app uses embedded soundcloud players. player loaded in iframe includes basic rails view containing html used load player:
<iframe width="100%" height="300" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=<%= @id %>&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true"></iframe>
every , then, when loading site, player fails render , following error:
uncaught typeerror: layer must document node d @ widget-6dc4a288.js:21
we tried replacing raw html js code sc sdk, still experienced same error:
<script src="//connect.soundcloud.com/sdk-2.0.0.js"></script> <script> sc.initialize({ client_id: "<%= secret_key %>" }); sc.oembed("<%= @id %>", {auto_play: true, height: 300}, function(oembed){ document.getelementbyid('video-container').innerhtml = oembed.html; }); </script>
does know source of error? seems occur 1/4 times try render sc player.
Comments
Post a Comment