Php 在FireFox中webm不支持,但在Chrome中支持相同的webm
这是我的密码:Php 在FireFox中webm不支持,但在Chrome中支持相同的webm,php,xml,firefox,Php,Xml,Firefox,这是我的密码: <?php /** * @author Arpit * @copyright 2012 */ $crxml=file_get_contents('latest.xml'); $rss=new SimpleXMLElement($crxml); $playlistitem=1; foreach($rss->channel->item as $post) { if($playlistitem<=8) { echo '
<?php
/**
* @author Arpit
* @copyright 2012
*/
$crxml=file_get_contents('latest.xml');
$rss=new SimpleXMLElement($crxml);
$playlistitem=1;
foreach($rss->channel->item as $post)
{
if($playlistitem<=8)
{
echo '<ul>';
echo '<li class="xdesc">'.$post->description.'</li>';
$dc=$post->children('http://search.yahoo.com/mrss/');
echo '<li class="xthumb">'.$dc->thumbnail->attributes()->url.'</li>';
echo '<li class="xpreview">'.$dc->thumbnail->attributes()->url.'</li>';
echo '<li class="xsources_mp4">'.$dc->content->attributes()->url.'</li>';
$dc->content->attributes()->url=preg_replace('/.mp4/','.webm',$dc->content->attributes()->url);
echo '<li class="xsources_webm">'.$dc->content->attributes()->url.'</li>';
echo '</ul>';
$playlistitem++;
}
}
?>
当我在xsources_mp4和xsource_webm中将扩展名更改为webm时,它在chrome中再次工作,但在Firefox中,当我使用Firebug时,它显示为未定义,视频播放失败。不同的浏览器使用不同的格式播放内容,一些事件支持多个。检查哪个浏览器支持什么。否,但当我手动添加在Firefox中工作的代码ir path.webm时,但当我从xml文件调用它时,它不工作。