Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Webcam via Motion shows only iframe with 404 inside #110

Open
lichtteil opened this issue Nov 17, 2014 · 1 comment
Open

Webcam via Motion shows only iframe with 404 inside #110

lichtteil opened this issue Nov 17, 2014 · 1 comment

Comments

@lichtteil
Copy link
Contributor

I tried to set up a webcam using 'motion'. The settings are straight forward but on the home screen the content of the webcam stream iframe only shows a 404-error produced by heimcontrol.

The source of the iframe is /webcam/motion/some-id-of-webcam. Trying to open that also results in 404-error-page.

I found out that the error page is shown before the router shows the webcam-plugin's content. My solution was use another way to handle 404s. In https://github.com/ni-c/heimcontrol.js/blob/master/heimcontrol.js#L174 I replaced

app.get('plugin helper').getPluginList(function(err, plugins) {
        app.locals.plugins = plugins;
        app.set('plugins', plugins);

        // 404 Not found
        app.all('*', Routes.notFound);

      });

by

 app.get('plugin helper').getPluginList(function(err, plugins) {
        app.locals.plugins = plugins;
        app.set('plugins', plugins);
      });

      // 404 Not found
      app.use(Routes.notFound);

Can anyone confirm that issue and also the solution?
Cheers!

lichtteil added a commit to lichtteil/heimcontrol.js that referenced this issue Nov 17, 2014
Show 404 page since no other route was used. ni-c#110
@Gagnon06
Copy link

Thanks! Working now on Safari!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants