1 Reply Latest reply on Mar 26, 2012 2:51 AM by Silviu Vergoti

    Poster on SMP

    jimmytschonga

      Hi guys,

       

      sadly i do have one problem right now with strobe media playback.

      When i set the poster parameter to an absolute path of an image file, it works smoothly and SMP does show that picture in advance of playing the media file.

      But when i do want to load dynamic pictures and a php file shall control the access on files, it does not.

       

      So right now i do try to load a thumbnail with a php file.

      The syntaxes are like that:

       

      <?php

      include('db.php');

      if($_GET['action'] == 'UIShowFiles'){UIShowFiles();}

       

      function UIShowFiles(){

       

       

       

           if($_GET['format']=='movie'){

                $filename = '/path_to_folder'.$_GET['file_id'];

                header('Content-Type: video/mp4');

                 header("Content-Length: ".filesize($filename));

                readfile($filename);

           }else if($_GET['size']=='thumbnail'){

                $filename = '/path_to_thumbnail_folder'.$_GET['file_id'];

          

       

                header('Content-Type: image/jpeg');

                header("Content-Transfer-Encoding: binary");

                header("Content-Length: ".filesize($filename));

       

                readfile($filename);

           }

      }

       

       

      ?>

      So "http://example.com/movie/mymovieid" would be the path to a movie and "http://example.com/thumbnail/mymovieid" would be to the thumbnail. An htaccess with mod rewrite does the rest.

       

      When i try the script in a browser, it works smoothly.

      I also don't have any problems to play the video in SMP by givin a videoHref of "http://example.com/movie/mymovieid"

       

      But when i try to load the poster like "http://example.com/thumbnail/mymovieid", SMP does not show any poster at all.

       

      Does anybody know what to do. Can the headers be somehow responsible?

       

      Thanks in advance and greetz