← Back to team overview

openlp-core team mailing list archive

Re: [Merge] lp:~crichter/openlp/media_rewrite into lp:openlp

 

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.


References