html - Is it possible to get a direct audio file link from Soundcloud without JS
问题描述
I've seen many posts about using JS to embed SoundCloud tracks with API links, but I'm wondering if there is any possible way to use only the <audio>
and a SoundCloud file link in HTML?
The reason I need this is because I'm using Google Sheets as a widget for my website to display a list of audio files from different sources and using other sites and getting the mp3 link and throwing it in the list for the template works well but I can't do that with SoundCloud.
I know this is the URL I need:
http://api.soundcloud.com/tracks/TRACKID/stream?client_id=CLIENTID
I've tried inspecting the web page for this information, and it's not provided. I can only get the track ID.
My google sheet's template is connected to an app called awesome-table so I can put down a long list of data without needing to manually write the HTML each time so I need to make it a uniform process.
Each cell is referred to as {{URL}} in the following example
<audio controls> <source src="{{URL}}" type="audio/mpeg"> </audio>
The additional details, such as the third-party applications, are just to explain why I'm doing it this way. The question is simply how to get the right data of a Soundcloud track in a way I can directly apply <audio controls> <source src="(soundcloud track here)" type="audio/mpeg"> </audio>
解决方案
目前,这样做的唯一方法是,如果作者为曲目启用了 RSS 提要,并在音频源中使用该 RSS URL。
http://feeds.soundcloud.com/stream/example.mp3
推荐阅读
- android - 使用 vscode 调试器调试 React Native
- reactjs - 异步等待 redux this.props.func 调用?
- python - 初始化要在 SelectField 中使用的 Flask WTFForm 类变量
- hadoop - 目录文件未使用命令“hadoop fs -put”复制到 HDFS
- ubuntu - 在 Ubuntu 18.04 中启动 Xampp 时遇到 MySQL 错误
- c# - Linq查询不使用表的对象获取表的记录
- android - Unity游戏中出现广告时如何重启手机?
- flutter - Flutter v1.0下的类TickerProviderStateMixin undefined
- java - 如何在 selenium 中使用 java 从 excel 工作表中检索 0.00000000 等十进制值?
- excel - VBA - 选择指定范围时在下一个单元格上调用函数