我无法访问flowplayer API。函数flowplayer.isLoaded ()
返回false,但播放器工作正常并播放所需的视频。我究竟做错了什么?
例:
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<!-- A minimal Flowplayer setup to get you started -->
<!--
include flowplayer JavaScript file that does
Flash embedding and provides the Flowplayer API.
-->
<script type="text/javascript" src="flowplayer-3.2.6.min.js"></script>
<!-- some minimal styling, can be removed -->
<link rel="stylesheet" type="text/css" href="style.css">
<!-- page title -->
<title>Minimal Flowplayer setup</title>
</head><body>
<a
href="http://localhost:8084/PlayerTest/content/some_video.flv"
style="display:block;width:520px;height:330px"
id="player">
</a>
<!-- this will install flowplayer inside previous A- tag. -->
<script type="text/javascript">
flowplayer("player", "../flowplayer-3.2.7.swf");
</script>
<script type="text/javascript">
function gett(){
var text=flowplayer("player").getStatus();
document.getElementById("state").innerHTML="bstart: "+text.bufferStart+" bend: "+text.bufferEnd+" time: "+flowplayer().isLoaded();
}
</script>
<div id="state">state</div>
<input type="button" value="get" onclick="gett();" />
</body>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<!-- A minimal Flowplayer setup to get you started -->
<!--
include flowplayer JavaScript file that does
Flash embedding and provides the Flowplayer API.
-->
<script type="text/javascript" src="flowplayer-3.2.6.min.js"></script>
<!-- some minimal styling, can be removed -->
<link rel="stylesheet" type="text/css" href="style.css">
<!-- page title -->
<title>Minimal Flowplayer setup</title>
</head><body>
<a
href="http://localhost:8084/PlayerTest/content/some_video.flv"
style="display:block;width:520px;height:330px"
id="player">
</a>
<!-- this will install flowplayer inside previous A- tag. -->
<script type="text/javascript">
flowplayer("player", "../flowplayer-3.2.7.swf");
</script>
<script type="text/javascript">
function gett(){
var text=flowplayer("player").getStatus();
document.getElementById("state").innerHTML="bstart: "+text.bufferStart+" bend: "+text.bufferEnd+" time: "+flowplayer().isLoaded();
}
</script>
<div id="state">state</div>
<input type="button" value="get" onclick="gett();" />
</body>