aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--librevideojs.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/librevideojs.php b/librevideojs.php
index 3a81b48..88bca4a 100644
--- a/librevideojs.php
+++ b/librevideojs.php
@@ -156,6 +156,13 @@ function LibreVideoJS_embed($atts, $content=null){
//force_types
$_force_types = 'video/' . $code;
+ if ($_force_types === "video/webm") {
+ $_force_types .= "'," . "'video/ogg";
+ }
+ else {
+ $_force_types .= "'," . "'video/webm";
+ }
+
//custom style
$style = '';
if(!empty($width)){
@@ -175,7 +182,7 @@ EOT;
</video>
</div>
<script>
- cliplibrejs('$player',{plugins:{resolutionSelector:{force_types:['$_force_types','video/ogv'],default_res:"$resolution",}},nativeControlsForTouch:false}).ready(function(){this.hotkeys({volumeStep:0.1,seekStep:5,enableMute:true,enableFullscreen: true,enableNumbers:true}),this.progressTips();});
+ cliplibrejs('$player',{plugins:{resolutionSelector:{force_types:['$_force_types'],default_res:"$resolution",}},nativeControlsForTouch:false}).ready(function(){this.hotkeys({volumeStep:0.1,seekStep:5,enableMute:true,enableFullscreen: true,enableNumbers:true}),this.progressTips();});
</script>
$style
EOT;