Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: playlist.php + JWPlayer + Wowza Media Server 3.5

  1. #1

    Default playlist.php + JWPlayer + Wowza Media Server 3.5

    Greetings to all in this forum.

    I have a server with Wowza Media Server Perpetual Edition 3.5 on Ubuntu Server 12.04 LTS.

    I'm trying to make a playlist with php I detect the device that connects to the web.

    I already checked with pc, iphone, ipad, ipod, mac etc and everything works properly but I connect with a Samsung Galaxy I can not play.
    I checked the live streaming from my server rtsp real player and everything is fine but my jwplayer will not.

    That's what I can be doing wrong?

    index.html

    Inside of <body>......</body>

    <div class="wieight" id="mediaplayer">JW Player goes here</div>	
    	<script type="text/javascript" src="jwplayer.js"></script>
        	<script type="text/javascript">
    		  jwplayer('mediaplayer').setup({
    			'flashplayer': 'player.swf',
    			'id': 'playerID',
    			'width': '900',
    			'height': '500',
    			'playlist.size': '0',	
    			'repeat': 'always',
    			'playlistfile': 'playlist.php',				
    			'controlbar': 'over',
    			'autostart': 'false',
    			'wmode': 'opaque',
    			'allowscriptaccess': 'always',
    			'author': 'xxxxx'	
    		  });
    	</script>
    playlist.php

    PHP Code:
    <?php
    if (strpos($_SERVER['HTTP_USER_AGENT'],"iPhone") || strpos($_SERVER['HTTP_USER_AGENT'],"iPod") || strpos($_SERVER['HTTP_USER_AGENT'],"iPad")):
    ?>
    <rss version="2.0" xmlns:jwplayer="http://developer.longtailvideo.com/trac/" xmlns:media="http://search.yahoo.com/mrss/"> 
    <channel> 
      <title>Playlist</title> 
      <item> 
        <title>Presentación Libro: El sombrero de paja.</title> 
        <description>Presentacion.</description>
         <pubDate>Sat, 20 Diciembre 2012 20:30:00 GMT</pubDate>
         <!--Calidad de streaming para dispositivos mobiles, streaming "presentacion_2" con calidad bajada para iphone, ipad, ipod --> 
        <media:content url="http://mydomind.com:1935/live/presentacion_2/playlist.m3u8" /> 
        <media:thumbnail url="thumbs/1.gif" /> 
        <jwplayer:provider>http</jwplayer:provider>   
        <!--solo para video en demanda/duracion): -->   
        <!-- <jwplayer:duration>00.00</jwplayer:duration>  --> 
      </item>  
    </channel> 
    </rss>
    <?php
     
    elseif (strpos($_SERVER['HTTP_USER_AGENT'],"blacberry") || strpos($_SERVER['HTTP_USER_AGENT'],"android")): 
    ?>
    <rss version="2.0" xmlns:jwplayer="http://developer.longtailvideo.com/trac/" xmlns:media="http://search.yahoo.com/mrss/"> 
    <channel> 
      <title>Playlist</title> 
      <item> 
        <title>Presentación Libro: El sombrero de paja.</title> 
        <description>Presentacion.</description>
         <pubDate>Sat, 20 Diciembre 2012 20:30:00 GMT</pubDate> 
         <!--Calidad de streaming para dispositivos mobiles, mismo streaming "presentacion_2" que para iphone --> 
        <media:content url="rtsp://mydomind.com:1935/live/presentacion_2" /> 
        <media:thumbnail url="thumbs/1.gif" /> 
        <jwplayer:provider>rtsp</jwplayer:provider> 
        <!--solo para video en demanda/duracion): -->     
        <!-- <jwplayer:duration>00.00</jwplayer:duration>  -->
      </item>  
    </channel> 
    </rss>
    <?php
    else:
    ?>
    <rss version="2.0" xmlns:jwplayer="http://developer.longtailvideo.com/trac/" xmlns:media="http://search.yahoo.com/mrss/"> 
    <channel> 
      <title>Playlist</title> 
      <item> 
        <title>Presentación Libro: El sombrero de paja.</title> 
        <description>Presentacion.</description>
        <!--Calidad de streaming para para pc, mac, etc, fijos con lineas mas rapidas, streaming "presentacion_1" --> 
        <media:content url="presentacion_1" /> 
        <media:thumbnail url="thumbs/1.gif" /> 
        <jwplayer:provider>rtmp</jwplayer:provider> 
        <jwplayer:streamer>rtmp://mydomind.com:1935/live/</jwplayer:streamer> 
        <!--solo para video en demanda/duracion): --> 
        <!-- <jwplayer:duration>00.00</jwplayer:duration>  -->
      </item>  
    </channel> 
    </rss>
    <?php
    endif;
    ?>
    Must I change this line:
    elseif (strpos($_SERVER['HTTP_USER_AGENT'],"blacberry") || strpos($_SERVER['HTTP_USER_AGENT'],"android")):
    for this?:
    elseif (strpos($_SERVER['HTTP_USER_AGENT'],"blacberry") || strpos($_SERVER['HTTP_USER_AGENT'],"samsung") || strpos($_SERVER['HTTP_USER_AGENT'],"sony") || strpos($_SERVER['HTTP_USER_AGENT'],"google")):

    Thank you very much for your help
    Manyblue
    Last edited by manyblue; 02-07-2013 at 04:07 PM.

  2. #2
    Join Date
    Jul 2009
    Posts
    135

    Default

    I don't think JW Player supports RTSP. So you might want to move your Blackberry/Android detection to your index.html file (or index.php) and bypass JW Player for those devices:
    <?php 
    if (strpos($_SERVER['HTTP_USER_AGENT'],"blackberry") || strpos($_SERVER['HTTP_USER_AGENT'],"android")) {
     header("Location: rtsp://mydomind.com:1935/live/presentacion_2");
     die();
     exit();
    ?>
    Although some Android systems support HLS or Flash streams, so you may not want to automatically redirect all Android users to RTSP. Maybe just give them an RTSP link below your JW Player code in index.html which they can manually click if they have problems.

  3. #3

    Default

    Firstly thank you very much for your answer.
    sameone told me that jwplayer does not support "rtmp" protocols.

    This playlist work me well:

    playlist.php

    PHP Code:
    <?php
    if (strpos($_SERVER['HTTP_USER_AGENT'],"iPhone") || strpos($_SERVER['HTTP_USER_AGENT'],"iPod") || strpos($_SERVER['HTTP_USER_AGENT'],"iPad")) {     
    ?>
    <rss version="2.0" xmlns:jwplayer="http://developer.longtailvideo.com/trac/" xmlns:media="http://search.yahoo.com/mrss/"> 
    <channel> 
      <title>Playlist</title> 
      <item> 
        <title>Presentación Libro: El sombrero de paja.</title> 
        <description>Presentacion.</description>
         <pubDate>Sat, 20 Diciembre 2012 20:30:00 GMT</pubDate>
        <media:content url="http://midominio.com:1935/live/presentacion_2/playlist.m3u8" /> 
        <media:thumbnail url="thumbs/1.png" /> 
        <jwplayer:provider>http</jwplayer:provider>     
        <!-- <jwplayer:duration>00.00</jwplayer:duration>  --> 
      </item>  
    </channel> 
    </rss>
    <?php  
    }else{
    ?>
    <rss version="2.0" xmlns:jwplayer="http://developer.longtailvideo.com/trac/" xmlns:media="http://search.yahoo.com/mrss/"> 
    <channel> 
      <title>Playlist</title> 
      <item> 
        <title>Presentación Libro: El sombrero de paja.</title> 
        <description>Presentacion.</description>
        <media:content url="presentacion_1" /> 
        <media:thumbnail url="thumbs/1.png" /> 
        <jwplayer:provider>rtmp</jwplayer:provider> 
        <jwplayer:streamer>rtmp://midominio.com:1935/live/</jwplayer:streamer> 
        <!-- <jwplayer:duration>00.00</jwplayer:duration>  -->
      </item>  
    </channel> 
    </rss>
    <?php
    }
    ?>
    But what happend with smarphones ??

    My probleme is in index.html or index.php i can not begining with:

    PHP Code:
    <?php 
    if (strpos($_SERVER['HTTP_USER_AGENT'],"blackberry") || strpos($_SERVER['HTTP_USER_AGENT'],"android")) {
     
    header("Location: rtsp://mydomind.com:1935/live/presentacion_2");
     die();
     exit();
    ?>
    because the urls came fron the MySQL data base and are inside of a play list, i don´t know if you undrestand me ??

    I used before jwplayer adoble flash media playback fine and down of the player 4 links for http iphone, http for ipad, rtsp for android and blackberry.
    My proble here is the users can look the urls of the server, do you understand me ??

    that's what you recommend me ?

    Thankyou thankyou for your answer.

    Manyblue

    PD:
    If you have a concret day and a concret hour, I can pass you the url of the website and make a live streaming from Canary Islands to test the last playlist.php in this post.
    Last edited by manyblue; 02-08-2013 at 01:24 PM.

  4. #4

    Default

    I don´t like to write publicity in the forums.
    I have 2 licences of Wowza Perpetual Edition.

    This url show you a play list with jwplayer and this playlist.php:

    PHP Code:
    <?php 
    if (strpos($_SERVER['HTTP_USER_AGENT'],"iPhone") || strpos($_SERVER['HTTP_USER_AGENT'],"iPod") || strpos($_SERVER['HTTP_USER_AGENT'],"iPad")) {     
     
    ?> 
    <rss version="2.0" xmlns:jwplayer="http://developer.longtailvideo.com/trac/" xmlns:media="http://search.yahoo.com/mrss/"> 
     <channel>  
      <title>Playlist</title>  
      <item>  
        <title>Presentación Libro: El sombrero de paja.</title>  
        <description>Presentacion.</description> 
         <pubDate>Sat, 20 Diciembre 2012 20:30:00 GMT</pubDate> 
        <media:content url="http://midominio.com:1935/vod/mp4:name of the file.mp4/playlist.m3u8" /> 
         <media:thumbnail url="thumbs/1.png" />  
        <jwplayer:provider>http</jwplayer:provider>      
        <!-- <jwplayer:duration>00.00</jwplayer:duration>  -->  
      </item>   
    </channel>  
    </rss> 
    <?php   
    }else{ 
    ?> 
    <rss version="2.0" xmlns:jwplayer="http://developer.longtailvideo.com/trac/" xmlns:media="http://search.yahoo.com/mrss/"> 
     <channel>  
      <title>Playlist</title>  
      <item>  
        <title>Presentación Libro: El sombrero de paja.</title>  
        <description>Presentacion.</description> 
        <media:content url="name of the file flv" />  
        <media:thumbnail url="thumbs/1.png" />  
        <jwplayer:provider>rtmp</jwplayer:provider>  
        <jwplayer:streamer>rtmp://midominio.com:1935/vod/</jwplayer:streamer>  
        <!-- <jwplayer:duration>00.00</jwplayer:duration>  --> 
      </item>   
    </channel>  
    </rss> 
    <?php 

    ?>


    Tell me samething about....

    Thanks: Manyblue
    Last edited by manyblue; 02-09-2013 at 07:53 AM.

  5. #5

    Default

    Maybe if I use this playlist.php

    PHP Code:
    <?php
    if (strpos($_SERVER['HTTP_USER_AGENT'],"iPhone") || strpos($_SERVER['HTTP_USER_AGENT'],"iPod") || strpos($_SERVER['HTTP_USER_AGENT'],"iPad")):
    ?>
    <rss version="2.0" xmlns:jwplayer="http://developer.longtailvideo.com/trac/" xmlns:media="http://search.yahoo.com/mrss/"> 
    <channel> 
      <title>Playlist</title> 
      <item> 
        <title>Presentación Libro: El sombrero de paja.</title> 
        <description>Presentacion.</description>
         <pubDate>Sat, 20 Diciembre 2012 20:30:00 GMT</pubDate>
         <!--Calidad de streaming para dispositivos mobiles, streaming "presentacion_2" con calidad bajada para iphone, ipad, ipod --> 
        <media:content url="http://www.midominio.com:1935/live/presentacion_2/playlist.m3u8" /> 
        <media:thumbnail url="thumbs/1.png" /> 
        <jwplayer:provider>http</jwplayer:provider>   
        <!--solo para video en demanda/duracion): -->   
        <!-- <jwplayer:duration>00.00</jwplayer:duration>  --> 
      </item>  
    </channel> 
    </rss>
    <?php
    elseif (strpos($_SERVER['HTTP_USER_AGENT'],"blacberry") || strpos($_SERVER['HTTP_USER_AGENT'],"android")):
       
    header("Location: rtsp://www.midominio.com:1935/live/presentacion_2");
    else:
    ?>
    <rss version="2.0" xmlns:jwplayer="http://developer.longtailvideo.com/trac/" xmlns:media="http://search.yahoo.com/mrss/"> 
    <channel> 
      <title>Playlist</title> 
      <item> 
        <title>Presentación Libro: El sombrero de paja.</title> 
        <description>Presentacion.</description>
        <!--Calidad de streaming para para pc, mac, etc, fijos con lineas mas rapidas, streaming "presentacion_1" --> 
        <media:content url="presentacion_1" /> 
        <media:thumbnail url="thumbs/1.png" /> 
        <jwplayer:provider>rtmp</jwplayer:provider> 
        <jwplayer:streamer>rtmp://www.midominio.com:1935/live/</jwplayer:streamer> 
        <!--solo para video en demanda/duracion): --> 
        <!-- <jwplayer:duration>00.00</jwplayer:duration>  -->
      </item>  
    </channel> 
    </rss>
    <?php
    endif;
    ?>
    Thank: Manyblue

  6. #6
    Join Date
    Jul 2009
    Posts
    135

    Default

    You cannot completely hide the URLs from the user. They can still look at your playlist.php file.

    I just use JW Player's HLS with Flash fallback mode:
    http://www.longtailvideo.com/support...h-mp4-fallback

    Then offer an additional RTSP stream link below your JW Player embed code for Android or BlackBerry users who may not be able to play Flash or HLS:
    <script type="text/javascript" language="JavaScript">
    if ( (navigator.userAgent.indexOf('Android') >= 0) || (navigator.userAgent.indexOf('BlackBerry') >= 0) ) {
      document.write('Mobile viewers who cannot see the video above should try <a href="rtsp://mydomind.com:1935/live/presentacion_2">this direct video link</a> instead.');
    }
    </script>

  7. #7

    Default

    OK thankyou, i´ll look it.
    JW Player jajajajaja 249 $ anual ??? too expensive for me ..........

    Kind regards: Manyblue
    Last edited by manyblue; 02-18-2013 at 01:15 AM.

  8. #8

    Default

    Your solution, i have traied but no go now i can not open de player with my pc.
    I have solution for iOS and flash (http, rtmp) but not for android (rtp/rtp)

    What do you recommend me?

    Thankyou: Manyblue

  9. #9
    Join Date
    Jul 2009
    Posts
    135

    Default

    My solution is the same as your solution, but remove the Android/BlackBerry RTSP portion from playlist.php

    Then, add the direct RTSP video link manually below the video, just like the site you linked to:
    http://www.outdoorlive.tv/portfolio.php

    You can use my JavaScript code above to hide the Android/BlackBerry RTSP link from other users, if you prefer.

    JW Player has a free version too, although it contains their logo watermark and is missing some advanced features.

  10. #10

    Default

    PHP Code:
    <?php
    if (strpos($_SERVER['HTTP_USER_AGENT'],"iPhone") || strpos($_SERVER['HTTP_USER_AGENT'],"iPod") || strpos($_SERVER['HTTP_USER_AGENT'],"iPad")):
    ?>
    <rss version="2.0" xmlns:jwplayer="http://developer.longtailvideo.com/trac/" xmlns:media="http://search.yahoo.com/mrss/"> 
    <channel> 
      <title>Playlist</title> 
      <item> 
        <title>Directo OnLine.</title> 
        <description>Presentacion.</description>
         <pubDate>Sat, 20 Diciembre 2012 20:30:00 GMT</pubDate>
         <!--Calidad de streaming para dispositivos mobiles, streaming "presentacion_2" con calidad bajada para iphone, ipad, ipod --> 
        <media:content url="http://www.mydomind.com:1935/live/presentacion_2/playlist.m3u8" /> 
        <media:thumbnail url="thumbs/1.gif" /> 
        <jwplayer:provider>http</jwplayer:provider>   
        <!--solo para video en demanda/duracion): -->   
        <!-- <jwplayer:duration>00.00</jwplayer:duration>  --> 
      </item>  
    </channel> 
    </rss>
    <?php
    elseif (strpos($_SERVER['HTTP_USER_AGENT'],"BlacKberry") || strpos($_SERVER['HTTP_USER_AGENT'],"Android")):
    ?>
    <rss version="2.0" xmlns:jwplayer="http://developer.longtailvideo.com/trac/" xmlns:media="http://search.yahoo.com/mrss/"> 
    <channel> 
      <title>Playlist</title> 
      <item> 
        <title>Directo OnLine.</title> 
        <description>Presentacion.</description>
         <pubDate>Sat, 20 Diciembre 2012 20:30:00 GMT</pubDate>
         <!--Calidad de streaming para dispositivos mobiles, streaming "presentacion_2" con calidad bajada para iphone, ipad, ipod --> 
        <media:content url="http://www.maydomind.com:1935/live/presentacion_2/manifest.f4m" /> 
        <media:thumbnail url="thumbs/1.gif" /> 
        <jwplayer:provider>http</jwplayer:provider>   
        <!--solo para video en demanda/duracion): -->   
        <!-- <jwplayer:duration>00.00</jwplayer:duration>  --> 
      </item>  
    </channel> 
    </rss>
    <?php   
    else:
    ?>
    <rss version="2.0" xmlns:jwplayer="http://developer.longtailvideo.com/trac/" xmlns:media="http://search.yahoo.com/mrss/"> 
    <channel> 
      <title>Playlist</title> 
      <item> 
        <title>Directo OnLine.</title> 
        <description>Presentacion.</description>
        <!--Calidad de streaming para para pc, mac, etc, fijos con lineas mas rapidas, streaming "presentacion_1" --> 
        <media:content url="presentacion_1" /> 
        <media:thumbnail url="thumbs/1.gif" /> 
        <jwplayer:provider>rtmp</jwplayer:provider> 
        <jwplayer:streamer>rtmp://www.mydomind.com:1935/live/</jwplayer:streamer> 
        <!--solo para video en demanda/duracion): --> 
        <!-- <jwplayer:duration>00.00</jwplayer:duration>  -->
      </item>  
    </channel> 
    </rss>
    <?php
    endif;
    ?>
    Could this work?
    I no longer jwplayer fails in iphone, well, flash for pc, mac etc well but have not tried it on android

    kind regards: Manyblue

Page 1 of 2 12 LastLast

Similar Threads

  1. how to integrate wowza media server with my php website
    By elangovan in forum Live Streaming and Encoder Discussion
    Replies: 1
    Last Post: 09-19-2013, 03:08 AM
  2. playlist using php mysql
    By haarvik in forum Media Players and Devices Discussion
    Replies: 1
    Last Post: 05-20-2012, 04:03 PM

Posting Permissions

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