如何自动播放Spotify播放列表URI? [英] How to autoplay Spotify playlist URI?
问题描述
当前正在开发一个网站,该网站将Spotify播放列表及其URI嵌入为:" https://embed.spotify.com/?uri=spotify:playlist:4hYaUylcBHW9Se152NoIy0"我想知道是否有一个autoplay参数,该参数允许在加载网页时自动播放播放列表?
Currently developing a website that embeds a spotify playlist with its URI as so: "https://embed.spotify.com/?uri=spotify:playlist:4hYaUylcBHW9Se152NoIy0" I'm wondering if there's an autoplay parameter that allows the playlist to play automatically when the web page is loaded ?
在这些帖子中似乎已经提出了这个想法(有一个自动播放参数):(但没有一个人获得足够的选票来成功) https://community.spotify.com/t5/Closed-Ideas/All-Platforms-Autoplay-Parameter-for-Spotify-URIs/idi-p/1320044 上面的帖子提到这样做:spotify:用户:用户名:播放列表:播放列表代码:自动播放:true(只需单击链接即可播放)spotify:用户:用户名:播放列表:播放列表代码:自动播放:false(将不会播放,您需要按播放按钮)这篇文章( http://routenote.com/blog/how-to-embed-and-customise-spotify-in-websites-and-blogs/comment-page-1/#comment-428929 )建议您可以添加参数以查看封面或更改播放列表的颜色(尝试时不起作用),所以我想知道是否有类似的参数用于自动播放?这篇文章( Spotify播放按钮-自动播放?)说没有,但这是来自2012.
It seems like this idea (to have an autoplay parameter) has been proposed before in these posts: (But none of them have gotten enough votes to succeed) https://community.spotify.com/t5/Closed-Ideas/All-Platforms-Autoplay-Parameter-for-Spotify-URIs/idi-p/1320044 The post above mentions doing something like this: spotify:user:Username:playlist:PlaylistCode:autoplay:true (would play it just as you click on the link) spotify:user:Username:playlist:PlaylistCode:autoplay:false (would not play it, you would need to press the play button) This post (http://routenote.com/blog/how-to-embed-and-customise-spotify-in-websites-and-blogs/comment-page-1/#comment-428929) suggests that you can add parameters to view the cover art or change the color of your playlists (didn't work when I tried that), so I'm wondering if there's a similar parameter for autoplay? This post (Spotify Play Button - autoplay?) says it doesn't, but this was from 2012.
如果没有自动播放参数,是否可以通过Spotify Web API自动播放Spotify播放列表?根据此Stack Overflow帖子(关于Spotify API的更新,不允许自动播放),自动播放Spotify曲目时会出现故障,但我想知道是否存在内置的方法来自动播放Spotify播放列表?
And if there is no autoplay parameter, is there a way to autoplay a Spotify playlist via the Spotify Web API? According to this Stack Overflow post (Update on Spotify API not allowing auto play) , there was a glitch with autoplaying Spotify tracks, but I'm wondering if there's a built-in way to autoplay Spotify playlists?
最后,如果Spotify Web API不允许播放列表自动播放,其他人是否知道允许该播放列表的平台?这篇文章提到了Soundcloud和Vimeo作为其他选项: Spotify播放按钮-自动播放?
Lastly, if the Spotify Web API does not allow playlists to autoplay, do others know of the platforms that allow that? This post mentions Soundcloud and Vimeo as other options: Spotify Play Button - autoplay?
非常感谢!
推荐答案
播放列表似乎没有自动播放选项
The playlists don't seem to have an autoplay option
如果播放列表嵌入在您自己的网站中,则可以使用javascript单击播放按钮.
If the playlist is embedded in you own website you can click the play button using javascript.
document.querySelector('[title="Play"]').click()
这篇关于如何自动播放Spotify播放列表URI?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!