flowplayer的嵌套条件语句

Nested conditional statements for flowplayer

本文关键字:语句 条件 嵌套 flowplayer      更新时间:2023-09-26

为什么下面提到的代码不能工作?

<script>
flowplayer("player", "flowplayer-3.2.8.swf", {
    onLoad: function() { 
        this.setVolume(100); 
    },
    clip: {   
        autoBuffering: true,  
    },
var screenwidth = screen.width;
var screenheight = screen.height;
if (screenwidth / screenheight < 1.34) {
    <!--[if IE]>
         <plugins: {
     controls: null
     }/>
    <![endif]-->
    <!--[if !IE]><!-->
         <plugins: {
     controls: true
     }/>
    <!--<![endif]-->
});
</script>
 flowplayer("player", "flowplayer-3.2.8.swf", {
        onLoad: function() { 
            this.setVolume(100); 
        },
        clip: {   
            autoBuffering: true,
    url: video_path  
        },
here video_path is the path of your video

你可以试试:

 <?php
   echo '<a href="'.{VIDEO PATH HERE}.'" style="display:block;width:631px;height:361px" id="player">  </a>';
   echo '<script>
          flowplayer("player", "http://releases.flowplayer.org/swf/flowplayer-3.2.15.swf", {  
             ''plugins'': {
             ''sharing'': {
             ''url'': ''http://releases.flowplayer.org/swf/flowplayer.sharing-3.2.10.swf'',
             ''buttons'': {
             ''overColor'': ''#ff0000''
         },
         ''email'': {
             ''subject'': ''A cool video''
         },
         ''embed'': {
             ''fallbackUrls'': [ ''Extremists.mov'' ]
         },
         ''facebook'': {
             ''shareWindow'': ''_popup''
         },
         ''twitter'': true
         },
         ''dock'': {
             ''right'': 15,
             ''horizontal'': false,
             ''width'': ''10%'',
             ''autoHide'': false
         }
      },
      clip:  {
         autoPlay: false,
         autoBuffering: true
      }
   });
  </script>';
 ?>

谢谢你的评论,Dolours。我在我的项目文件中添加了flowplayer,但没有在这里包括它,因为我认为它是假设的。这是我的标题;

<script src="http://www.dyslexiaservices.com.au/new/flowplayer-3.2.8.min.js"></script>

如果您删除"clip"下面的所有内容,则代码在有或没有视频路径的情况下工作正常(我都尝试过)。问题似乎与条件IE语句有关。