flowplayer的嵌套条件语句
Nested conditional statements for flowplayer
为什么下面提到的代码不能工作?
<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语句有关。
相关文章:
- 这个条件语句的逻辑有问题
- 如何检查if/else语句中的随机条件
- 使用条件语句,使 jquery fadeIn/fadeOut 仅在视口 >= 480px 时才有效
- 照片滑块的条件语句
- 使用解析为javascript源的.php,如何使用条件语句将javascript代码封装在php括号之间
- KnockoutJS:为虚拟元素使用嵌套的条件if语句
- 在if语句注释的条件内指定变量的值
- Javascript/C# - 满足语句条件时的确认对话框
- 如何将窗口[VariableName]设置为if语句条件
- if 语句条件由 javascript 中 if 语句内的内容触发
- if 语句条件逻辑
- 函数声明,就像语句条件一样
- 如何减少“如果语句”条件?[减少 if 语句中的条件]
- if语句条件检查!= "undefined"失败
- If语句条件满足,但内容未执行
- AngularJS在ng-repeat语句中的if语句条件
- 变量中用作if语句条件的字符串
- Javascript如果语句条件不满足
- if 语句 - 条件评估时间(Javascript)
- 数组中指定的 if 语句条件