Intel® Collaboration Suite for WebRTC
Community support and discussions on the Intel® Collaboration Suite for WebRTC (Intel® CS for WebRTC).
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
For the latest information on Intel’s response to the Log4j/Log4Shell vulnerability, please see Intel-SA-00646
1136 Discussions

Chrome共享应用或者桌面, 点击停止共享的dialog。 如何监听回调, 删除共享流

li__zhang
Beginner
467 Views

场景: chrome共享应用, 点击关闭共享的dialog,流并没有消失。 如何监听这一个关闭事件。 来删除当前共享的视频流?

 

 

0 Kudos
1 Solution
Li_C_Intel
Employee
467 Views

可以监听track上的ended事件

mediaStream.getTracks().forEach(track => {

    track.onended = function () {

        console.log(`${track.kind} of media stream has ended`);

    }

})

View solution in original post

4 Replies
Hao__Feng
Beginner
467 Views

There is 'onended' event on track

YanbinZ_Intel
Employee
467 Views

流是需要做主动做Unpublish 才能去除掉的,你可以看看ended 事件是不是有被调用

li__zhang
Beginner
467 Views

 我点击了关闭共享的蓝色小窗口, rest api获取的stream list仍然还存在。 说明服务端的共享流没有被删除, 如果需要自己删除这个流的话, 我该如何监听这个关闭窗口的事件呢。

主要是stream list里面共享流仍然存在, 无法监听strean  end 事件。

Li_C_Intel
Employee
468 Views

可以监听track上的ended事件

mediaStream.getTracks().forEach(track => {

    track.onended = function () {

        console.log(`${track.kind} of media stream has ended`);

    }

})

View solution in original post

Reply