Fehlermeldung:
Code: Select all
InvalidAccessError: Failed to execute 'setRemoteDescription' on 'RTCPeerConnection': Failed to set remote offer sdp: Failed to set remote video description send parameters for m-section with mid='video'
Dies ist die Liste der Encoder, die von RTCRtpReceiver.getCapabilities('video') zurückgegeben werden.
Code: Select all
[{"clockRate":90000,"mimeType":"video/VP8"},{"clockRate":90000,"mimeType":"video/rtx"},{"clockRate":90000,"mimeType":"video/VP9","sdpFmtpLine":"profile-id=0"},{"clockRate":90000,"mimeType":"video/VP9","sdpFmtpLine":"profile-id=2"},{"clockRate":90000,"mimeType":"video/VP9","sdpFmtpLine":"profile-id=1"},{"clockRate":90000,"mimeType":"video/H264","sdpFmtpLine":"level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42001f"},{"clockRate":90000,"mimeType":"video/H264","sdpFmtpLine":"level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=4d001f"},{"clockRate":90000,"mimeType":"video/H264","sdpFmtpLine":"level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=64001f"},{"clockRate":90000,"mimeType":"video/AV1X"},{"clockRate":90000,"mimeType":"video/H264","sdpFmtpLine":"level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f"},{"clockRate":90000,"mimeType":"video/red"},{"clockRate":90000,"mimeType":"video/ulpfec"},{"clockRate":90000,"mimeType":"video/flexfec-03","sdpFmtpLine":"repair-window=10000000"}]
Code: Select all
v=0
o=- 1495799811084970 1495799811084970 IN IP4 0.0.0.0
s=-
t=0 0
a=msid-semantic: iot
a=group:BUNDLE video audio datachannel
m=video 9 UDP/TLS/RTP/SAVPF 96 102
a=rtcp-fb:102 nack
a=rtcp-fb:102 nack pli
a=fmtp:96 profile-level-id=42e01f;level-asymmetry-allowed=1
a=fmtp:102 profile-level-id=42e01f;packetization-mode=1;level-asymmetry-allowed=1
a=rtpmap:96 H264/90000
a=rtpmap:102 H264/90000
a=ssrc:1 cname:webrtc-h264
a=sendrecv
a=mid:video
c=IN IP4 0.0.0.0
a=rtcp-mux
a=fingerprint:sha-256 4B:15:7A:F1:39:D3:51:97:DF:06:0B:B2:7C:50:6A:AC:43:1C:75:F3:F6:80:83:9C:6A:92:EE:7D:5C:89:72:43
a=setup:passive
a=ice-ufrag:u6Tw
a=ice-pwd:u6Twdb5GUjdkt9m6TqsqBPzs
a=candidate:0 1 UDP 2123617535 192.168.137.16 37844 typ host
m=audio 9 UDP/TLS/RTP/SAVP 8
a=rtpmap:8 PCMA/8000
a=ssrc:4 cname:webrtc-pcma
a=sendrecv
a=mid:audio
c=IN IP4 0.0.0.0
a=rtcp-mux
a=fingerprint:sha-256 4B:15:7A:F1:39:D3:51:97:DF:06:0B:B2:7C:50:6A:AC:43:1C:75:F3:F6:80:83:9C:6A:92:EE:7D:5C:89:72:43
a=setup:passive
a=ice-ufrag:u6Tw
a=ice-pwd:u6Twdb5GUjdkt9m6TqsqBPzs
a=candidate:0 1 UDP 2123617535 192.168.137.16 37844 typ host
m=application 50712 UDP/DTLS/SCTP webrtc-datachannel
a=mid:datachannel
a=sctp-port:5000
c=IN IP4 0.0.0.0
a=max-message-size:262144
a=fingerprint:sha-256 4B:15:7A:F1:39:D3:51:97:DF:06:0B:B2:7C:50:6A:AC:43:1C:75:F3:F6:80:83:9C:6A:92:EE:7D:5C:89:72:43
a=setup:passive
a=ice-ufrag:u6Tw
a=ice-pwd:u6Twdb5GUjdkt9m6TqsqBPzs
a=candidate:0 1 UDP 2123617535 192.168.137.16 37844 typ host
Code: Select all
const remoteVideo = document.getElementById('remoteVideo');
const configuration = {
iceServers: [{ urls: 'stun:stun.l.google.com:19302' }]
};
const peerConnection = new RTCPeerConnection(configuration);
peerConnection.ontrack = (event) => {
remoteVideo.srcObject = event.streams[0];
};
const sdpOffer = `v=0
o=- 1495799811084970 1495799811084970 IN IP4 0.0.0.0
s=-
t=0 0
a=msid-semantic: iot
a=group:BUNDLE video audio datachannel
m=video 9 UDP/TLS/RTP/SAVPF 96 102
a=rtcp-fb:102 nack
a=rtcp-fb:102 nack pli
a=fmtp:96 profile-level-id=42e01f;level-asymmetry-allowed=1
a=fmtp:102 profile-level-id=42e01f;packetization-mode=1;level-asymmetry-allowed=1
a=rtpmap:96 H264/90000
a=rtpmap:102 H264/90000
a=ssrc:1 cname:webrtc-h264
a=sendrecv
a=mid:video
c=IN IP4 0.0.0.0
a=rtcp-mux
a=fingerprint:sha-256 4B:15:7A:F1:39:D3:51:97:DF:06:0B:B2:7C:50:6A:AC:43:1C:75:F3:F6:80:83:9C:6A:92:EE:7D:5C:89:72:43
a=setup:passive
a=ice-ufrag:u6Tw
a=ice-pwd:u6Twdb5GUjdkt9m6TqsqBPzs
a=candidate:0 1 UDP 2123617535 192.168.137.16 37844 typ host
m=audio 9 UDP/TLS/RTP/SAVP 8
a=rtpmap:8 PCMA/8000
a=ssrc:4 cname:webrtc-pcma
a=sendrecv
a=mid:audio
c=IN IP4 0.0.0.0
a=rtcp-mux
a=fingerprint:sha-256 4B:15:7A:F1:39:D3:51:97:DF:06:0B:B2:7C:50:6A:AC:43:1C:75:F3:F6:80:83:9C:6A:92:EE:7D:5C:89:72:43
a=setup:passive
a=ice-ufrag:u6Tw
a=ice-pwd:u6Twdb5GUjdkt9m6TqsqBPzs
a=candidate:0 1 UDP 2123617535 192.168.137.16 37844 typ host
m=application 50712 UDP/DTLS/SCTP webrtc-datachannel
a=mid:datachannel
a=sctp-port:5000
c=IN IP4 0.0.0.0
a=max-message-size:262144
a=fingerprint:sha-256 4B:15:7A:F1:39:D3:51:97:DF:06:0B:B2:7C:50:6A:AC:43:1C:75:F3:F6:80:83:9C:6A:92:EE:7D:5C:89:72:43
a=setup:passive
a=ice-ufrag:u6Tw
a=ice-pwd:u6Twdb5GUjdkt9m6TqsqBPzs
a=candidate:0 1 UDP 2123617535 192.168.137.16 37844 typ host`;
peerConnection.setRemoteDescription(new RTCSessionDescription({
type: 'offer',
sdp: sdpOffer
})).then(() => {
return peerConnection.createAnswer();
}).then(answer => {
return peerConnection.setLocalDescription(answer);
}).catch(error => {
console.error('Error setting up WebRTC connection:', error);
});
Vielen Dank im Voraus für Ihre Hilfe!