Intel® Collaboration Suite for WebRTC
Community support and discussions on the Intel® Collaboration Suite for WebRTC (Intel® CS for WebRTC).
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
For the latest information on Intel’s response to the Log4j/Log4Shell vulnerability, please see Intel-SA-00646
1136 Discussions

ConferenceClient publish localStream and shareStream

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

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

Jianjun_Z_Intel
Employee
147 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
147 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
147 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