更新时间:2026-04-10 GMT+08:00
分享

销毁串流player实例

方法名称

player.destroyMediaStream()

功能描述

销毁CloudPhonePlayer实例,需在window.onbeforeunload()中调用。

参数说明

返回值

调用示例

let player = client.createPlayer(options);
//...
//主动销毁
player.destroy();
//页面退出时销毁
window.onbeforeunload = function () {
    if (player) {
        player.destroyMediaStream();
    }
};

相关文档