Skip to content
Snippets Groups Projects
Commit 0ebadbc5 authored by Falk Rehse's avatar Falk Rehse
Browse files

Add authentication to player

parent 5b44598b
No related branches found
No related tags found
No related merge requests found
Pipeline #115638 passed
......@@ -6,14 +6,14 @@ tobool={ ["true"]=true, ["false"]=false }
local paused = false
if #args == 0 or #args > 2 then
error("audio-receiver <websocket_url> [headless]")
if #args < 2 or #args > 3 then
error("audio-receiver <websocket_url> <authentication_token> [headless]")
end -- if
local headless = true
if #args == 2 then
headless = tobool[args[2]]
if #args == 3 then
headless = tobool[args[3]]
end -- if
function eprint(message)
......@@ -75,6 +75,8 @@ local function handle_websocket_audio()
return
end -- if
websocket.send(args[2])
eprint("Connected to websocket server!")
while true do
......
......@@ -20,7 +20,7 @@ use song::Song;
fn main() {
let playlist = Mutable::new(Vec::<Song>::new());
println!("starting");
println!("Starting!");
let playlist_1 = Mutable::clone(&playlist);
spawn(move || {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment