From 95f67d2ebcb367bc5d06b802bdffb5642dac8f81 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 17 Jun 2009 11:16:44 +0400 Subject: add support for HTML5 way of playing audio/video enclosures (closes #246) --- functions.php | 40 ++++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) (limited to 'functions.php') diff --git a/functions.php b/functions.php index c89f11a13..6a8e85628 100644 --- a/functions.php +++ b/functions.php @@ -4692,11 +4692,21 @@ $entry = ""; - if (($ctype == __("audio/mpeg")) && - (get_pref($link, "ENABLE_FLASH_PLAYER")) ) { - - $entry .= " "; - + if (substr($ctype,0,6)=="audio/" || $ctype=="application/ogg" || $ctype=="application/x-ogg") { + $entry .= ""; + if (($ctype == __("audio/mpeg")) && + (get_pref($link, "ENABLE_FLASH_PLAYER")) ) { + $entry .= "".__('Switch to Flash Player')."
"; + $entry .= ""; + } + } elseif (substr($ctype,0,6)=="video/") { + $entry .= ""; } $entry .= "" . @@ -5236,11 +5246,21 @@ $entry = ""; - if (($ctype == __("audio/mpeg")) && - (get_pref($link, "ENABLE_FLASH_PLAYER")) ) { - - $entry .= " "; - + if (substr($ctype,0,6)=="audio/" || $ctype=="application/ogg" || $ctype=="application/x-ogg") { + $entry .= ""; + if (($ctype == __("audio/mpeg")) && + (get_pref($link, "ENABLE_FLASH_PLAYER")) ) { + $entry .= "".__('Switch to Flash Player')."
"; + $entry .= ""; + } + } elseif (substr($ctype,0,6)=="video/") { + $entry .= ""; } $entry .= "" . -- cgit v1.2.3