Copy link to clipboard
Copied
I have an application to which a user publishes live stream . Before publishing stream I need to check if stream already exist . How can I do that ? I used
myStream = Stream.get(streamName)
if(myStream){
trace("Exist");
}else{
trace("Not Exist");
}
It always returns true and it looks like it creates a stream if it doesnt exist . How else can I check this ? If stream already exist and if some one replublishes it , stream looks little jittery .
Copy link to clipboard
Copied
Any one from adobe media staff intrested in answering this ? Is it possible to see if a stream exist in application code server side ?
Copy link to clipboard
Copied
Go for Stream.length() found on the same doc page.
Copy link to clipboard
Copied
Stream.length returns 0 always for a live stream even though the stream already exist on server , and is playing . Is it only for files and not live streams ?
Copy link to clipboard
Copied
Anyone ?
Copy link to clipboard
Copied
Since this is a live stream, you can't expect hardware persistence but this can be implemented using SharedObject. Design your app that way so that when a user starts publishing a stream, a stream name gets added to a SharedObject so that when a different user tries to publish a stream he/she will know what stream names are currently in use.