aboutsummaryrefslogtreecommitdiffstats
path: root/librevideojs-html5-player.php
diff options
context:
space:
mode:
authorHeckyel <heckyel@openmailbox.org>2017-02-10 15:14:47 -0500
committerHeckyel <heckyel@openmailbox.org>2017-02-10 15:14:47 -0500
commitcbc731c581070b61e8f13960f999d09684038822 (patch)
treecd90135bf306dd4df0117e12f7a02684b6ed1bdd /librevideojs-html5-player.php
parente707968dde70de7cedf7f0ada672f59bd8db902e (diff)
downloadlibrevideojs-html5-player-cbc731c581070b61e8f13960f999d09684038822.tar.lz
librevideojs-html5-player-cbc731c581070b61e8f13960f999d09684038822.tar.xz
librevideojs-html5-player-cbc731c581070b61e8f13960f999d09684038822.zip
new version compatible with hotkeys
Diffstat (limited to 'librevideojs-html5-player.php')
-rw-r--r--librevideojs-html5-player.php29
1 files changed, 16 insertions, 13 deletions
diff --git a/librevideojs-html5-player.php b/librevideojs-html5-player.php
index f1108c1..a29a781 100644
--- a/librevideojs-html5-player.php
+++ b/librevideojs-html5-player.php
@@ -82,20 +82,18 @@ if (!class_exists('LIBREVIDEOJS_HTML5_PLAYER')){
}
function librevideojs_html5_player_enqueue_scripts(){
- global $post, $plugin_url;
- $plugin_url = plugins_url('', __FILE__);
- if (is_home() || is_single() && strpos($post->post_content, '[librevideojs_video') !== false){
- wp_enqueue_style('lvjs-mix-master', $plugin_url . '/librevideojs/css/mix-material/master.css', array(), '1.4');
- wp_enqueue_style('lvjs-material', $plugin_url . '/librevideojs/css/librevideojs-material/master.css', array(), '1.4');
- wp_enqueue_style('lvjs-selector', $plugin_url . '/librevideojs/selector/video-quality-selector.css', array(), '1.4');
- wp_enqueue_script('lvjs', $plugin_url . '/librevideojs/js/cliplibrejs.dev.js', array(), L_VERSION);
- wp_enqueue_script('lvjs-selector', $plugin_url . '/librevideojs/selector/video-quality-selector.js', array(), L_VERSION);
+ global $post, $plugin_url;
+ $plugin_url = plugins_url('', __FILE__);
+ if (is_home() || is_single() && strpos($post->post_content, '[librevideojs_video') !== false){
+ wp_enqueue_style('lvjs-mix-master', $plugin_url . '/librevideojs/css/mix-material/master.css', array(), '1.4');
+ wp_enqueue_style('lvjs-material', $plugin_url . '/librevideojs/css/material/master.css', array(), '1.4');
+ wp_enqueue_style('lvjs-selector', $plugin_url . '/librevideojs/css/quality-selector.css', array(), '1.4');
+ wp_enqueue_script('lvjs', $plugin_url . '/librevideojs/js/cliplibrejs.dev.js', array(), L_VERSION);
} else if (is_page() && strpos($post->post_content, '[librevideojs_video') !== false){
- wp_enqueue_style('lvjs-mix-master', $plugin_url . '/librevideojs/css/mix-material/master.css', array(), '1.4');
- wp_enqueue_style('lvjs-material', $plugin_url . '/librevideojs/css/librevideojs-material/master.css', array(), '1.4');
- wp_enqueue_style('lvjs-selector', $plugin_url . '/librevideojs/selector/video-quality-selector.css', array(), '1.4');
- wp_enqueue_script('lvjs', $plugin_url . '/librevideojs/js/cliplibrejs.dev.js', array(), L_VERSION);
- wp_enqueue_script('lvjs-selector', $plugin_url . '/librevideojs/selector/video-quality-selector.js', array(), L_VERSION);
+ wp_enqueue_style('lvjs-mix-master', $plugin_url . '/librevideojs/css/mix-material/master.css', array(), '1.4');
+ wp_enqueue_style('lvjs-material', $plugin_url . '/librevideojs/css/material/master.css', array(), '1.4');
+ wp_enqueue_style('lvjs-selector', $plugin_url . '/librevideojs/css/quality-selector.css', array(), '1.4');
+ wp_enqueue_script('lvjs', $plugin_url . '/librevideojs/js/cliplibrejs.dev.js', array(), L_VERSION);
} else {
return false;
}
@@ -228,6 +226,11 @@ EOT;
cliplibrejs('$player',{plugins:{resolutionSelector:{force_types:['video/webm','video/ogg','video/mp4'],default_res:"$resolution"}},nativeControlsForTouch: false});
// @license-end
</script>
+ <script>
+ // @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-v3-or-Later
+ cliplibrejs('$player').ready(function(){this.hotkeys({volumeStep: 0.1,seekStep: 5,enableMute: true,enableFullscreen: true,enableNumbers: true});});
+ // @license-end
+ </script>
$style
<br>
EOT;