open-webrtc-toolkit / owt-client-native

Open WebRTC Toolkit client SDK for native Windows/Linux/iOS applications.
https://01.org/open-webrtc-toolkit
Apache License 2.0
384 stars 180 forks source link

Code review inquiry for " Send chat-closed to workaround known browser bugs" #153

Open JamesTerm opened 4 years ago

JamesTerm commented 4 years ago

Can someone explain why these lines of code are needed: line 201 of ,\src\talk\owt\sdk\p2p\p2ppeerconnectionchannel.cc

  // Send chat-closed to workaround known browser bugs, together with
  // user agent information once and once only.
  if (stop_send_needed_) {
    SendStop(nullptr, nullptr);
    stop_send_needed_ = false;
  }

This work-around can break the video streaming under certain conditions as such:

  1. establish p2p session
  2. javascript caller clicks "Share Camera"
  3. client-native sends a message
  4. The video stream is stopped, and does not recover

If there is code to prevent the video stream from stopping please share how that is suppose to work. Thanks.

Note: When writing this inquiry issue #85 was suggested to review as it may be related

HuaChunbo commented 4 years ago

This workaround is for the known issue of Firefox browser republish problem. Will remove this if the issue in Firefox's gone. Thanks