regebro / impress-console

Speaker notes for impress.js
MIT License
133 stars 28 forks source link

impressConsole.js still doesn't work if I don't initialize it. #5

Closed ridom closed 11 years ago

ridom commented 11 years ago

We are trying to use remote.io with impressConsole:

https://github.com/Remotes/Remotes

After around 1 minute, a QR code appear in the window, you scan it with a smartphone and you are able to manage the presentation with your smartphone. To go to the next step, you swipe-right on the screen of the phone. To go to the previous step, you swipe-left. To see the overview, you swipe-up. There is a redirection when you tap but it doesn't work yet.

Adding impressConsole.js, I would like to see the next step that is coming.

So each time I press P key I get this report bug in firebug:

TypeError: consoleWindow is null consoleWindow.document.open(); impressConsole.js (line 220)

When I swipe (on the smartphone and if impressConsole.js is available) I get this:

TypeError: console.log is not a function ...return function(){n=this,r=arguments;var f=function(){i=null,o&&e.apply(n,r),a()... remotes.ne.min.js (line 15)

If I swipe and impressConsole.js is commented, remote.js works well.

The link where you can see it:

www.brazilian-way.com/spacemapp/index7.html#/overview (reload it if the images are on one column)

reportbug

The bugs are respectively on the 2 last lines.

regebro commented 11 years ago

Can you include the code you are using to initialize this?

ridom commented 11 years ago

at the bottom of the html:

 <script src="js/impress.js"></script>
 <script src="js/impressConsole.js"></script>

 <script>
        $.ajax({
           type: "GET",
           url: "initImpress.js",
           dataType: "script"
         })
</script>
<script src="js/example.js"></script>
<script src="js/remotes.js"></script>

Inside initImpress.js:

 setTimeout(function() {
     impress().init();
     console().init(css="css/impressConsole.css");
     //console().open(); // If you want them to open automatically
 }, 3000);

As a JSON file is loaded higher in the code, the initialization is made with ajax to be sure that impress.js is loaded after the file is parsed.

Thank you for your time.

regebro commented 11 years ago

I asked you already in my first comment in issue #4 to use the documented, known to work method instead. The ajax call you do will load the file, but it will not execute it, with the result that neither impress.js nor impressConsole is not initialized.

This is an issue tracker, to keep track of issues with impressConsole.js. It's not a discussion forum of a support forum or a "please debug my jQuery code" forum. If there is a bug with impressConsole.js and Remote.io, then please make sure it is a bug, before you submit further issues. This includes actually following the documentation, and also trying to isolate the problem.

You could for example have removed remote.io from your file, and noticed that impress.js and impressConsole.js would still not have worked, and the you would have realized that the problem is not impressConsole.js or remote.io, but your code.

regebro commented 11 years ago

The last commits adds compatibility with Remotes.io.