加载 jPlayer 的多个实例时出现问题
我有一个脚本,可以自动生成创建 jplayer 视频播放器的多个实例所需的 HTML,并在创建后实例化它们。但是,如果同时有大约 9 个实例,ajax 处理程序似乎会锁定,并且不会再处理任何对任何内容的 ajax 调用,甚至在此之后也不会处理本地 html 文件。我通过创建一个实例化 jplayer 的自定义事件处理程序来修复该问题,该处理程序仅在这些玩家可见时调用。但是一次可以处理的 jplayer 实例的数量是否存在一些固有的限制?或者其他地方有问题吗?
我想强调的是,玩家现在正在使用延迟加载方案,并且大多数之前都在工作,但所有后续的 ajax 通信都失败了,直到我延迟加载 $().jplayer() 调用。
I have a script that is auto-generating the HTML necessary to create multiple instances of jplayer video players and instantiating them after creating. But with about 9 instances at once, the ajax handler seems to lock up and won't process any more ajax calls to anything, not even local html files after this. I've remediated the problem by creating a custom event handler that instantiates the jplayers, that is only called when those players are visible. But is there some inherent limitation to the number of jplayer instances that can be processed at once? Or is there a problem somewhere else?
I want to stress that the players are working with the lazy loading scheme now, and most were working before, but all subsequent ajax communication failed until I lazy loaded the $().jplayer() calls.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这与 jPlayer 本身无关,但 jPlayer 执行的环境可能有限制。例如,Mobile Safari 和 Android 一次只允许一个 jPlayer 实例。
it's nothing to do with jPlayer itself but the environment jPlayer executes in might have restrictions.. For example, Mobile Safari and Android will only permit one jPlayer instance at a time..