Something else to think about, moving the webkit media out of htmlbuilder and 
pulling it in.

So in htmlbuilder.py, consider putting three more placeholders in the large 
HTML string for media CSS, media JS and media HTML.
Now instead of having the media css/html/js in there, move this to the webkit 
mediaapi item.

Then get htmlbuilder to request the above code to put in place.

So pseudo code with made up variable names...

HTMLSRC = 
"<style>...%s...</style><script>...%s...</script><body>...%s...</body>" 

for plugin in self.parent.plugins:
   css += plugin.display_css()
   js += plugin.display_javascript()
   html += plugin.display_html()

html = HTMLSRC % (css, js, html)

The media plugin can then do similar, looping around the MediaAPI's to get the 
relevant code.

We could then use this framework later to move the Alert HTML into the alert 
plugin, and should milleja46 decide to create his Countdown plugin, he will 
have a way of producing the relevant div's he'll need too. 
-- 
https://code.launchpad.net/~crichter/openlp/media_rewrite/+merge/63638
Your team OpenLP Core is subscribed to branch lp:openlp.

_______________________________________________
Mailing list: https://launchpad.net/~openlp-core
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp

Reply via email to