grvydev / lightspeed-react Goto Github PK
View Code? Open in Web Editor NEWA simple react frontend for Project Lightspeed
License: MIT License
A simple react frontend for Project Lightspeed
License: MIT License
Hey there!
I am currently packaging all components of Lightspeed for Arch Linux (for the Arch User Repository).
Did pretty well so far with -ingest and -webrtc. Now I am facing the issue, that the wsUrl is hardcoded, and can't be set by the user when packaging.
It would be nice if this wsUrl is configurable after the build.
I think a simple JSON file somewhere would be sufficient as that can be loaded with a fetch
.
The Dockerfile in this repo currently grabs this git repo from github rather than using the local directory.
Instead, it should be using something like COPY . .
to copy the current directory (containing the Dockerfile, minus anything in .dockerignore
).
The main reason is to support development within docker much easier, as code can be changed locally with images immediately rebuilt.
This is also important, however, to be able to lock down to specific versions of the code. As is, if I cloned a repo at an older commit (e.g. for debugging), I would still end up building a container with the latest code.
I've set up Lightspeed on my server and got as far as streaming to ingest, but player on react app doesn't load the stream with the following log:
App.js:120 offer
App.js:135 candidate
App.js:102 Candidate fail
App.js:36 Socket is closed. Reconnect will be attempted in 0.5 second.
What could cause the problem?
Frontend isn't my specialty so I'm not sure if there's a reason this might not be feasible, but it might be useful for the actual video player component to be released separately as an NPM module.
This would allow people to embed the player in their own sites more easily.
All of the other containers spin up properly, but the react container returns the following :
/docker-entrypoint.sh: line 22: /docker-entrypoint.d/entrypoint.sh: not found
In public/index.html is the line
@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");
which appears in the resulting build/index.html as
@import url(https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap);
(the quotes are gone), which Chromium fails to parse correctly (semicolon terminates the css statement prematurely). No idea how to prevent this "optimization".
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.