datarhei / restreamer-ui

The user interface of the Restreamer for the connection to the Core application.
https://datarhei.com
Apache License 2.0
46 stars 38 forks source link

improvement to get json playerConfig #18

Open utilsites opened 1 year ago

utilsites commented 1 year ago

Restreamer has a url to get player configs: https://[restreamer-domain]/channels/[GUID]/config.js

this returns the following script file (example): var playerConfig = {"autoplay":false,"mute":true, ... }}

I think it would be better to just return the json part, without "var playerConfig = ", that way it would be much more interoperable, without needing to instantiate script to get a var name, that is more hardcoded.

ioppermann commented 1 year ago

This is not meant to be an API to get the config for the player from. It's a file as part of the page where the player is loaded.

utilsites commented 1 year ago

Right, but if I want to use a different video webplayer than videojs or add some player plugins without changing Restreamer code, this would be very useful. Thanks for your comment.