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 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?
  • ¥15 求daily translation(DT)偏差订正方法的代码
  • ¥15 js调用html页面需要隐藏某个按钮
  • ¥15 ads仿真结果在圆图上是怎么读数的
  • ¥20 Cotex M3的调试和程序执行方式是什么样的?
  • ¥20 java项目连接sqlserver时报ssl相关错误
  • ¥15 一道python难题3
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler