在我的Web应用程序中,我同时显示来自WebRTC rows = []
with open('Alert.txt', 'r') as READDOC:
for line in READDOC.readlines():
if ': ' in line:
rows.append(line.strip().split(': ', 2)[-1])
print(rows)
的四个流。每次收到报价时,我都会检查视频元素是否繁忙,或者不显示视频流。
str.strip()
现在,我正在尝试处理一个事件,其中任何连接都会断开(例如,将关闭流设备),在这种情况下,RTCPeerConnection
元素将替换为通知断开连接的图像。
要知道要替换哪个视频,我需要知道哪个连接被中断了。
有人可以告诉我如何区分bobConn.onaddstream = AddingStream;
function AddingStream(evt) {
if (video1.readyState === 0){
video1 = video1 = attachMediaStream(video1, evt.stream);
video1attached = true;
} else if (video1.readyState === 4 && video2.readyState === 0){
video2 = attachMediaStream(video2, evt.stream);
video2attached = true;
} else if (video2.readyState === 4 && video3.readyState === 0){
video3 = attachMediaStream(video3, evt.stream);
video3attached = true;
} else if (video3.readyState === 4 && video4.readyState === 0){
video4 = attachMediaStream(video4, evt.stream);
video4attached = true;
}
};
个连接吗?
编辑:
video
ShowStreams():
RTCPeerConnection