停止 flv 循环
我有一个视频播放器 swf,它通过 flashvars 加载 flv 文件。这工作得很好,但是当它到达结尾时它会循环,即返回开始并再次播放。仅当它嵌入到页面中时才会发生这种情况,因为当我按 cntl+Enter 单独预览 swf 时它会起作用。
它是通过 netstream 加载的。这是最后一段代码...
var isPlaying:Boolean;
isPlaying = false;
var video:String;
video = _root.videoURL;
if (video == undefined) {
video = "http://www.masterseries.co.uk/public/TempFiles/Concrete1.flv";
}
function playVideo() {
isPlaying = true;
trace("Play Video...");
_root.myvid_mc.ns.play(video);
_root.cover_mc.play_btn._visible = false;
}
请问有什么帮助吗? 谢谢
I have a video player swf which loads in a flv file via flashvars. This works perfectly, but when it reaches the end it loops ie Goes back to start and plays again. This only happens when it is embedded in a page because when I press cntl+Enter to preview as swf alone it works.
It's loaded via netstream. Here's the last bit of code...
var isPlaying:Boolean;
isPlaying = false;
var video:String;
video = _root.videoURL;
if (video == undefined) {
video = "http://www.masterseries.co.uk/public/TempFiles/Concrete1.flv";
}
function playVideo() {
isPlaying = true;
trace("Play Video...");
_root.myvid_mc.ns.play(video);
_root.cover_mc.play_btn._visible = false;
}
Any help please?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您使用 FLVPlayer,您尝试过这样做吗?
If you're using FLVPlayer, have you tried doing this?
从我的头顶;如果您使用 FLVPlayback 或其任何派生类,则默认情况下它根本不应该循环。但是,您可能会收到抑制的运行时错误;可能存在一些安全沙箱违规,从而破坏了代码的正确执行。在任何情况下,您都可以尝试:
其中
player
是播放组件的名称。From the top of my head; if you are using the FLVPlayback or any of its derived classes, it should not loop at all by default. However, you might be getting a suppressed runtime error; possibly some security sandbox violation which disrupts the proper execution of the code. In any case you might try:
Where
player
is the name of your playback component.