【问题标题】:Soundcloud API create stream from track URLSoundcloud API 从轨道 URL 创建流
【发布时间】:2022-03-11 07:28:29
【问题描述】:

我正在使用以下代码尝试在 html 页面中流式传输 soundcloud 轨道,但它继续失败(错误代码 403)。文档很模糊,关于如何使用 soundcloud api 的大多数讨论都是几年前的。

var soundcloud = require('soundcloud');
soundcloud.initialize({
    client_id: 'MYCLIENTID'
});

const _sc_track_id = "tracks/986824216";

soundcloud.stream(_sc_track_id).then(function(player){
    player.play().then(function( ) {
        console.log('Playback started!');
    }).catch(function(e){
        console.error('Playback rejected. Try calling play() from a user interaction.', e);
    });
});

我想在网页上使用我自己的客户端 ID 流式传输曲目。在网页中播放 soundcloud 中的曲目的预期方式是什么?

【问题讨论】:

    标签: node.js typescript api soundcloud


    【解决方案1】:

    不幸的是,SoundCloud 似乎停止支持其公共 API。 this answer 中提到了当前的解决方法。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-03-23
      • 1970-01-01
      • 1970-01-01
      • 2015-04-07
      • 1970-01-01
      • 2012-09-28
      相关资源
      最近更新 更多