It would be cool if you could start the initialization process  up at the top of the HTML file before other scripts had loaded...  But that would require bigger changes to your architecture to separate async camera stuff from UI stuff that has to come at the bottom of the file.

I'm wrestling with similar architectural issues with my mediadb code in gallery.... The db initialization code is tied up with the UI initialzation code which makes it difficult to start the db initialization sooner.