You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The PJS library must be loaded at runtime, and not compiled in to your project,
since the user agent and context are used to determine the appropriate build (e.g. mobile doesn't get flash).
Loading
The PJS library is loaded just like any other javascript file.
If you include it in the head, it is considered "blocking" and will be loaded before your page. You can put it in the footer to avoid this.
You can use a callback to know when the PJS library has loaded, this way your script
include can be anywhere.
The callback approach can be used like this:
_pjsReady
var_pjsReady=_pjsReady||[];// you must use push!_pjsReady.push(function(){// fires when the api has loaded,// or if the api is already loaded it will fire immediately.// now I can create players.varplayer=newPJS.Player(element);});