使用require js 模块化代码时,其中播放器用的是jwplayer7.x 然后载入jwplayer.js后总是报license无效(license已经加入),最后在jwplayer官网论坛里找到问题:The reason seems to be that the flash ...
使用require js 模块化代码时,其中播放器用的是jwplayer7.x 然后载入jwplayer.js后总是报license无效(license已经加入),最后在jwplayer官网论坛里找到问题:
The reason seems to be that the flash player needs access to window.jwplayer
. window.jwplayer
is not set when using AMD (or CommonJS), therefore the flash player doesn't work.
While waiting for a fix, a workaround is to simply set window.jwplayer
in the app's code:
define(['jwplayer'], function (jwplayer) { window.jwplayer = jwplayer; ...})
原标题:Support for AMD usage of jwplayer (require js)
关键词:JS
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:
admin#shaoqun.com
(#换成@)。