I’ve got an app for streaming live band performances and i’ve also now got a rtmp visualization (albeit this uses Wowza).
So i think why not run both together tonight for the first trial of TheLiveSession.com. Nothing complicated just embed both seperate swf’s in the same html wrapper and modify the visualization to use the live stream coming from my FMS server (instead of the Wowza one) which just means changing where my Netconnection connects to and the NetStream to play.
First things first i test if an MP3 and an FLV from my Influxis FMS 3 server will work just the same as the Wowza demo. It doesn’t initially (but i know why)… So i add the Client.audioSampleAccess and Client.videoSampleAccess properties to “/” so everything in my application can be accessed.
So i restart the server and application to try again… This time i get the expected security error ‘No Policy File’ etc. I’m not yet sure if i can allow access from/to the Influxis server with a config file (i will ask). Anyway i discovered a blog post http://inflagrantedelicto.memoryspiral.com/2008/06/clientvideosampleaccess-false-negative/ that suggests using the NETSTREAM.BUFFER.FULL event to prevent computeSpectrum from running until i have enough data in my buffer to do something with. This is where it gets wierd 😦
Sometimes it works and sometimes it doesn’t. If it works it just works and if not i get numerous security errors as i try to access the data. I can see in all my tests that my buffer is full but regardless Flash makes up it’s own mind…
So that’s one problem! Unreliable code in hand i decide to see if i can get a live stream (one being published by Flash Media Encoder 2.5) to exibit the same behaviour. Unfortunately i quickly discover i’m getting no security errors at all but my stream is playing (as i can hear it). No matter how many times i try, i get the same result – when using a live stream it appears to do absolutely nothing… I switch back to the on demand files stored on the server and they work as they did previously (sometimes i get a visual and sometimes just exceptions).
And so to my questions:
Does anyone have any suggestions why this is so unreliable?
Can i fix it simply by adding a policy file?
Is it possible to access raw data of a live stream?
Is Wowza less secure but ultimately better for this type of application?