Skip to content

installers.infra.livekit #

livekit

To get started




import freeflowuniverse.crystallib.installers.something. livekit

mut installer:= livekit.get()!

installer.start()!

livekit once installed will have generated the secret keys

Constants #

const version = '1.7.2'

fn get #

fn get(args_ ArgsGet) !&LivekitServer

fn heroscript_default #

fn heroscript_default() !string

Todo: THIS IS EXAMPLE CODE AND NEEDS TO BE CHANGED IN LINE TO STRUCT BELOW, IS STRUCTURED AS HEROSCRIPT

fn play #

fn play(args_ PlayArgs) !

fn switch #

fn switch(name string)

switch instance to be used for livekit

struct ArgsGet #

@[params]
struct ArgsGet {
pub mut:
	name string
}

///////FACTORY

struct InstallArgs #

@[params]
struct InstallArgs {
pub mut:
	reset bool
}

struct LivekitServer #

struct LivekitServer {
pub mut:
	name       string = 'default'
	apikey     string
	apisecret  string @[secret]
	configpath string
	nr         int = 0 // each specific instance onto this server needs to have a unique nr
}

THIS THE THE SOURCE OF THE INFORMATION OF THIS FILE, HERE WE HAVE THE CONFIG OBJECT CONFIGURED AND MODELLED

fn (LivekitServer) destroy #

fn (mut self LivekitServer) destroy() !

fn (LivekitServer) install #

fn (mut self LivekitServer) install(args InstallArgs) !

fn (LivekitServer) install_start #

fn (mut self LivekitServer) install_start(args InstallArgs) !

fn (LivekitServer) reload #

fn (mut self LivekitServer) reload() !

load from disk and make sure is properly intialized

fn (LivekitServer) restart #

fn (mut self LivekitServer) restart() !

fn (LivekitServer) running #

fn (mut self LivekitServer) running() !bool

fn (LivekitServer) start #

fn (mut self LivekitServer) start() !

fn (LivekitServer) stop #

fn (mut self LivekitServer) stop() !

struct PlayArgs #

@[params]
struct PlayArgs {
pub mut:
	heroscript string // if filled in then plbook will be made out of it
	plbook     ?playbook.PlayBook
	reset      bool
}