mirror of
https://api.glitch.com/git/yaswvc
synced 2026-01-12 03:18:10 +00:00
🐙⛳️ Checkpoint
./public/main.js:5975361/604
This commit is contained in:
parent
41d233581c
commit
7051447050
1 changed files with 14 additions and 9 deletions
|
|
@ -131,7 +131,7 @@ var app = new Vue({
|
|||
call.peerConnection.onaddstream = (stream) => {
|
||||
console.log('stream add', stream);
|
||||
console.log('getRemoteStreams', stream.currentTarget.getRemoteStreams()[0]);
|
||||
stream.currentTarget.getRemoteStreams()[0].ontrack = (a,b) => {
|
||||
stream.stream.onaddtrack = (a,b) => {
|
||||
console.log('got track', a, b)
|
||||
};
|
||||
};
|
||||
|
|
@ -205,14 +205,19 @@ var app = new Vue({
|
|||
// console.log('Adding stream', stream)
|
||||
// call.peerConnection.addStream(stream);
|
||||
// console.log('local streams',call.peerConnection.getLocalStreams());
|
||||
console.log(call.peerConnection, stream.getTracks())
|
||||
const target = call.peerConnection.getLocalStreams()[0];
|
||||
target.getTracks().forEach((track) => {
|
||||
target.removeTrack(track);
|
||||
});
|
||||
stream.getTracks().forEach((track) => {
|
||||
target.addTrack(track);
|
||||
});
|
||||
// // call.peerConnection.createOffer();
|
||||
|
||||
// console.log('gotStream 2', call.peerConnection, stream.getTracks())
|
||||
// const target = call.peerConnection.getLocalStreams()[0];
|
||||
// target.getTracks().forEach((track) => {
|
||||
// target.removeTrack(track);
|
||||
// });
|
||||
// stream.getTracks().forEach((track) => {
|
||||
// target.addTrack(track);
|
||||
// });
|
||||
const callPeerId = call.peer;
|
||||
call.close();
|
||||
|
||||
});
|
||||
}
|
||||
this.stream = stream; // make stream available to console
|
||||
|
|
|
|||
Loading…
Reference in a new issue