Javascript 为什么我必须唤起flowplayer两次?
这太奇怪了 这是我的密码: HTML 上面的examaple不起作用,玩家不能在DOM中创建。但下面的例子确实如此(我所做的就是给flowplayer打两次电话) HTMLJavascript 为什么我必须唤起flowplayer两次?,javascript,jquery,flowplayer,Javascript,Jquery,Flowplayer,这太奇怪了 这是我的密码: HTML 上面的examaple不起作用,玩家不能在DOM中创建。但下面的例子确实如此(我所做的就是给flowplayer打两次电话) HTML 为什么?尝试删除超链接的测试描述,它应该可以工作: <a class="video" href="http://pseudo01.hddn.com/vod/demo.flowplayervod/flowplayer-700.flv" style="display:block;width:520px;height:330
为什么?尝试删除超链接的测试描述,它应该可以工作:
<a class="video" href="http://pseudo01.hddn.com/vod/demo.flowplayervod/flowplayer-700.flv" style="display:block;width:520px;height:330px">**Test**</a>
尝试移动页面底部的脚本。这是其中一个
这是我的示例,它可以工作:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Set default value</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="http://static.flowplayer.org/js/flowplayer-3.2.6.min.js"></script>
</head>
<body>
<a class="video" href="http://pseudo01.hddn.com/vod/demo.flowplayervod/flowplayer-700.flv" style="display:block;width:520px;height:330px"></a>
<script type="text/javascript">
$(document).ready(function () {
flowplayer('a.video', {
src: 'http://releases.flowplayer.org/swf/flowplayer-3.2.7.swf',
clip: {
autoPlay: false,
autoBuffering: true
}
});
})
</script>
</body>
</html>
设置默认值
$(文档).ready(函数(){
flowplayer(“a.video”{
src:'http://releases.flowplayer.org/swf/flowplayer-3.2.7.swf',
剪辑:{
自动播放:错误,
自动缓冲:对
}
});
})
尝试删除超链接的测试描述,它应该可以工作:
<a class="video" href="http://pseudo01.hddn.com/vod/demo.flowplayervod/flowplayer-700.flv" style="display:block;width:520px;height:330px">**Test**</a>
尝试移动页面底部的脚本。这是其中一个
这是我的示例,它可以工作:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Set default value</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="http://static.flowplayer.org/js/flowplayer-3.2.6.min.js"></script>
</head>
<body>
<a class="video" href="http://pseudo01.hddn.com/vod/demo.flowplayervod/flowplayer-700.flv" style="display:block;width:520px;height:330px"></a>
<script type="text/javascript">
$(document).ready(function () {
flowplayer('a.video', {
src: 'http://releases.flowplayer.org/swf/flowplayer-3.2.7.swf',
clip: {
autoPlay: false,
autoBuffering: true
}
});
})
</script>
</body>
</html>
设置默认值
$(文档).ready(函数(){
flowplayer(“a.video”{
src:'http://releases.flowplayer.org/swf/flowplayer-3.2.7.swf',
剪辑:{
自动播放:错误,
自动缓冲:对
}
});
})
我最近遇到了这个问题,因为我在锚定标签中有一个播放图标。为了解决这个问题,我在单击时清空了锚标记HTML。下面是示例代码
HTML:
Javascript:
$(document).ready(function () {
$("a.videoPlayer").click(function (e) {
// Empty anchor tag to avoid having to click twice
$(this).empty();
flowplayer("videoPlayer", "/flash/video/flowplayer.swf");
e.preventDefault();
});
});
我最近遇到了这个问题,因为我在锚标签中有一个播放图标。为了解决这个问题,我在单击时清空了锚标记HTML。下面是示例代码 HTML: Javascript:
$(document).ready(function () {
$("a.videoPlayer").click(function (e) {
// Empty anchor tag to avoid having to click twice
$(this).empty();
flowplayer("videoPlayer", "/flash/video/flowplayer.swf");
e.preventDefault();
});
});
谢谢,这很有效!奇怪的是a标签必须是完全空的,但这似乎是必要的。@nerdess:是的,这很奇怪。我没有读过文档,但我想它一定是强制性的。很高兴它起到了作用。谢谢,这起作用了!奇怪的是a标签必须是完全空的,但这似乎是必要的。@nerdess:是的,这很奇怪。我没有读过文档,但我想它一定是强制性的。很高兴这有帮助。
<a id="videoPlayer" class="videoPlayer" href="[VIDEO_URL]" style="background-image: url(VIDEO_THUMB_URL);">
<img src="/images/icon_video_play.png" width="40" height="40" alt="View video" />
</a>
a.videoPlayer {
display: block;
width: 480px;
height: 270px;
text-align: center;
cursor: pointer;
}
a.videoPlayer img {
margin-top: 115px;
border: 0px;
}
$(document).ready(function () {
$("a.videoPlayer").click(function (e) {
// Empty anchor tag to avoid having to click twice
$(this).empty();
flowplayer("videoPlayer", "/flash/video/flowplayer.swf");
e.preventDefault();
});
});