Skip to content

Configuration Overview

All ContentLock settings live under the ContentLock key in appsettings.json. Most settings are reactively applied — changing them takes effect immediately without restarting the application (pushed to all clients via SignalR). Exceptions are noted below.


{
"ContentLock": {
"SignalRClientLogLevel": "Info",
"OnlineUsers": {
"Enable": true,
"Sounds": {
"Enable": true,
"LoginSound": "/App_Plugins/ContentLock/sounds/login.mp3",
"LogoutSound": "/App_Plugins/ContentLock/sounds/logout.mp3"
}
},
"WebRTC": {
"Enable": true,
"StunServers": [
"stun:stun.l.google.com:19302",
"stun:stun.cloudflare.com:3478"
],
"RingTimeoutSeconds": 20,
"Sounds": {
"RingSound": "/App_Plugins/ContentLock/sounds/ringtone.mp3",
"RingbackSound": "/App_Plugins/ContentLock/sounds/ringtone.mp3"
},
"TurnServer": {
"Provider": "None"
}
}
}
}

OptionTypeDefaultReactiveDescription
SignalRClientLogLevelstring"Info"❌ NoLog level for the SignalR JavaScript client. Valid values: Trace, Debug, Information, Warning, Error, Critical, None. Requires a page reload to take effect.

OptionTypeDefaultReactiveDescription
OnlineUsers.Enablebooltrue✅ YesShow/hide the online users header app and modal.
OnlineUsers.Sounds.Enablebooltrue✅ YesPlay audio when editors connect or disconnect.
OnlineUsers.Sounds.LoginSoundstring"/App_Plugins/ContentLock/sounds/login.mp3"✅ YesPath or URL to the login notification sound.
OnlineUsers.Sounds.LogoutSoundstring"/App_Plugins/ContentLock/sounds/logout.mp3"✅ YesPath or URL to the logout notification sound.

OptionTypeDefaultReactiveDescription
WebRTC.Enablebooltrue✅ YesShow/hide the Call button in the online users modal.
WebRTC.StunServersstring[]Google + Cloudflare STUN✅ YesList of STUN server URLs for ICE candidate gathering.
WebRTC.RingTimeoutSecondsint20✅ YesHow long to ring before treating the call as no answer. Range: 5–120.
WebRTC.Sounds.RingSoundstring"…/ringtone.mp3"✅ YesAudio played on the recipient’s device for an incoming call.
WebRTC.Sounds.RingbackSoundstring"…/ringtone.mp3"✅ YesAudio played on the caller’s device while waiting for an answer.
WebRTC.TurnServer.Providerstring"None"❌ NoTURN provider: None, Cloudflare, Twilio, or Metered. Requires restart to change.

OptionTypeDefaultReactiveDescription
TurnServer.Cloudflare.KeyIdstring""✅ YesTURN Key ID from the Cloudflare Realtime dashboard.
TurnServer.Cloudflare.ApiTokenstring""✅ YesAPI Token with TURN key permissions.
TurnServer.Cloudflare.Ttlint86400✅ YesCredential lifetime in seconds (max 86400 / 24 hours).

OptionTypeDefaultReactiveDescription
TurnServer.Twilio.AccountSidstring""✅ YesTwilio Account SID.
TurnServer.Twilio.AuthTokenstring""✅ YesTwilio Auth Token.
TurnServer.Twilio.Ttlint86400✅ YesToken lifetime in seconds.

OptionTypeDefaultReactiveDescription
TurnServer.Metered.AppNamestring""✅ YesYour Metered app subdomain (e.g. "myapp" for myapp.metered.live).
TurnServer.Metered.ApiKeystring""✅ YesAPI key from the Metered dashboard.
TurnServer.Metered.CacheTtlSecondsint82800✅ YesHow long to cache credentials (default 23 hours; Metered credentials are valid for 24 hours).

All options can also be set via environment variables using the standard .NET configuration provider format, replacing : with __:

ContentLock__OnlineUsers__Enable=false
ContentLock__WebRTC__TurnServer__Provider=Cloudflare
ContentLock__WebRTC__TurnServer__Cloudflare__KeyId=your-key-id
ContentLock__WebRTC__TurnServer__Cloudflare__ApiToken=your-api-token