更新:
似乎每个人都没有彻底阅读我的问题,所有答案都建议我预加载或使用外部资产.所以任何愿意回答的人,请在这篇文章中注意大胆的问题.谢谢!
我正在开发一个只有一个SWF文件的简单Flash应用程序.我希望SWF电影尽快开始播放,所以我没有为它构建预加载器.如果我的动作脚本代码引用了尚未加载的资源,会发生什么?
例如,当电影刚加载1
到帧20
时,代码会导致播放头从一帧跳到另一帧10
.在那种情况下,flash播放器会吗?
11
到20
(不执行脚本),跳转到帧20
并在加载时调用该帧的脚本?11
来19
,负载框架20
,跳转到框架20
,并在此框架调用脚本?20
,在转到帧20
语句后继续执行下一个语句?如果flash player没有忽略跳转到帧20
,那么event
当帧20
完全加载时会触发任何一个吗?
注意:第一个问题的答案应该集中在我的例子上,涵盖所有情况(例如从库中附加电影......)更好,但不是必需的.
谢谢!
我正在为ipad上的视频标签编写一个jQuery插件.我的插件所做的一件事就是恢复播放你上次放弃观看它的电影.我在设置当前时间时遇到问题.我发现只能在" stalled
"事件触发后设置它.在电影开始播放后,这种停滞似乎会在ipad上发生(这是一个HTTP直播视频).我没有在其他环境中看到此事件,即PC上的谷歌浏览器.所以这段代码有效,但我觉得使用这个stalled
事件很不舒服.我已经尝试了canplaythrough
,playing
其他人在这些情况下我的更新currentTime
被忽略了.有没有其他人有这方面的经验?
var theClass = this;
$(this.videoElement).bind("pause play stalled error abort progress waiting playing webkitfullscreenchange canplaythrough", null, function (e) {
///<summary>bind to the various events we are interested in during playback. event state changes will be saved to
///local storage. If we detect the media has finished playing we will exit fullscreen and trigger our mediaDone event</summary>
if (e.type == "stalled" && theClass.resumeTriggered) {
theClass.resumeTriggered = false;
theClass.resumeTime = theClass.resumeTime + …
Run Code Online (Sandbox Code Playgroud) actionscript ×1
flash ×1
html5 ×1
ipad ×1
javascript ×1
jquery ×1
lazy-loading ×1
load ×1
video ×1