Last modified: 2014-11-17 09:21:14 UTC
JavaScript configuration variables that are added via ResourceLoaderGetConfigVars are inserted into the start-up module, which is on the critical path to loading page content. MwEmbedSupport uses this interface to inject the contents of two configuration files, MediaWikiSupport.config.php & MwEmbedSupport.config.php, which contain largely static configuration data that is MwEmbedSupport-specific, the loading of which could be limited to pages containing timed media, and deferred until DOMContentLoaded or later. If the configuration variables truly are static, they can be hard-coded in a JavaScript file and included in the scripts array of the the MwEmbedSupport ResourceLoader module. If it is important for these values to be configurable via PHP, a custom ResourceLoader module class should be written. For an example of this technique, refer to includes/ResourceLoaderULSJsonMessageModule.php in the UniversalLanguageSelector extension.
Makese sense. We should include this in player v2 inclusion / refactor efforts.