Hi Richard, thanks for the code snippet. I am using secureToken and enforcing RTMPe only to protect our stream.
It looks like the secureToken is working, but I still receive the same error with your code. The trace on the client side looks like this:
testVersion: MAC 10,3,181,26>=10,1,0,0: true
secureTokenResponse: true
event.traitType: audio
event.traitType: buffer
event.traitType: time
event.traitType: displayObject
event.playState: playing
event.traitType: play
infoObj.info.code: NetConnection.Connect.Closed
event.time: NaN
player.duration: NaN
event.time: NaN
player.duration: NaN
event.time: NaN
player.duration: NaN
Error: Error #2154: The NetStream Object is invalid. This may be due to a failed NetConnection.
at flash.net::NetStream/play2()
at org.osmf.net::NetLoader/reconnectStream()[/Users/rashad/Documents/Adobe Flash Builder 4/WowzaSample/src/org/osmf/net/NetLoader.as:409]
at Function/org.osmf.net:NetLoader/private:setupStreamReconnect/org.osmf.net:onNetStatus()[/Users/rashad/Documents/Adobe Flash Builder 4/WowzaSample/src/org/osmf/net/NetLoader.as:616]
On the server side, the trace is:
INFO session connect-pending 127.0.0.1 -
INFO session connect 127.0.0.1 -
ERROR session comment 1302063160 ModuleSecureToken.onConnect: Action before response received: kill connection: clientId:1302063160
It seems like something that was happening in this thread:
https://www.wowza.com/forums/showthread.php?575-secure-token-failure
Obviously the code you’ve given me works so I’m messing something up here. I followed the instructions to setup the server-side security module and made no special changes. The only change I made to the code snippet was to set the rtmpURL to connectURL directly instead of doing the replace functions to preserve the rtmp. Have you ever tried using this code with RTMP?
For reference, I’m using:
Flex SDK 4.1
OSMF 1.5
Wowza 2.2.4
Thanks.