Intel® Collaboration Suite for WebRTC
Community support and discussions on the Intel® Collaboration Suite for WebRTC (Intel® CS for WebRTC).
Announcements
The Intel sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.
1145 Discussions

ConferenceClient publish localStream and shareStream

xi_l_1
Beginner
282 Views

Hi Lei,

in the web client ,i want to publish both localStream and shareStream, but publish failed: already published.

how can i do with is problem?

Thanks

0 Kudos
4 Replies
han_x_
Beginner
282 Views

我也有这个问题,麻烦看看。多谢。

Jianjun_Z_Intel
Employee
282 Views

Hi Xi,

Publishing both screen and camera streams are supported. Is there any log you can share with us? It may help us investigate your issue. Thanks.

xi_l_1
Beginner
282 Views

thanks for you replay,

in my web client, publish shareScreen as follow,and log is "ERROR: share stream publish failed: already published". But later I found the shareStream has been published actually. and other client can subscribe this shareStream. maybe have mistake callback message somewhere.

     shareButton.onclick = (function() {
          conference.shareScreen({
            extensionId:'baeihcbakjpmpfkgllienplfpjldpnbe',
            resolution: myResolution
          }, function(stream) {
              conference.publish(stream, {}, function(st) {
                L.Logger.info('share stream published:', st.id());
            }, function(err) {
                L.Logger.error('share stream publish failed:', err);
            });
          }, function(err) {
            L.Logger.error('share screen failed:', err);
          });
        });

Lei_Z_Intel1
Employee
282 Views

Look at the shareScreen function description in SDK guide, it will create screen local stream and publish it to MCU server. So no need to publish again in success callback. So your code will double publish the screen screen, and MCU report back already published.

Reply