Hi there
I used the instructions at the beginning of this thread. I changed this portion of the RTMPModel file to
/** Receive NetStream status updates. **/
private function statusHandler(evt:NetStatusEvent):void {
if(evt.info.code == "NetConnection.Connect.Success") {
if (evt.info.secureToken != undefined) {
connection.call("secureTokenResponse",null,
//TEA.decrypt(evt.info.secureToken,model.config['token']));
TEA.decrypt(evt.info.secureToken,"#ed%h0#w@1"));
}
// connection.call("checkBandwidth",null);
// For FMS3 bandwidth checking, uncomment the line above and comment the one below.
setStream();
// If you use Limelight/Akamai: comment the line above and uncomment the one below.
// timeout = setInterval(subscribe,2000,model.playlist[model.config['item']]['file']);
} else if(evt.info.code == "NetStream.Seek.Notify") {
clearInterval(timeinterval);
timeinterval = setInterval(timeHandler,100);
} else if(evt.info.code == "NetStream.Play.StreamNotFound" ||
evt.info.code == "NetConnection.Connect.Rejected" ||
evt.info.code == "NetConnection.Connect.Failed") {
stop();
model.sendEvent(ModelEvent.ERROR,{message:"Stream not found: "+
model.playlist[model.config['item']]['file']});
} else {
model.sendEvent(ModelEvent.META,{info:evt.info.code});
}
};
but everytime I try to connect to the readmehtml page I get this error
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at com.jeroenwijering.utils::TEA$/::strToChars()
at com.jeroenwijering.utils::TEA$/decrypt()
at com.jeroenwijering.models::RTMPModel/::statusHandler()
This is how I embed the file into the page
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
var s1 = new SWFObject("player.swf","ply","328","200","9","#FFFFFF");
s1.addParam("allowfullscreen","true");
s1.addParam("allowscriptaccess","always");
s1.addParam("flashvars","fullscreen=true&streamer=rtmp://72.9.154.102/securetoken&file=Extremists.flv");
s1.write("container");
</script>
I used flash cs3 to generate a new player.swf file. Any ideas, please help!