Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

#57 fix and sort mime types

  • Loading branch information...
commit 9fc73a05975d38fe08c7d1c5a5631daf2eff45ef 1 parent 5d9476f
@gerritvanaaken authored
Showing with 9 additions and 7 deletions.
  1. +9 −7 podlove-web-player/podlove-web-player.php
View
16 podlove-web-player/podlove-web-player.php
@@ -217,22 +217,24 @@ function podlove_pwp_media_shortcode($tagName, $atts) {
// <source> tags
- if ($opus) {
- $sources[] = '<source src="' . htmlspecialchars($opus) . '" type="' . $tagName . '/ogg; codecs=opus" />';
- }
if ($mp4) {
$sources[] = '<source src="' . htmlspecialchars($mp4) . '" type="' . $tagName . '/mp4" />';
$flash_src = htmlspecialchars($mp4);
}
- if ($ogg) {
- $sources[] = '<source src="' . htmlspecialchars($ogg) . '" type="' . $tagName . '/ogg; codecs=vorbis" />';
+ if ($webm) {
+ $sources[] = '<source src="' . htmlspecialchars($webm) . "\" type='video/webm; codecs=\"vp8, vorbis\"' />";
+ }
+ if ($ogg && $tagName == "audio") {
+ $sources[] = '<source src="' . htmlspecialchars($ogg) . "\" type='audio/ogg; codecs=vorbis' />";
+ } elseif ($ogg && $tagName == "video") {
+ $sources[] = '<source src="' . htmlspecialchars($ogg) . "\" type='video/ogg; codecs=\"theora, vorbis\"' />";
}
if ($mp3) {
$sources[] = '<source src="' . htmlspecialchars($mp3) . '" type="' . $tagName . '/mp3" />';
$flash_src = htmlspecialchars($mp3);
}
- if ($webm) {
- $sources[] = '<source src="' . htmlspecialchars($webm) . '" type="' . $tagName . '/webm" />';
+ if ($opus) {
+ $sources[] = '<source src="' . htmlspecialchars($opus) . "\" type='" . $tagName . "/ogg; codecs=opus' />";
}
if ($flv) {
$sources[] = '<source src="' . htmlspecialchars($flv) . '" type="' . $tagName . '/flv" />';
Please sign in to comment.
Something went wrong with that request. Please try again.