litrik / displayer

An open source multi-platform app for digital signage
Apache License 2.0
49 stars 10 forks source link

How could I access via the internet instead of the local network? #26

Open rodriguesfas opened 3 months ago

rodriguesfas commented 3 months ago

I need to access remotely via the internet to change the media. How could I access via the internet instead of the local network?

hapishyguy commented 3 months ago

I had the same issue. It ia not built to control/update remotely..

litrik commented 3 months ago

@hapishyguy is correct. You typically configure Displayer to go and retrieve content from the internet. You do not push content from the internet to Displayer.

For example: In our sports club there's a Displayer set up to load a remote display file (JSON) from a Github repository. Whenever I want to update the content, I push an update to the JSON file in the github repo and Displayer will pick it up within a couple of minutes and start playing the new content.

Of course you could also enable port-forwarding on your router to allow remote access to the device running Displayer but I would strongly discourage that.

litrik commented 3 months ago

If you're interested... here is the displayer file we use at our sports club: https://github.com/kcbj/kcbj-displayer/blob/main/kantine.json

rodriguesfas commented 3 months ago

Got it, thanks for getting back to me.

rodriguesfas commented 3 months ago

I don't understand much about kotlin. I would like to know if in this part of the code:

val displayUrl: String? =null,

I could add a url base when the app starts, it displays a modal requesting a code, When entering the code 0111.json it completes the url and loads the json data.

It's a way to add a dynamic url to the schedules without having to use the adb commands.

litrik commented 3 months ago

That sounds like a very specific use case. It is technically possible but would still require other (big) changes implement the UI that requests the code. I'm not sure that this is the best approach in general.

There are 2 separate requests: