Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

timeout detection/notification

5 replies [Last post]

Is there a way to automatically monitor url's like below for a timeout to ensure it's always streaming and if it timesout to email/notify us? So far I can only find a program that monitors the url whether it loads or not...well, the player will always load, but how to find a way to monitor the actual stream whether it times-out or not?

http://domain.com/streams/radio/player.swf?streamer=rtmp://red5server/oflaDemo&file=publishername&pr...

Ok, then is there a way to create a php file that posts debug data where I could use the posted text to determine if the stream is successful or not? If this is possible, how could it be done using the debug parameter? I've read up on it, but I can't find any way to post player debug data into an html webpage. Sounds kind of complicating. maybe there's a thread or some docs or code on this already written? Let me know if possible.

How can I get debugging code to post in html on the page in which the player resides using this documentation below? I'd assume we'd use javascript for posting certain fail/success information from the debug output onto the php/html page.

http://developer.longtailvideo.com/trac/wiki/Player5PluginsBuilding#Debugging

Hi, @Ben -

If you'd like to post the debugging info to your HTML via Javascript, set the "debug" flashvar to the name of a function that you write, that takes the debug output and adds it to your page.

The general idea:

...
so.addVariable('debug', 'myDebugFunction');
...

<script language="javascript">
  function myDebugFunction(debugText) {
     document.getElementById('output').innerHTML += debugText + "<br>";
  }
</script>

<div id="output"></div>

Obviously this is a very basic example, but that's the general idea.

Pablo,

Thanks for the response!

does this work with the embed version of the player or do I have to use the swobject javascrpt version code?

If I can use the embed, would this similar sample code just go in the head of the html page?

Lastly, how do I write a function, are their any fail/success functions already written that I can just plugin? or any good documentation for this, I'm not good with javascript at all and may need to hire someone to do this, so any detailed information would be very helpful for me and/or the developer!

@Ben -

This example was written with the javascript embed method, but you can easily accomplish this with the direct HTML embed; just add "&debug=myDebugFunction" to the flashvars parameter. The rest of the code would be the same.

As far as the general javascript coding goes, this isn't really the forum to go to for that. There are far better places on the internet to learn javascript. That being said, there are some player/javascript interaction examples here:

http://developer.longtailvideo.com/contributors/nyboe

BTW - if all you're looking to do is view the player's debug output, you can do that by changing the "debug" setting to "console," and viewing the page in Firefox, using the "Firebug" add-on with the "console" tab open.