RTCMultiConnection: Not work v3.4.4 on cordova ios
I’m tired of trying to solve the remote video problem on iOS.
When I use Android works perfectly, when trying to use iOS I can send audio and video, but I get neither audio nor video.
I am using the code below, please someone help me
connection.videosContainer = document.getElementById('videos-container');
connection.onstream = function(event) {
var div = document.createElement('div');
div.id = event.streamid || event.stream.id;
div.appendChild(event.mediaElement);
connection.videosContainer.insertBefore(div, connection.videosContainer.firstChild);
connection.fixAllVideos();
};
connection.onstreamended = function(event) {
removeStreamById(event.streamid || event.stream.id);
};
connection.fixAllVideos = function() {
Object.keys(connection.streamEvents).forEach(function(key) {
var event = connection.streamEvents[key];
var div = document.getElementById(key);
if (!div) return;
var video = div.querySelector('video');
if (!video) return;
video.src = URL.createObjectURL(event.stream);
video.play();
document.getElementById('room-urls').innerHTML += key;
setTimeout(function() {
video.play();
}, 2000);
});
};
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 1
- Comments: 16 (3 by maintainers)
I get the same problem 😦
Are you testing on Safari-iOS or cordova?