[Plugin: JW Player Plugin for WordPress] Centering and other effects through CSS
-
Centering and other effects through CSS
JW Player Plugin for WordPressCurrently the player won’t center or accept CSS styling because the embedding script strips away the DIV and rewrites it.
Getting the player to center on the parent DIV in a configurable per-shortcode manner would require a significant number of changes that are best left to the LongTail development team.
So here is a quick hack to enable centering globally for all players and any shortcode:
After the plugin is activated and the update sequence is completed, a jwplayer.js will be created at:
/wp-content/uploads/jw-player-plugin-for-wordpress/player/jwplayer.js
this is a minified javascript, so edit with care…
we will inject the code
margin:"0 auto",at offset 40417 of jwplayer.js , so
a.utils.css(x,{position:"relative",width:m,height:v})becomes
a.utils.css(x,{margin:"0 auto",position:"relative",width:m,height:v})live demo with additional effects (WebKit shadows)
*later I’ll add a ‘reflection’ effect and an Ambilight effect (requires additional ActionScript and CanvasJS hooks)
cheers,
Sandro Bilbeisi
The topic ‘[Plugin: JW Player Plugin for WordPress] Centering and other effects through CSS’ is closed to new replies.