Hi there,
I ran out of version 3.2 of FLV Player that i did not managed to get work
Instead I'm using v3.9 (the last one actually) which can do fullscreen quite well
I did not try to use the bultin playlist funtion of the player but I assume the summray and list templates of the module will do this well.
All you have to do to get it work is :
1- It requires the CGExtensions module so install this module first for your Cmsms install
2- Install the FLVPlayer module
3- get the last version (at least 3.9) of the JW FLV PLayer (
http://www.jeroenwijering.com/?item=JW_FLV_Player)
4- Extract the zip file and copy the files flvplayer.swf and swfobject.js to your web server (maybe in the /modules/FLVPlayer/JWFLVPlayer directory to get things ordered)
5- Add permission to some users/groups to manage FLV Files (in Admin -> Users -> Permissions)
6- Go and get to Admin -> Content -> Flash Video Manager
6.1- Create at least a member and a group
6.2- add some videos to your install
6.3- update the paths to your files like :
FLV File URL Prefix:
http://www.mydomain.tld/path/to/my/videos
FLV Player URL:
http://www.mydomain.tld/path/to/my/player
Note : /!\ No trailing slash at the end !!
7- Create some new templates like these ones and make them default :
/*******************Summary template*********************/
Code: Select all
{literal}
<__script__ type="text/javascript">
// some variables to save
var currentPosition;
var currentVolume;
var currentItem;
// these functions are caught by the JavascriptView object of the player.
function sendEvent(typ,prm) { thisMovie("mpl").sendEvent(typ,prm); };
function getUpdate(typ,pr1,pr2,pid) {
if(typ == "time") { currentPosition = pr1; }
else if(typ == "volume") { currentVolume = pr1; }
else if(typ == "item") { currentItem = pr1;setTimeout("getItemData(currentItem)",100); }
var id = document.getElementById(typ);
id.innerHTML = typ+ ": "+Math.round(pr1);
pr2 == undefined ? null: id.innerHTML += ", "+Math.round(pr2);
if(pid != "null") {
document.getElementById("pid").innerHTML = "(received from the player with id <i>"+pid+"</i>)";
}
};
// These functions are caught by the feeder object of the player.
function loadFile(obj) { thisMovie("mpl").loadFile(obj); };
function addItem(obj,idx) { thisMovie("mpl").addItem(obj,idx); }
function removeItem(idx) { thisMovie("mpl").removeItem(idx); }
function getItemData(idx) {
var obj = thisMovie("mpl").itemData(idx);
var nodes = "";
for(var i in obj) {
nodes += "<li>"+i+": "+obj[i]+"</li>";
}
document.getElementById("data").innerHTML = nodes;
};
// This is a javascript handler for the player and is always needed.
function thisMovie(movieName) {
if(navigator.appName.indexOf("Microsoft") != -1) {
return window[movieName];
} else {
return document[movieName];
}
};
// I assume here that you have a jpeg file named exactly the same as you video file (video.flv <> video.jpg)
function newMovie(urlbase,name,movie_id,movie_title,description,created,modified,start_date,end_date,genre,member,length,directurl) {
movie_url = urlbase+'/'+name+'.flv';
image_url = urlbase+'/'+name+'.jpg';
loadFile({file:movie_url,title:movie_title,link:movie_url,id:movie_id,image:image_url,author:member});
};
</__script>
{/literal}
// This is not the default but you can arrange this to suit your needs...
<a href="javascript:sendEvent('stop')">Stop loading and playing</a>.
// This must list all the movies creating a link to load it in the player
<div class="showSummary">
{foreach from=$summaryitems item=entry}
<p class="showValue"><a href="javascript:newMovie('{$flvurlprefix}','{$entry->name}',{$entry->id},'{$entry->slash_title}','{$entry->slash_description}','{$entry->created|date_format}','{$entry->modified|date_format}','{$entry->start_date|date_format}','{$entry->end_date|date_format}','{$entry->genre}','{$entry->member}','{$entry->length_hours}:{$entry->length_minutes}:{$entry->length_seconds}','{$entry->url}')">
{$entry->slash_title}</a></p>
{/foreach}
</div>
/*******************Detail template*********************/
Code: Select all
// First, the ufo.js is no longer used...
<__script__ type="text/javascript" src="{$flvplayerlocation}/swfobject.js"></__script>
// Here we insert the player, the text wiil be replaced by it.
<div id="player">
<a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a>to see this movie.
</div>
// Here is the definition of the player will all the parameters... you can go to
// http://www.jeroenwijering.com/extras/readme.html#flashvars and set the vars of your own choice !
{literal}
<__script__ type="text/javascript">
var so = new SWFObject('{/literal}{$flvplayerlocation}{literal}/flvplayer.swf','mpl','320','240','7');
so.addParam('allowfullscreen','true');
so.addVariable('displayheight','240');
so.addVariable('file','{/literal}{$flvurlprefix}/{$field_name}.flv{literal}');
so.addVariable('height','240');
so.addVariable('image','{/literal}{$flvurlprefix}/{$field_name}.jpg{literal}');
so.addVariable('width','320');
so.addVariable('autostart','false');
so.addVariable('overstretch','false');
so.addVariable('showvolume','true');
so.addVariable('enablejs','true');
// Very important to use the js loadFile() and sendEvent() funtions
so.addVariable('javascriptid','mpl');
so.addVariable('type','flv');
so.write('player');
</__script>
{/literal}
// A Little bonus to show the parameters and state of the player (ginven by the player which id is 'pid')
<h2>RECEIVE UPDATES</h2>
<p id="pid"></p>
<ul>
<li id="item"> </li>
<li id="volume"> </li>
<li id="state"> </li>
<li id="time"> </li>
<li id="load"> </li>
<li id="size"> </li>
</ul>
// A bonus too to show what is loaded in the player
<h2>ITEM DATA</h2>
<ul id="data"></ul>
/***************END*************/
8- you can now embed this in your pages using two functions :
First to show your videos,
{cms_module module='FLVPlayer' mode="summary" sort="name_asc"}
then to show the player :
{cms_module module='FLVPlayer' mode="detail"}
I hope it will help !!