Results 1 to 6 of 6

Thread: Is there a built in WebService that tells me the media is not found?

  1. #1

    Default Is there a built in WebService that tells me the media is not found?

    Sometimes people try to play videos which have been deleted because they have old links. I want to display a "nice" message instead of the video player just spinning around. Is there a web service on Wowza I can call that will tell me if a particular video file exists?

  2. #2
    Join Date
    Dec 2007


    What player are you using? Pre-built players like JW player and Flowplayer have a javascript api that catch metadata events. Flowplayer at least can catch custom NetConnection and NetStream calls (server-side and IMediaStream.send)


  3. #3


    Hi Richard.

    Thank you very much for replying. I was hoping to avoid writing a RESTful web service as an HTTP provider for Wowza so I am hoping your suggestions will help.

    PC and MAC: I am using JWPlayer(free version for now) as follows in my php code snippet:
    echo "<div id='myElement1'>Loading the player ...</div>";
    echo "<script type='text/javascript'>";
    echo "jwplayer('myElement1').setup({";
    echo "file: 'rtmp://".$msgfile.".flv',";
    echo "image: '',";
    echo "autostart: 'true',";
    echo "height: ".$vidh.",";
    echo "width: ".$vidw;
    echo "});";
    echo "</script>";

    Mobile Devices:
    I am using HTML 5 for mobile devices as follows: <video controls='controls' src='' height='640' width='480'> </video>

    In the examples from JWPlayer I don't see how to catch the metadata events. Do you have an example snippet I could learn from?
    I am not using JWPlayer for mobile devices so this is more difficult.

    The best solution I think would be a RESTful web service where I send it a filename I want to check and it returns true or false. I would think someone would have done this by now.

    Leo P.

  4. #4


    Hi Richard:

    I think I found what you were referring with respect to the javascript API for JWPlayer:

    However, I don't think this helps me with iOS or Andriod since I am just using the HTML5 video tag. Any ideas?

    Leo P.

  5. #5
    Join Date
    Dec 2007


    Actually, I don't think this will do what you want, but this is how to get meta data in JW Player 6:

    <title>JW Player 6</title>
    <script type="text/javascript" src="/jwplayer/jwplayer.js" ></script>
    <div id="myElement">Loading the player...</div>
    <script type="text/javascript">
       	sources: [{
                file: "rtmp://localhost/vod/mp4:sample.mp4"
                file: ""
        jwplayer("myElement").onMeta( function(event){
    	    for (var key in event) {
    		   var obj = event[key];
    		   for (var prop in obj) {
    		      //alert(prop + " = " + obj[prop]);
    		      if (isNaN(prop))
    			      document.getElementById("status").innerHTML += prop + " = " + obj[prop] + "<BR>"
    			      if (prop=="trackinfo")
    			      	var trackInfo = obj[prop]
    			      	for (var trackProp in trackInfo)
    			      		var info = trackInfo[trackProp];
    			      		for (var p2 in info)
    			      			document.getElementById("status").innerHTML += "TrackInfo: " + p2 + " = " + p2[info] + "<BR>"
    <div id="status"></div>

  6. #6
    Join Date
    Dec 2007


    No, it won't help with HLS. But the example I posted does show how to do HLS with JW Player.


Similar Threads

  1. Add a REST Webservice interface to Wowza Media Server
    By sujilsekhar in forum Wowza Streaming Server Java API
    Replies: 1
    Last Post: 04-26-2014, 12:05 AM
  2. Using Wowza Media Server 3 AWS with JVC GY HM650 camera built-in encoders UDP TCP
    By vitocustodero in forum Live Streaming and Encoder Discussion
    Replies: 1
    Last Post: 02-03-2014, 09:34 PM
  3. Recording tutorial, No camera found, No microphone found
    By SFGMedia in forum Tutorials Discussion
    Replies: 1
    Last Post: 10-11-2013, 11:17 AM
  4. ModuleRTMPAuthenticate | Wowza Media Server 3 (ERROR Module class not found
    By donte_lmp in forum Live Streaming and Encoder Discussion
    Replies: 3
    Last Post: 07-26-2013, 07:36 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts