Intel® Collaboration Suite for WebRTC
Community support and discussions on the Intel® Collaboration Suite for WebRTC (Intel® CS for WebRTC).
1149 Discussions

ConferenceClient publish localStream and shareStream

xi_l_1
Beginner
707 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
707 Views

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

0 Kudos
Jianjun_Z_Intel
Employee
707 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.

0 Kudos
xi_l_1
Beginner
707 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);
          });
        });

0 Kudos
Lei_Z_Intel1
Employee
707 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.

0 Kudos
Reply