- From: guest271314 via GitHub <sysbot+gh@w3.org>
- Date: Wed, 19 Aug 2020 13:46:14 +0000
- To: public-webrtc@w3.org
guest271314 has just created a new issue for https://github.com/w3c/webrtc-pc: == What reasons for silent audio tracks from remote streams? == Requirement: Capture system audio at Chromium browser and provide a means to access the captured system audio as a `MediaStream` or `MediaStreamTrack` at any document or domain. Status of requirement: Am able to capture system audio at localhost and use Chromium extension for signaling. localhost, in part ``` webrtc.addStream(stream); // stream is MediaStreamAudioDestinationNode const offer = await webrtc.createOffer(); const description = await webrtc.setLocalDescription(offer); console.log(offer, description); webrtc.addEventListener('iceconnectionstatechange', e=>console.log(webrtc.iceConnectionState)); webrtc.addEventListener('icecandidate', async e=>{ if (e.candidate) { return; } sdp = webrtc.localDescription.sdp; console.log(sdp); externalPort.postMessage({ sdp }); } ); ``` signaling ``` const ports = new Map; let sdp; chrome.runtime.onConnectExternal.addListener(externalPort => { console.log(externalPort); console.log(externalPort, ports); if (!ports.has('source') && externalPort.sender.origin === 'http://localhost:8000') { ports.set('source', externalPort); ports.get('source').postMessage('connected'); } else { if (!ports.has('sink') && externalPort.sender.origin !== 'http://localhost:8000') { ports.set('sink', externalPort); ports.get('sink').postMessage('connected'); ports.get('sink').onMessage.addListener(e => { console.log(e); ports.get('source').postMessage(e); }); ports.get('source').onMessage.addListener(e => { console.log(e); ports.get('sink').postMessage(e); }); } } }); ``` Any web page after dynamically setting permissions ``` var id = 'lmkllhfhgnmbcmhdagfhejkpicehnida'; var port = chrome.runtime.connect(id); var webrtc = new RTCPeerConnection(); webrtc.oniceconnectionstatechange = e => console.log(webrtc.iceConnectionState); webrtc.onaddstream = e => { console.log(e); } port.onMessage.addListener(async e => { console.log(e); if (e.sdp) { await webrtc.setRemoteDescription({type: "offer", sdp: e.sdp}); await webrtc.setLocalDescription(await webrtc.createAnswer()); webrtc.onicecandidate = ({candidate}) => { if (candidate) return; console.log(webrtc.localDescription.sdp); port.postMessage({sdp: webrtc.localDescription.sdp}); }; } }); port.postMessage(''); // .. port.postMessage({start: true}) // .. port.postMessage({stop: true}) ``` Some SDP ``` v=0 o=- 5187836082542980011 2 IN IP4 127.0.0.1 s=- t=0 0 a=group:BUNDLE 0 a=msid-semantic: WMS m=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 0 8 106 105 13 110 112 113 126 c=IN IP4 0.0.0.0 a=rtcp:9 IN IP4 0.0.0.0 a=candidate:3022624816 1 udp 2113937151 41bb7aeb-e90d-4eaf-b8d7-9019e2eeac3d.local 56320 typ host generation 0 network-cost 999 a=ice-ufrag:L8mK a=ice-pwd:DZZ2abI13mQODKLZ18iQ1TFk a=ice-options:trickle a=fingerprint:sha-256 E8:6A:69:B1:76:C4:92:03:F7:98:69:5A:70:16:06:C3:D3:09:0C:65:B4:FB:B9:B5:C1:94:F8:D0:CA:76:67:4A a=setup:active a=mid:0 a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01 a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid a=extmap:5 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id a=extmap:6 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id a=recvonly a=rtcp-mux a=rtpmap:111 opus/48000/2 a=rtcp-fb:111 transport-cc a=fmtp:111 minptime=10;useinbandfec=1 a=rtpmap:103 ISAC/16000 a=rtpmap:104 ISAC/32000 a=rtpmap:9 G722/8000 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:106 CN/32000 a=rtpmap:105 CN/16000 a=rtpmap:13 CN/8000 a=rtpmap:110 telephone-event/48000 a=rtpmap:112 telephone-event/32000 a=rtpmap:113 telephone-event/16000 a=rtpmap:126 telephone-event/8000 ``` Can include the complete code later today if necessary. Problem: The remote stream audio is silence when there should be sound. Used both transceiver and addStream approaches. Question: What are reasons for silent audio tracks from remote stream? Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/2564 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 19 August 2020 13:46:15 UTC