On Tuesday, July 2, 2013 at 11:33 AM, Tim Chien wrote:
> The |splashHTML| approach suggested by :roc is written here:
> https://groups.google.com/d/msg/mozilla.dev.gaia/BFRPwibL64E/XWiYss120CIJ
> Sorry for not put up the link earlier.
>
> Basically the splash.html will get loaded on install time, with
> screenshot taken, and never being loaded again until the next app
> update.
>
> Please re-estimate your preference based on the idea here. Thanks.
>
FWIW, this could be ok for packaged apps - and HTML is well suited to the task
(specially if, as you suggested, we disable script and network communication
initially and see if that works). I think the following use cases need to be
supported (just thinking out loud, to make sure a sufficient set of user
stories are covered):
1. Allow choice in format (even if we only initially support HTML) - "I want my
splash screen to be responsive, and HTML gives me that", "I want my logo to
stretch in the available space without jaggies, and SVG gives me that" (SVG can
be embedded in HTML), "my splash screen must be pixel perfect, and only an
image gives me that" (this last one can be done with <meta viewport
width=device-width>)… but it might be ok just to allow an image that is
centered.
2. Allow the developer to specify a min duration. "My splash screen needs to be
shown for at least half a second", "my splash screen can be shown as soon as my
app is ready."*
3. Allow orientation to be controlled. "My game only works in landscape mode,
so I want the user to rotate their phone to the right orientation when the apps
starts". This is already supported by "orientation" member of the manifest -
but must be respected by the splash screen, of course.
4. (optional) control the transition between splash screen and app. "I want the
slash screen to fade in, then slowly fade out to reveal my app… I want the
splash screen to slide out to the bottom, to reveal the UI of my app".
If we consider the first three, I would recommend changing the proposal to:
splash: {"src": "path/to/file", "duration": "milliseconds"}
When duration is missing, 0, or in error, use either "first paint" or
DOMContentLoaded as the trigger to hide the splash screen. When duration is
present and valid, wait at least milliseconds before revealing the start page.
For 4, if there is a lot of demand, we could later add "transition" and some
properties to control that (hopefully without replicating half of CSS
transitions :)).
_______________________________________________
dev-webapps mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-webapps