Yii 1.1: strobemediaplayback

Adobe's Open Source Media Player for Yii.
17 followers

Adobe's Strobe Media Playback player provides the following features:

•A standard appearance (the player’s “skin” or “chrome”) that is easy to customize.
•Playback for a wide variety of content types, including files of type FLV, SWF, F4V, MOV, MP4, JPG, and MP3; M3U playlists; and F4M metadata manifests.
•Support for both standard and advanced delivery methods, including progressive download, RTMP streaming, RTMP dynamic streaming, HTTP streaming, HTTP dynamic streaming, and live streaming. Flash Media Playback 1.5 and Strobe Media Playback 1.5 also provide support for RTMFP multicast content delivery.
•Automatic management of secure (DRM) content with Flash® Access™.
•Advanced playback, with digital video recorder (DVR) functionality, next/previous track seeking, and playlist navigation.
•Control of capabilities such as autoplay, autohide controls, poster frame definition, control bar positioning, and more, without the use of Flash authoring tools.
•Easy configuration with HTML.
•Simple integration of third-party plug-in services such as CDNs, advertising, and analytics. The flexible architecture gives you the option of compiling plug-ins statically or loading them dynamically, so plug-in providers can perform immediate upgrades and versioning.
•Quality of service (QoS) enhancements, including optimized buffering and dynamic (multi-bitrate) streaming.
•useHTML5,favorFlashOverHtml5Video options available.

See Strobe Media Playback Documentation PDF,(included in zip),for more information.

Requirements

Yii 1.4 or above.

Usage

INSTALLATION
Extract the zip file and place the smp folder in extensions folder of your Yii application.
Default values are set for the required variables,so a minimal configuration of the widget is required.Actually,all someone needs to display the player in a view is this code:

<?php  $this->widget('application.extensions.smp.StrobeMediaPlayback') ?>

In this simple case,the default test video file URL that comes with SMP distribution will be loaded in the player.

Basic configuration example:

<?php $this->widget('application.extensions.smp.StrobeMediaPlayback',array(
                     'srcRelative'=>'/[assets subfolder]/[filename].flv',//OR
                     'src'=>'http://[domain]/[path]/[filename].flv', //OR
                   //Embed a video  from youtube  with youtube plugin,included by default:  
                     'src'=>'http://www.youtube.com/watch?v=yQGAedJcdlI',                                                                                                                                                                                                            
                   'src_title'=>'[Title for the media file,will show up above the player.]',
                      //optional playlist:   
                      'playlistLinks'=>array('Title1'=>'URL1',                              
                                             'Title2'=>'URL2',
                                             'Title3'=>'URL3',                                        
                                                             ),
                      'width'=>'320',
                      'height'=>'240',
                      'allowFullScreen'=>'false'    //default is true                            
));?>

srcRelative is the path of the media file relative to the assets folder of your Yii application. It is converted into an absolute URL behind the scenes.
src is the absolute URL path of the file to be loaded in the player,the default value is the test video that comes with SMP distribution.
The choice between srcRelative and src is provided for convenience.If both are set,srcRelative will override src,see setSourceURL method.
playlistLinks is an array of "title"=>'URL' pairs.It will generate a list of media file links below the player. You still need to set src or srcRelative if you use a playlist for the default player content that you want loaded on initialization. Notice:the playlist links use a request with GET variable to set the src flashvar for the player,thus exposing the filepath,not so elegant.TO DO:use javascript to do it behind the scenes without page reload,your help is welcome! You can set additional variables for more advanced configuration,check swfoject and StrobeMediaPlayback documentation for details.If you choose to do so,you should first make sure that a public variable is declared in StrobeMediaPlayback.php class file and that the variable is echoed in swfobject.embedSWF call in strobeMediaPlayback.php view file.For example to set the loop variable ,(attribute of the params object argument), you should include

loop : "<?php echo $this->loop?>"

in the params argument.
The player can be used as an mp3 player,in that case the screen area is not needed so it can be hidden if appropriate dimensions are set,like width 340 and height 30,for example.

Resources

Total 13 comments

#17213 report it
shapovalov_org at 2014/05/13 05:05am
Error

Why I see this message: Flash Player Is Not Installed. Either Flash Player is not installed or javascript is disabled.No HTML5 video capability. For best experience it is recommended that you download Flash Player from Adobe.

I have installed flash player 13 and other players work corectly, and in Chrome 32 have a HTML5 suppotr. Please fix it!

#17085 report it
Aneesh Asokan at 2014/05/01 07:17am
Error when click the play button

i got an error when i click the video We are unable to connect to the content you have requested.we apologize for the inconvenience.

How it can solve?

#15591 report it
shobana_chandrasekar at 2013/11/27 02:04am
i got an error when i click the video

We are unable to connect to the content you have requested.we apologize for the inconvenience.

