Adobe Cirrus Error on Direct Connect“Property startTransmit not found on flash.net.NetStream”

你离开我真会死。 提交于 2019-12-12 12:33:41

问题


The error:

ReferenceError: Error #1069: Property startTransmit not found on flash.net.NetStream and there is no default value.

I've played around with cirrus plenty of times before and have yet to see this error before. But now I cant get it to go away.

My p2p Direct connect works great just fine. But every single time i see this error pop up. It throws an exception. I can't figure out where it's exactly happening.

Has anyone encountered this before? Any ideas where I should look?


回答1:


Every client object needs to have the following functions defined.

client.stopTransmit=function($p1:*,$p2:*):void{
    trace("stopTransmit called",$p1,$p2);
}
client.startTransmit=function():void{
    trace("startTransmit called");
}

For example, set these in the onPeerConnect function:

sendStream.client = new Object();
sendStreamClient.onPeerConnect = function(subscriber:NetStream): Boolean{
    var client:Object=new Object();
    client.stopTransmit=function($p1:*,$p2:*):void{
        trace("stopTransmit called",$p1,$p2);
    }
    client.startTransmit=function():void{
        trace("startTransmit called");
    }
    subscriber.client=farStreamClient;
}

Additionally these need to be set on your sendStreamClient's client property:

sendStreamClient.client.stopTransmit=function($p1:*,$p2:*):void{
    trace("stopTransmit called",$p1,$p2);
}
sendStreamClient.client.startTransmit=function():void{
    trace("startTransmit called");
}

And they need to be set on your recieveStreamClient's client property.




回答2:


On the server side script, you probably (or somebody else) have set up the application, so that it calls back a function -this time it is startTransmit-, and it isn't handled on the client side. Remove the code from the server, or add a default value, or add a function to your code.

In my similar program, i had to add the function to my code (in my case it was not 'startTransmit') :

if ("NetConnection.Connect.Success" == e.info.code) {
netConnection.client=new Object();
netConnection.client.startTransmit=startTransmit; //no columns!
}

where startTransmit is

private function startTransmit():Boolean{
    return true;
}



回答3:


Are you sending h264 videos? I think it is to do with that...

If you add

public function startTransmit($p1:*,$p2:*):void{

}

public function stopTransmit():void{

}

where you have your media server connection it should work fine, at least it does for me :)




回答4:


There is another netstream other than receiveStream and sendStream. You should set startTransmit and stopTransmit functions on the callerns netstream, something like this:

sendStreamClient.onPeerConnect = function(callerns:NetStream): Boolean{
    var farStreamClient:Object=new Object();
    farStreamClient.stopTransmit=function($p1:*,$p2:*):void{
        trace("-------------farStream stopTransmit called!",$p1,$p2);
    }
    farStreamClient.startTransmit=function():void{
        trace("-------------farStream startTransmit called!");
    }
    callerns.client=farStreamClient;
}



回答5:


The problem is not on AMS or Red5 server. Even transmitting a video on P2P from an Android device triggers the same error. The solution worked. Actually the stopTransmit() sends a Boolean and an integer. It would be amazing to know what they mean. I have opened a bug on adobe bugbase in order to have it documented or removed. Please vote: https://bugbase.adobe.com/index.cfm?event=bug&id=3844856



来源:https://stackoverflow.com/questions/9676496/adobe-cirrus-error-on-direct-connectproperty-starttransmit-not-found-on-flash-n

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!