-
-
Notifications
You must be signed in to change notification settings - Fork 73
Open
Description
When I run a webrtc stream in chrome, I always get the error (in the webdevtools console):
[WebrtcCamerastreamerCamera] failed to start playback "Top" OperationError: Failed to execute 'setRemoteDescription' on 'RTCPeerConnection': Failed to parse SessionDescription. a=msid: video Missing stream ID in msid attribute.
at u.loadStream (WebrtcCamerastreamerCamera-T0M-JDAw.js:1:1870)
Problem is the reply from the iceserver which contains following:
...a=ssrc:1994510237 msid: video\r\na=msid: video\r\n...
Instead of an actual msid (after the msid: prefix), there is just an empty string followed by a space. This is not valid according to
Culprit for this are the lines:
camera-streamer/output/webrtc/webrtc.cc
Line 425 in 400e036
client->video = webrtc_add_video(client->pc, webrtc_client_video_payload_type, rand(), "video", ""); camera-streamer/output/webrtc/webrtc.cc
Line 498 in 400e036
client->video = webrtc_add_video(client->pc, webrtc_client_video_payload_type, rand(), "video", "");
Empty msids are not valid. It works when (PoC) changing it to:
diff --git a/output/webrtc/webrtc.cc b/output/webrtc/webrtc.cc
index f2232b3..d94f048 100644
--- a/output/webrtc/webrtc.cc
+++ b/output/webrtc/webrtc.cc
@@ -417,7 +417,7 @@ static void http_webrtc_request(http_worker_t *worker, FILE *stream, const nlohm
auto client = webrtc_peer_connection(webrtc_configuration, message);
LOG_INFO(client.get(), "Stream requested.");
- client->video = webrtc_add_video(client->pc, webrtc_client_video_payload_type, rand(), "video", "");
+ client->video = webrtc_add_video(client->pc, webrtc_client_video_payload_type, rand(), "video", "camerastreamer");
try {
{
@@ -490,7 +490,7 @@ static void http_webrtc_offer(http_worker_t *worker, FILE *stream, const nlohman
LOG_VERBOSE(client.get(), "Remote SDP Offer: %s", std::string(message["sdp"]).c_str());
try {
- client->video = webrtc_add_video(client->pc, webrtc_client_video_payload_type, rand(), "video", "");
+ client->video = webrtc_add_video(client->pc, webrtc_client_video_payload_type, rand(), "video", "camerastreamer");
{
std::unique_lock lock(client->lock);
Metadata
Metadata
Assignees
Labels
No labels