Please if anyone know that answer tell me how do i rectify it.

#9379 report it
giantdut at 2012/08/07 03:33pm
autoNext

is it possible to make auto next when i have a play list

and how t configure

'playlistLinks'=>array('Title1'=>'URL1',                              
                                             'Title2'=>'URL2',
                                             'Title3'=>'URL3',                                        
                                                             ),

because if my filename have space between the word, the url not give me a real url that i want

#6281 report it
resurtm at 2011/12/24 01:56am
Directory separator bug

Change the line 565 in StrobeMediaPlayback.php.

Now:

$dir = dirname(__FILE__).'\smp_source' ;

Should be:

$dir = dirname(__FILE__).DIRECTORY_SEPARATOR.'smp_source' ;

It is not working properly on non-Windows OSes.

#6280 report it
resurtm at 2011/12/24 12:27am
"Undefined index: title" error

Please, change the line 123 in strobeMediaPlayback.php.

Now:

<?php if($_GET['title'] !=null){echo $_GET['title'].'<br>';} else {echo $this->src_title.'<br>';}?>

Should be:

<?php if(isset($_GET['title']) && $_GET['title'] !=null){echo $_GET['title'].'<br>';} else {echo $this->src_title.'<br>';}?>
#5284 report it
Alex Adams at 2011/09/30 05:54pm
Work with... does not work with... and a couple of other things

These are the file types listed as compatible: FLV, SWF, F4V, MOV, MP4, JPG, and MP3

Here are my tests on different file types: FLV - works fine SWF - loads, but there's nothing to see F4V - works fine MOV - cannot play // this is a big omission MP4 - works fine JPG - displays, but is overlaid by the default starter image MP3 - works fine

What about: AVI, MPG, WMV ???

A couple of other things:

When included in a view, the player keeps all coolfieldsets on the page expanded.

When included in a view, the Gii generated Delete function does nothing.

Thought you'd like to know,

Alex

#4419 report it
egor at 2011/07/07 02:03am
Using divs (for example drop-down menu) on top of flash in ie

To use the div on top of flash add to file "strobeMediaPlayback.php" in line 78-80 following text:

var parameters = {
                    allowFullScreen: <?php echo $this->allowFullScreen?>,
                    wmode:"opaque" // add this
       };

Now you can use z-index.

#4317 report it
Junior - df9 at 2011/06/25 03:18pm
Little change to avoid empty title div

Hey!

the following could be changed in the view file strobeMediaPlayback.php:

line 121:

<?php if($this->src_title || (isset($_GET['title']) && $_GET['title'] !=null )): ?>
<div id="title">
    <h1>
<?php 
   if(isset($_GET['title']) && $_GET['title'] !=null){
      echo $_GET['title'].'<br>';
   } else {
      echo $this->src_title.'<br>';
   }
?>
    </h1>
</div>
<?php endif; ?>

by doing this, if you do not set/want title nor src_title, no empty title div is going to be generated

yes, it could be improved for you to choose the title div class/name, but it is up to the author

by the way, thanks very much for this excellent and easy-to-use extension!

:)

regards! regards!

#2638 report it
lethargy at 2011/01/24 12:52pm
youtube videos distorted size

The view file needed a bit tweaking, but otherwise excellent extension! Thanks!

But youtube videos seem to distort when you try to do full screen with google ads showing up in the bottom. Try it: wait until an ad pops up, do full screen and then go back to normal mode, you'll see that the video doesn't quite fit the frame anymore. Any suggestions?

#2420 report it
drumaddict at 2010/12/28 05:53am
@ scoob.junior

I tested on Windows only.You should check all paths and see if they are OK for Linux filesystem.You get that message because the widget did'nt find the strobemediaplayback.swf file in the source.Don't know much about Linux,so this is all the help I can give you.

#2411 report it
Junior - df9 at 2010/12/26 04:58pm
Not working

hey, thanks for this great extension, but i'm facing some issues on trying to run it on Apache/Linux

I was getting CException so i had to change line 565 in StrobeMediaPlayBack.php, replacing "\" by DIRECTORY_SEPARATOR

now, when i try to access, i get

Flash Player Is Not Installed.

Either Flash Player is not installed or javascript is disabled.No HTML5 video capability. For best experience it is recommended that you download Flash Player from Adobe.

But flash player is installed, i'm able to watch movies on youtube, view swf content though the Internet

I'm using Firefox 3.6.13, Yii 1.5, Apache 2, Kubuntu Linux

Could you please help me?

Thanks in advance

#2274 report it
saiful at 2010/12/06 01:51am
I got unknow index

file views/strobeMediaPlayback.php line 123, should it be:

if(isset($_GET['title'])){echo $_GET['title'].'<br>';} else {echo $this->src_title.'<br>';}

Leave a comment

Please to leave your comment.

Create extension