steveseguin / raspberry_ninja

Publish or capture VDO.Ninja streams with Python (Raspberry Pi, Linux, Mac, Windows WSL)
https://raspberry.ninja
149 stars 30 forks source link

Customized Stream Viewing URL in Self-Hosted website code scenerio #27

Closed stevenuecke7 closed 1 year ago

stevenuecke7 commented 1 year ago

I have tried a few different ways to accomplish this, but it appears that when streaming from a Nvidia Jetson device, we cannot set the stream viewing URL to our self-hosted server.

Is there a way around this to allow us to stream to our self-hosted server, instead of https://vdo.ninja? We are hosting on https://.github.io/ and need to self-host due to a CORS issue for an item we need to access in the iframe.

I would appreciate any assistance on this!

steveseguin commented 1 year ago

I'd need more information I think to help.

If hosting on github, I'm providing an example setup below that is also hosted on github, which seems to work fine for me:

python3 publish.py --test --streamid stevenuecke7 https://steveseguin.github.io/vdo.ninja/?password=false&view=stevenuecke7

Make sure that you are using HTTPS (SSL) and that if doing IFRAME resource sharing, the sub-domain might need to match the parent window as well.

stevenuecke7 commented 1 year ago

Thank you for that explanation. I am hosting on github.io for testing, and up until this post, I did not realize that the streamid is global, so I didn't even try viewing a particular streamid on my self-hosted instance. This is pretty cool.

Between this and the Theta Z1 flag issue you closed a couple days ago, I was able to map the equirectangular stream to the inside of a threejs sphere, so the viewer can now pan around the video! We have this stream coming from our robot platforms for remote navigation.

steveseguin commented 1 year ago

It is only global if not using a password, and both raspberry_ninja and the native mobile app don't yet have a password option.

If you ever want to show off your project to the community, you can drop a link / video in the Discord #expo channel for the community to see. (discord.vdo.ninja)