Page 1 of 1

[SOLVED] CP HTML5/Flash media player - customization, skins

Posted: Mon 9. Nov 2015, 19:42
by hal
I had a closer look at the HTML5/Flash media player CP and have a question about customization:

1. Per default we have (in html head):

Code: Select all

type="text/css" href="http://vjs.zencdn.net/4.10/video-js.css" />
<script src="http://vjs.zencdn.net/4.10/video.js"
They seem to come from js.inc.php, lines 130ff

Code: Select all

/**
 * Init Video JS
 */
function initVideoJs() {
	$GLOBALS['phpwcms']['video-js'] = empty($GLOBALS['phpwcms']['video-js']) ? PHPWCMS_HTTP_SCHEMA.'://vjs.zencdn.net/4.10/' : rtrim($GLOBALS['phpwcms']['video-js'], '/') . '/';
	$GLOBALS['block']['custom_htmlhead']['video-js.css'] = '  <link rel="stylesheet" type="text/css" href="' . $GLOBALS['phpwcms']['video-js'] . 'video-js.css" />';
}
Question No 1: Is there a way to store the css locally for customisation - it does look to me like it was possible, but as a complete code noob I am not sure. This:

Code: Select all

$GLOBALS['phpwcms']['video-js']
seems to point to a setting, maybe in conf.inc.php? Just that there is no such variable.... so would i work if I added this line to conf.inc.php:

Code: Select all

$phpwcms['video_js']         = 'template/inc_css';    //path to html5 player stylesheet
and just drop a copy of video-js.css into that folder to edit it there?

-------------------------------------------

2. In the backend within the HTML5/Flash media player CP there is a dropdown box labeled 'skin HTML5:' and named 'fmp_set_skin_html5'. In cnt.25.article.inc.php we find a path related to that name: (template/) 'lib/jw_media_player/skins/'. That seems to tell us that skins for the html5 player would have to resdide there - I tried dropping a css file in there, but it didn't show up in the dropdown...

Question No 2: How would I create/ place a customized skin to have it available in the dropbox? The 'skins' that can be generated here: http://designer.videojs.com/ are not more than .css files... so where to put/ register them in order to make them usable?

Any help and hints would be greatly appreciated.

Re: CP HTML5/Flash media player - customization, skins

Posted: Tue 10. Nov 2015, 06:44
by Oliver Georgi
You can use a self hosted video.js by setting the path to it in the config value:

Code: Select all

$phpwcms['video-js']
In that folder you place the video.js and your video-js.css. It#s up to you to skin it as you like. Just CSS.

JW Player is outdated and no longer supported. It will be removed very soon as everything that requires the Flash Plugin.

Re: CP HTML5/Flash media player - customization, skins

Posted: Tue 10. Nov 2015, 11:06
by hal
Oliver - thanks for your reply. I am often amazed how quick that goes..

But honestly - sometimes when reading your replies I feel a bit like the ancient Greek must have - when talking to Pythia :D.

You are saying I paste the following line into conf.inc.php:

Code: Select all

$phpwcms['video_js']         = 'whatever folder/whatever folder';    //path to html5 player stylesheet and js file
Then drop the newest version of video.js and your video-js.css into that folder and edit them to my liking.

Is that correct?

Edit: Tried it and it is correct.

Just out of curiosity - what is that about the html5 skin dropdown in the respective content part?

Re: CP HTML5/Flash media player - customization, skins

Posted: Tue 10. Nov 2015, 12:06
by Oliver Georgi
hal wrote:Just out of curiosity - what is that about the html5 skin dropdown in the respective content part?
Seems something left from an older video.js implementation…

Re: CP HTML5/Flash media player - customization, skins

Posted: Tue 10. Nov 2015, 12:46
by top
Is this difference important?

Code: Select all

$phpwcms['video_js']

Code: Select all

$phpwcms['video-js']

Re: CP HTML5/Flash media player - customization, skins

Posted: Tue 10. Nov 2015, 12:48
by Oliver Georgi
No undersorce. It is

Code: Select all

$phpwcms['video-js']

Re: CP HTML5/Flash media player - customization, skins

Posted: Wed 11. Nov 2015, 00:49
by hal
LOL - didn't even realize the difference with the underscore - but did it correct by accident...hahaha...

( :oops: )