1

Why doesn't the below mentioned code work?

<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>
4

3 回答 3

0
 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
于 2013-04-06T07:23:25.170 回答
0

谢谢你的评论,多洛尔斯。我已经在我的项目文件中添加了 flowplayer,但没有像我认为的那样在此处包含它。这就是我的标题中出现的内容;

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

如果您删除“剪辑”下方的所有内容,无论有没有视频路径,代码都可以正常工作(我都尝试过)。问题似乎与条件 IE 语句有关。

于 2013-04-07T02:10:05.950 回答
0

你可以试试这个:

 <?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>';
 ?>
于 2013-04-06T10:16:20.113 回答