dongpanbo4727 2012-04-01 13:06
浏览 239

在FireFox webm中不支持但在Chrome中支持相同的webm

Here is my code:

<?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++;
    }

}


?>

When I change the extension to webm in both xsources_mp4 and xsource_webm then it again work in chrome but in Firefox it show undefined when i Firebug it and the video fail yo play.

  • 写回答

1条回答 默认 最新

  • duanliang1019 2012-04-01 13:12
    关注

    Different browsers use different formats for playing content, some event support more than one. Check this wiki which browser supports what.

    评论

报告相同问题?

悬赏问题

  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 划分vlan后不通了
  • ¥15 GDI处理通道视频时总是带有白色锯齿
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)
  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制
  • ¥15 merge函数占用内存过大
  • ¥15 使用EMD去噪处理RML2016数据集时候的原理
  • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大