gpt4 book ai didi

api - 有没有办法通过SoundCloud javascript流API强制使用MP3 block ?

转载 作者:行者123 更新时间:2023-12-02 22:31:34 25 4
gpt4 key购买 nike

据我所知,SoundCloud现在以10秒的MP3块发送“流” ...然后将整个内容作为单个MP3文件加入,以某种方式在浏览器端播放。

他们还使用带有时间限制链接的Amazon Meastro Player。两者结合起来,可以防止音频被盗(主要是“另存为”问题)。

但是,当使用javascript流API(SC.stream)时,它会退回到旧方法(将整个文件下载为“正常”而非块)。有办法强制采用这种新方法吗?

并且,在这里,是否有一种方法可以强制使用Opus Codec文件?

最佳答案

当您说“MP3块”时,我假设您指的是HLS。该API将返回HLS mp3和Opus URL。

请求:
HTTP GET: https://api.soundcloud.com/tracks/90787841/streams&client_id{CLIENT_ID}
响应:

{
"http_mp3_128_url": "https://cf-media.sndcdn.com/56LCadzDEBZn.128.mp3?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiKjovL2NmLW1lZGlhLnNuZGNkbi5jb20vNTZMQ2FkekRFQlpuLjEyOC5tcDMiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjE1MzY1MjEzNzF9fX1dfQ__\u0026Signature=sjO5rOEEHKOY8N~F8iqcm0Fb~6OWmpPpIwu1zVlpZWkNafvHR2hSLlHCQ3AprG0aNxKLABZc36~ciuvWZuEro~V99hsISdVwc8T0uISnLA99WhuWSryQ8THkC2de0PygtOdxXvdVxdKKki2xiyRMpd-mDyoePin6zYfNMzP1msTKTFk8TEB2Xc5MjzMJQA0VmxhFQwlEWraXJLUe03lB1-Zk1HkEtNHb2pNjuW-wxEmsfsrY0Nc6n-K7ORoiYMwJAFCxTrh06jv82tV01rU07gF0za5JKgmJUt4REIqgIJmJR9yHNJhpjqRn1mVmAthA9R7pD~t-kLFKHupm29O6zg__\u0026Key-Pair-Id=APKAJAGZ7VMH2PFPW6UQ",
"hls_mp3_128_url": "https://cf-hls-media.sndcdn.com/playlist/56LCadzDEBZn.128.mp3/playlist.m3u8?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiKjovL2NmLWhscy1tZWRpYS5zbmRjZG4uY29tL3BsYXlsaXN0LzU2TENhZHpERUJabi4xMjgubXAzL3BsYXlsaXN0Lm0zdTgiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjE1MzY1MjEzNzF9fX1dfQ__\u0026Signature=L-Mhlq55~oFIRBnzSXES-nAZnxGswJok9mxNksvCdVTXYlYooNrFOm4TvmR~uWLG5owEEitgs8PWkl0XVIZMFahYScRwoe7INKisImCBfGoSW1v6BJBjaVb7KaGl-usJ0NnRjpAPVFX1YwMuPsN22OToJWJOy2oudZfFwJ7e5K36Eifx9DH1WW6XChiaaE4ltlbAB2gSsFGT4qA1uT2AGSVXehB9iV2CK-fYyoL15hDM7kPVXb~tx5~kX3S1b3rj0j3f45WDn3nzACMugvX-1YXX7FJP0a2Niz7Qqw5TPkZhoqLdOzKzGGU9-oJY~NhZ9iH6vX0UYO7eGgiQo-Cmag__\u0026Key-Pair-Id=APKAJAGZ7VMH2PFPW6UQ",
"hls_opus_64_url": "https://cf-hls-opus-media.sndcdn.com/playlist/56LCadzDEBZn.64.opus/playlist.m3u8?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiKjovL2NmLWhscy1vcHVzLW1lZGlhLnNuZGNkbi5jb20vcGxheWxpc3QvNTZMQ2FkekRFQlpuLjY0Lm9wdXMvcGxheWxpc3QubTN1OCIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTUzNjUyMTM3MX19fV19\u0026Signature=P6cz9ZnjZcjFxeX2JZvsICbbCL4-gfg8It0gSiQ3ZyxVXdqipaa3RMpyRqz5HapRtR~50haa-hWwmv6M6qKs8As24a-f8UNDWaUgH9vlkc9gZWVF-hTqqQZJPzfHkRPyh8cwTort9gm7EM7W-BKS8P9JKvFEfpCteHF9QLETbKUSIj-woclIAvONKHYBumRh3C9HmB5K4M5fM0viG3bUd0S5IX7v3duL~GKIFrVJoB0vetPohve2EW4ymrkG5fsh~ge07j6cxD6dIh14rkRL6NXzizUkz4ZkblxdzUk~L35i6j0Z0nPPX~6SHyqV1~2tKbFq3fNkpiKko3SJz6Bf2w__\u0026Key-Pair-Id=APKAJAGZ7VMH2PFPW6UQ",
"preview_mp3_128_url": "https://ec-preview-media.sndcdn.com/preview/0/30/56LCadzDEBZn.128.mp3?f10880d39085a94a0418a7e162b03d52e21adf826af17a391e1a741e362f9cfc19da4f852776a03740e74cddedca7636cfc4c0ee23dbbc0bfb95c6dc0119fdb9a1862203f883ed05b3fcda0c4e5455987eba"
}

JS API中未提供此功能,您将需要使用HTTP REST API并将这些URL加载到其他播放器中。

关于api - 有没有办法通过SoundCloud javascript流API强制使用MP3 block ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49807991/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com