Expand my Community achievements bar.

Error: The stream cannot be created because it already exists.

Avatar

Level 4

Hi,

I figured the stream was still around so i come back afew about 5 minutes. But even after the application loades and connects the the service for the first time. it throws me this error thinking that im all ready streaming?

here is my function. it shoud be working

    if(!_previewPanel.camPublsher.isPublishing){
                
                var userIDs = new Array();
                    userIDs.push(_userDesc.userID);
                    _previewPanel.startCamButton.label = "Stop Cam";
                    //_previewPanel.camPublsher.recipientIDs = userIDs;       
                    //_previewPanel.audPublish.recipientIDs = userIDs;
                _previewPanel.camPublsher.publish();
                _previewPanel.audPublish.publish();

            }else{
                _previewPanel.camPublsher.stop();
                _previewPanel.audPublish.stop();
                _previewPanel.startCamButton.label = "Start Your Cam";
            }
        }

thanks.

...russ

2 Replies

Avatar

Former Community Member

Hi,

This is interesting . What were you trying to do that this happened ? Can you create a fresh room and run and see if it happens.

Moreover, I saw the you are publishing both audio and camera while in the if loop you are checking if the camPublisher.isPublishing is false or not.

You should do it separately, something like

var userIDs = new Array();

userIDs.push(_userDesc.userID);

if(!_previewPanel.camPublsher.isPublishing){

_previewPanel.startCamButton.label = "Stop Cam";

_previewPanel.camPublsher.recipientIDs = userIDs;

_previewPanel.camPublsher.publish();

}else{

_previewPanel.camPublsher.stop();

_previewPanel.startCamButton.label = "Start Your Cam";

}

if(!_previewPanel.audPublish.isPublishing){

_previewPanel.audPublish.recipientIDs = userIDs;

_previewPanel.audPublish.publish();

}else {

_previewPanel.audPublish.stop();

}

This will keep your audio and camera check separate. I don't know whether this was your problem, but a more explanation of scenario and a try on a new room is the next step.

Hope this helps

Thanks

Hironmay Basu

Avatar

Former Community Member

Hello,

I try use a platform and modified some in the code however i have an error when i try opem webcam flash bulider error message:

Error: The stream cannot be created because it already exists.
    at com.adobe.rtc.sharedManagers::StreamManager/createStream()[/Users/arun/Work/aponnusa_theoden.corp.adobe.com_1666/depot/branches/connect/1010/cocomoPlayer10/src/com/adobe/rtc/sharedManagers/StreamManager.as:817]
    at com.adobe.rtc.collaboration::WebcamPublisher/createMyStream()[/Users/arun/Work/aponnusa_theoden.corp.adobe.com_1666/depot/branches/connect/1010/cocomoPlayer10/src/com/adobe/rtc/collaboration/WebcamPublisher.as:1285]
    at com.adobe.rtc.collaboration::WebcamPublisher/publish()[/Users/arun/Work/aponnusa_theoden.corp.adobe.com_1666/depot/branches/connect/1010/cocomoPlayer10/src/com/adobe/rtc/collaboration/WebcamPublisher.as:874]
    at com.adobe.rtc.pods::WebCamera/startWebcam()[/Users/arun/Work/aponnusa_theoden.corp.adobe.com_1666/depot/branches/connect/1010/cocomoPlayer10/src/com/adobe/rtc/pods/WebCamera.as:535]
    at com.adobe.rtc.pods::WebCamera/onStartStopClick()[/Users/arun/Work/aponnusa_theoden.corp.adobe.com_1666/depot/branches/connect/1010/cocomoPlayer10/src/com/adobe/rtc/pods/WebCamera.as:545]

and here is the code

<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
                       xmlns:s="library://ns.adobe.com/flex/spark"
                       xmlns:mx="library://ns.adobe.com/flex/mx" width="720" height="530" xmlns:rtc="http://ns.adobe.com/rtc" viewSourceURL="srcview/index.html">
   
   
   
    <fx:Script>
        <![CDATA[
            import com.adobe.rtc.core.connect_internal;
            import com.adobe.rtc.core.session_internal;
           
            protected function button1_clickHandler(event:MouseEvent):void
            {
                // TODO Auto-generated method stub
                scshare.publish();
            }
           
            protected function button2_clickHandler(event:MouseEvent):void
            {
                // TODO Auto-generated method stub
                scshare.stop();
               
            }
           
           
            protected function button3_clickHandler(event:MouseEvent):void
            {
                // TODO Auto-generated method stub
                audioSub.publisherIDs
            }
           
            private function onMute(p_evt:MouseEvent):void
               
            {
               
                audioSub.setLocalVolume(0);
               
            }
               
        ]]>
    </fx:Script>
   
    <fx:Declarations>
       
    </fx:Declarations>
    <mx:Image x="0" y="0" width="100%" height="800" source="back.png" scaleContent="true"/>
    <rtc:ConnectSessionContainer x="0" y="0" width="730" height="530" roomURL="http://connectnow.acrobat.com/jannaali/mymeeting">
        <rtc:authenticator>
            <rtc:AdobeHSAuthenticator userName="ahmed@egtecno.com" password="a19h31c28a12"/>
        </rtc:authenticator>
        <rtc:Roster x="395" y="0" displaySelection="false" showMenuButtons="true"  width="295" height="362" chromeColor="#B6B6BD" color="#676363"/>
        <rtc:AudioSubscriber id="audioSub" height="0"/>
        <rtc:AudioPublisher id="audioPub" height="0"/>
        <rtc:WebCamera x="395" y="370" width="127" height="125" chromeColor="#85BF85"/>
        <rtc:ScreenSharePublisher id="scshare"  width="421" height="309" left="484" y="207"/>
       
        <s:Button x="556" y="370" click="button1_clickHandler(event)" label="share screen" width="141" height="41" color="black" fontWeight="bold" chromeColor="#626263"/>
        <s:Button x="556" y="416" click="button2_clickHandler(event)" label="stop screen sharing" width="141" height="41" fontWeight="bold" color="#040404" chromeColor="#626263"/>
        <s:Button x="526" y="474" click="button3_clickHandler(event)" label="Start My Audio" width="100" height="21" color="#070707" fontWeight="normal" chromeColor="#85BF85"/>
        <s:Button x="634" y="474" label="Mute" click="onMute(event)"  width="63" chromeColor="#85BF85"/>
       
    </rtc:ConnectSessionContainer>
    <rtc:SimpleChat x="0" y="0"  sessionDependent="true" useExternalContextMenu="false" newMessageColor="0x000000" width="391" height="500" chromeColor="#139FA1"/>
</s:WindowedApplication>

I don't know what's problem, any ideas.

Thanks