【问题标题】:How to stop stream in "Red5 Pro HTML"?如何在“Red5 Pro HTML”中停止流式传输?
【发布时间】:2018-06-22 03:08:33
【问题描述】:

亲爱的朋友们,我在“Red5 Pro HTML”文档中找不到如何为发布者停止流的精确示例,如果有人知道编写方式,请给我一个提示

【问题讨论】:

    标签: javascript web stream red5pro


    【解决方案1】:

    SDK documentationRTCPublisherRTMPPublisher都有一个名为unpublish的函数:

    unpublish() → {承诺}

    请求停止广播。返回的 Promise 将在广播成功停止时解析或拒绝。

    返回:Promise

    尝试使用它。

    publisher.unpublish()
      .then(() => console.log('Stopped publisher stream!'))
      .catch(() => console.log('Failed to stop publisher stream!'))
    

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-08-11
    • 2015-12-13
    • 2014-02-27
    • 1970-01-01
    • 1970-01-01
    • 2012-10-20
    • 2015-08-31
    相关资源
    最近更新 更多