Now support decoded playlist url

This commit is contained in:
Julien Lengrand-Lambert
2017-06-07 09:02:49 +02:00
parent 2e2eec583f
commit 679f1c4d38
2 changed files with 10 additions and 2 deletions

View File

@@ -15,7 +15,7 @@
height="450"
scrolling="no"
frameborder="no"
src="https://w.soundcloud.com/player/?url={{playlistUrl}}&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true">
src="https://w.soundcloud.com/player/?url={{encodedPlaylistUrl}}&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true">
</iframe>
</template>
@@ -27,7 +27,15 @@
type: String,
value: "",
reflectToAttribute: true
},
encodedPlaylistUrl: {
type: String,
computed: '_encodePlaylistUrl(playlistUrl)'
}
},
_encodePlaylistUrl: function(playlistUrl){
return encodeURIComponent(playlistUrl);
}
});
</script>

View File

@@ -13,6 +13,6 @@
<body>
<sc-title></sc-title>
<sc-profile></sc-profile>
<sc-player playlist-url="https%3A%2F%2Fsoundcloud.com%2Fstuart-silva-322219159%2Fsets%2Fromantic-songs-mariela"></sc-player>
<sc-player playlist-url="https://soundcloud.com/stuart-silva-322219159/sets/romantic-songs-mariela"></sc-player>
</body>
</html>