Max, Tucker,

I learned a bit more about the passing of canvas attributes into the XSLT files during the compile process. Here's what I've found, and I've already taken care of the LFC changes necessary - I'm just looking at the changes to the Java classes and templates and how things work:

For the @fullscreen canvas attribute I
1) add a default value (private static final boolean DEFAULT_FULLSCREEN = false;) to Canvas.java
  2) add an mFullscreen instance variable to Canvas.java
  3) add a setFullscreen() and isFullscreen() method to Canvas.java
4) add handling of attribute value to CanvasCompiler.initializeFromElement(), e.g. String fullscreen = elt.getAttributeValue("fullscreen"); 5) understood ResponderHTML.java's writeCanvas() method takes care of writing out the embedding code 6) found out that within TranformUtils.java within method applyTransform(String, Properties, String, OutputStream) the XSLT is chosen based on the lzt query arg setting, e.g. app-console.xslt for no lzt value, html-response.xslt for ltz=html. By modifying the the lz.embed.swf JS line and adding
..', allowFullScreen: '<xsl:value-of select="/canvas/@fullscreen"/>',

I can pass the canvas attribute value into the HTML source code by that, and I've made all the modifications to embednew.js and flash.js to control the allowFullScreen value through the canvas @fullscreen attribute. :-)

Do you have any comment on this approach, do you see any problems with that?

Thanks,
Raju



On Jun 12, 2009, at 2:55 PM, Raju Bitter wrote:

Thanks, Max. It's working for SW9 now, I just needed a place to put the display state in a way that's easily accessible. Right now I chose to add a @displaystate attribute to canvas with the values of "fullScreen" and "normal" (take out of canvas.sprite.stage.displayState)? What do you think?

I don't know what the impact would be of making every SWF run with allowFullScreen="true", but I've there have been some problems with fullscreen mode:
* iFrames are hidden when you go in fullscreen: 
http://drumbeatinsight.com/examples/htmlcomponent/fullscreen/HTMLFullScreenOpaque.html
* Safari had a bug for some time with receiving mouse clicks and keyboard input, don't know what the status of that is.

I'll send out a first version of the fix for SWF9 only for review to you today. I stilll haven't figured out how the Flash properties are passed into the embed script, though.

- Raju


On Jun 11, 2009, at 9:07 PM, Max Carlson wrote:



Raju Bitter wrote:
Max, Henry,
I'm back at working on http://jira.openlaszlo.org/jira/browse/LPP-8107
I have a few qestions:
1) What kind of code do you put into LzScreenKernel, compared to LaszloCanvas? Would be better to have the code to go into fullscreen mode in LzScreenKernel? Max already suggested that, so that will be my approach for now.

LzScreenKernel seems like the right place to put the actual implementation. I'd also suggest adding a capability to LzSprite so folks can check to see if a given runtime supports fullscreen. That way you can avoid writing stub methods for DHTML, and optionally add a warning. See LaszloView.lzs#$lzc$set_rotation() for an example of this.

2) Where's the connection between canvas attributes and the templates used for HTML generation. I'll look into that, but some input would be valuable.
I'm documenting my approach here: 
http://wiki.openlaszlo.org/SWF_Runtime_Fullscreen_Support#Ongoing_work

You need to set the allowFullScreen object/embed attribute. The place to do this is lps/includes/source/ embednew.js#lz.embed.swf(). It looks like you already have a line on how to pass the canvas attribute into the generated html, but you may be able to get away with defaulting allowFullScreen to true and not have to bother with this...

--
Regards,
Max Carlson
OpenLaszlo.org


Reply via email to