зеркало из https://github.com/nextcloud/spreed.git
Publish the signaling mode as initial state
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Родитель
39ad6a9fab
Коммит
54791de3b3
|
@ -30,6 +30,9 @@ use OCP\Security\ISecureRandom;
|
||||||
|
|
||||||
class Config {
|
class Config {
|
||||||
|
|
||||||
|
public const SIGNALING_INTERNAL = 'internal';
|
||||||
|
public const SIGNALING_EXTERNAL = 'external';
|
||||||
|
|
||||||
/** @var IConfig */
|
/** @var IConfig */
|
||||||
protected $config;
|
protected $config;
|
||||||
/** @var ITimeFactory */
|
/** @var ITimeFactory */
|
||||||
|
@ -274,6 +277,13 @@ class Config {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getSignalingMode(): string {
|
||||||
|
if (empty($this->getSignalingServers())) {
|
||||||
|
return self::SIGNALING_INTERNAL;
|
||||||
|
}
|
||||||
|
return self::SIGNALING_EXTERNAL;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns list of signaling servers. Each entry contains the URL of the
|
* Returns list of signaling servers. Each entry contains the URL of the
|
||||||
* server and a flag whether the certificate should be verified.
|
* server and a flag whether the certificate should be verified.
|
||||||
|
|
|
@ -49,6 +49,11 @@ trait TInitialState {
|
||||||
'talk', 'prefer_h264',
|
'talk', 'prefer_h264',
|
||||||
$this->serverConfig->getAppValue('spreed', 'prefer_h264', 'no') === 'yes'
|
$this->serverConfig->getAppValue('spreed', 'prefer_h264', 'no') === 'yes'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$this->initialStateService->provideInitialState(
|
||||||
|
'talk', 'signaling_mode',
|
||||||
|
$this->talkConfig->getSignalingMode()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function publishInitialStateForUser(IUser $user, IRootFolder $rootFolder, IAppManager $appManager): void {
|
protected function publishInitialStateForUser(IUser $user, IRootFolder $rootFolder, IAppManager $appManager): void {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче