当浏览文件对话框打开的时间比配置的 session 超时时间长时,我们遇到的问题是与 Flex 客户端关联的服务器 session 超时。似乎在某些播放器上,在 FileReference 上执行浏览或下载时播放会停止。这也会导致远程调用被阻止,因此我们的手动保持事件消息不会发送到服务器,从而导致 session 超时。
我在文档中搜索了一些关于此的信息并找到了它的通知,但它没有明确列出它确实(不)工作的玩家。有人知道我能找到完整的 list 吗?
PS:这里是提到这种行为的链接:
While calls to the FileReference.browse(), FileReferenceList.browse(), or FileReference.download() method are executing, most players will continue SWF file playback.
While calls to the FileReference.browse(), FileReferenceList.browse(), or FileReference.download() methods are executing, SWF file playback pauses in stand-alone and external versions of Flash Player and in AIR for Linux and Mac OS X 10.1 and earlier
任何人都知道“外部 Flash Player”是什么意思?
PPS:我们在 Firefox 的 Linux(10.0.x 和 10.1.x)上进行了测试,它似乎停止播放,在 IE 的 Windows(10.0.x)上似乎继续播放。
最佳答案
不幸的是,您无能为力,这是一个阻塞调用,并且 Player 在可能的情况下跨 AVM 的多个实例共享资源(包括线程),以使用更少的内存。 Chrome、Webkit 2 和 FF4(3.7?)应该没问题,因为它们将插件隔离在单独的进程空间中,而 Player 没有机会这样做。不幸的是,因为它是阻塞的,如果您花时间选择文件,Chrome 会弹出一个对话框,提示“脚本执行时间太长”:(
github.com/Adobe/FlashPlayer 肯定会很好,不是吗? :-)
关于apache-flex - FileReference.browse() 在某些 Flash Player 上停止播放,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2943641/