Giter Club home page Giter Club logo

Comments (12)

WayneKeenan avatar WayneKeenan commented on May 29, 2024

have a look at the startup messages...

Initializing websockets server on port 8084
Initializing HTTP server on port 8082

from pistreaming.

adrianobarroso avatar adrianobarroso commented on May 29, 2024

Ok, should I enable the port 8084 as well?

I did that and still is not showing the image, only the "loading...".

Could you please be more specific?

from pistreaming.

WayneKeenan avatar WayneKeenan commented on May 29, 2024

more specific, but you asked for "any clue" :)

Which os/browser (& versions) are you using for the client when on your wifi/lan and when accessing via the internet ?

from pistreaming.

adrianobarroso avatar adrianobarroso commented on May 29, 2024

Sorry is because I'm kinda of newbie in this world. :)

In my Pi is Raspbian:

~ $ cat /etc/os-release
NAME="Raspbian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"

Browsers: In my local connection it works perfectly. However, when I try to watch the streaming from the web outside my local connection it doesnt work, it shows the site and the loading without showing the video.

I enabled port forwarding in my router for ports 8082 and 8084, but it dont work.

I think it might be something related to port forwarding with my router.

from pistreaming.

WayneKeenan avatar WayneKeenan commented on May 29, 2024

Can you confirm you use exactly the same setup (OS & browser combination) when on your Wifi and also when trying to access from outside your home network via the internet?

Your router rules should allow TCP (as opposed to UDP) traffic in both directions.

Open your browsers JavaScript console and paste here any errors you see.

from pistreaming.

adrianobarroso avatar adrianobarroso commented on May 29, 2024

MacOS X El Capitan
Browser Chrome

Both when on my Wifi and outside.

My router is configured allowing TCP for both directions.

And on my browser I dont see any console error. :/

from pistreaming.

WayneKeenan avatar WayneKeenan commented on May 29, 2024

ok, it's not your router.

The server is serving up a local ip to your client connecting via the internet... I have a fix.

from pistreaming.

WayneKeenan avatar WayneKeenan commented on May 29, 2024

Have a look at this.

Basically change the part of the line (51) in server.py that looks like this:

self.request.getsockname()[0]

with this:

"' + window.location.hostname +'"

from pistreaming.

adrianobarroso avatar adrianobarroso commented on May 29, 2024

Hey @WayneKeenan , I will try right now, but makes total sense. Looking the network requests on chrome browser it shows the Pi local IP address not my network address.

from pistreaming.

adrianobarroso avatar adrianobarroso commented on May 29, 2024

Its working!!!!! Thanks @WayneKeenan for the quick and awesome help!!!

Would you merge this fix into master?

from pistreaming.

WayneKeenan avatar WayneKeenan commented on May 29, 2024

I'm not able todo that, ping @waveform80

from pistreaming.

waveform80 avatar waveform80 commented on May 29, 2024

Ahh, this actually came up in #15 but there I just suggested hard-coding the link to the websocket. You can probably tell I'm not a regular web-developer as I wasn't aware window.location was no longer a simple string! That's a very nice trick and I'll certainly add it in :)

from pistreaming.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.