Twilio 可编程视频 SDK 问题
Twilio programmable video sdk issue
我在我的应用程序中使用了 twilio 可编程视频 sdk。我使用 Twilio Programmable Video 创建了点对点视频聊天。每当我参加会议时。我可以看到和听到对面的人,但对面的人听不到或看不到我。房间的创建和轨道的创建工作正常。
await connect(token, {
audio: true,
name: this.meetingId,
video: { width: 640 }
}).then(room => {
this.meetingRoom = room;
// display the face of you
createLocalVideoTrack().then(track => {
const localMediaContainer = document.getElementById('local-media');
localMediaContainer.appendChild(track.attach());
});
room.on('participantConnected', participant => {
console.log(`Participant "${participant.identity}" connected`);
participant.tracks.forEach(publication => {
if (publication.isSubscribed) {
const track = publication.track;
document.getElementById('remote-media-div').appendChild(track.attach());
localStorage.setItem('status','live');
this.videoStyle('remote-media-div');
}
});
这是我正在使用的代码片段。它是离子的。
你应该听听是否有任何参与者已添加到对面站点视图的房间中。
// Log any Participants already connected to the Room
room.participants.forEach(participant => {
console.log(`Participant "${participant.identity}" is connected to the Room`);
participant.tracks.forEach(publication => {
if (publication.isSubscribed) {
document.getElementById('remote-media-div').appendChild(publication.track.attach());
}
});
participant.on('trackSubscribed', track => {
document.getElementById('remote-media-div').appendChild(track.attach());
});
});
我在我的应用程序中使用了 twilio 可编程视频 sdk。我使用 Twilio Programmable Video 创建了点对点视频聊天。每当我参加会议时。我可以看到和听到对面的人,但对面的人听不到或看不到我。房间的创建和轨道的创建工作正常。
await connect(token, {
audio: true,
name: this.meetingId,
video: { width: 640 }
}).then(room => {
this.meetingRoom = room;
// display the face of you
createLocalVideoTrack().then(track => {
const localMediaContainer = document.getElementById('local-media');
localMediaContainer.appendChild(track.attach());
});
room.on('participantConnected', participant => {
console.log(`Participant "${participant.identity}" connected`);
participant.tracks.forEach(publication => {
if (publication.isSubscribed) {
const track = publication.track;
document.getElementById('remote-media-div').appendChild(track.attach());
localStorage.setItem('status','live');
this.videoStyle('remote-media-div');
}
});
这是我正在使用的代码片段。它是离子的。
你应该听听是否有任何参与者已添加到对面站点视图的房间中。
// Log any Participants already connected to the Room
room.participants.forEach(participant => {
console.log(`Participant "${participant.identity}" is connected to the Room`);
participant.tracks.forEach(publication => {
if (publication.isSubscribed) {
document.getElementById('remote-media-div').appendChild(publication.track.attach());
}
});
participant.on('trackSubscribed', track => {
document.getElementById('remote-media-div').appendChild(track.attach());
});
});