Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(authentication): fix hideConferenceTimer config #14555

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion react/features/app/actions.any.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export function maybeRedirectToTokenAuthUrl(
const state = getState();
const config = state['features/base/config'];
const { enabled: audioOnlyEnabled } = state['features/base/audio-only'];
const { startAudioOnly } = config;
const { hideConferenceTimer, startAudioOnly } = config;
const { locationURL = { href: '' } as URL } = state['features/base/connection'];
const audioMuted = isLocalTrackMuted(state['features/base/tracks'], MEDIA_TYPE.AUDIO);
const videoMuted = isLocalTrackMuted(state['features/base/tracks'], MEDIA_TYPE.VIDEO);
Expand All @@ -133,6 +133,7 @@ export function maybeRedirectToTokenAuthUrl(
{
audioMuted,
audioOnlyEnabled: audioOnlyEnabled || startAudioOnly,
hideConferenceTimer,
skipPrejoin: true,
videoMuted
},
Expand Down
3 changes: 2 additions & 1 deletion react/features/app/getRouteToRender.web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,15 @@ function _getWebConferenceRoute(state: IReduxState) {
&& !state['features/base/jwt'].jwt && room) {
const { locationURL = { href: '' } as URL } = state['features/base/connection'];
const { tenant } = parseURIString(locationURL.href) || {};
const { startAudioOnly } = config;
const { hideConferenceTimer, startAudioOnly } = config;

return getTokenAuthUrl(
config,
locationURL,
{
audioMuted: false,
audioOnlyEnabled: startAudioOnly,
hideConferenceTimer,
skipPrejoin: false,
videoMuted: false
},
Expand Down
9 changes: 9 additions & 0 deletions react/features/authentication/functions.any.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export const isTokenAuthEnabled = (config: IConfig): boolean =>
* @param {Object} options: - Config options {
* audioMuted: boolean | undefined
* audioOnlyEnabled: boolean | undefined,
* hideConferenceTimer: boolean | undefined,
* skipPrejoin: boolean | undefined,
* videoMuted: boolean | undefined
* }.
Expand All @@ -30,6 +31,7 @@ export const _getTokenAuthState = (
options: {
audioMuted: boolean | undefined;
audioOnlyEnabled: boolean | undefined;
hideConferenceTimer: boolean | undefined;
skipPrejoin: boolean | undefined;
videoMuted: boolean | undefined;
},
Expand All @@ -44,6 +46,7 @@ export const _getTokenAuthState = (
const {
audioMuted = false,
audioOnlyEnabled = false,
hideConferenceTimer = false,
skipPrejoin = false,
videoMuted = false
} = options;
Expand Down Expand Up @@ -72,6 +75,12 @@ export const _getTokenAuthState = (
state['config.startWithVideoMuted'] = true;
}

if (hideConferenceTimer) {

// @ts-ignore
state['config.hideConferenceTimer'] = true;
}

const params = new URLSearchParams(locationURL.hash);

for (const [ key, value ] of params) {
Expand Down
4 changes: 4 additions & 0 deletions react/features/authentication/functions.native.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export * from './functions.any';
* @param {Object} options: - Config options {
* audioMuted: boolean | undefined
* audioOnlyEnabled: boolean | undefined,
* hideConferenceTimer: boolean | undefined,
* skipPrejoin: boolean | undefined,
* videoMuted: boolean | undefined
* }.
Expand All @@ -34,6 +35,7 @@ export const getTokenAuthUrl = (
options: {
audioMuted: boolean | undefined;
audioOnlyEnabled: boolean | undefined;
hideConferenceTimer: boolean | undefined;
skipPrejoin: boolean | undefined;
videoMuted: boolean | undefined;
},
Expand All @@ -44,6 +46,7 @@ export const getTokenAuthUrl = (
const {
audioMuted = false,
audioOnlyEnabled = false,
hideConferenceTimer = false,
skipPrejoin = false,
videoMuted = false
} = options;
Expand All @@ -60,6 +63,7 @@ export const getTokenAuthUrl = (
{
audioMuted,
audioOnlyEnabled,
hideConferenceTimer,
skipPrejoin,
videoMuted
},
Expand Down
4 changes: 4 additions & 0 deletions react/features/authentication/functions.web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ function _cryptoRandom() {
* @param {Object} options: - Config options {
* audioMuted: boolean | undefined
* audioOnlyEnabled: boolean | undefined,
* hideConferenceTimer: boolean | undefined,
* skipPrejoin: boolean | undefined,
* videoMuted: boolean | undefined
* }.
Expand All @@ -52,6 +53,7 @@ export const getTokenAuthUrl = (
options: {
audioMuted: boolean | undefined;
audioOnlyEnabled: boolean | undefined;
hideConferenceTimer: boolean | undefined;
skipPrejoin: boolean | undefined;
videoMuted: boolean | undefined;
},
Expand All @@ -62,6 +64,7 @@ export const getTokenAuthUrl = (
const {
audioMuted = false,
audioOnlyEnabled = false,
hideConferenceTimer = false,
skipPrejoin = false,
videoMuted = false
} = options;
Expand All @@ -78,6 +81,7 @@ export const getTokenAuthUrl = (
{
audioMuted,
audioOnlyEnabled,
hideConferenceTimer,
skipPrejoin,
videoMuted
},
Expand Down
2 changes: 2 additions & 0 deletions react/features/authentication/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ function _isWaitingForOwner({ getState }: IStore) {
function _handleLogin({ dispatch, getState }: IStore) {
const state = getState();
const config = state['features/base/config'];
const { hideConferenceTimer } = config;
const room = state['features/base/conference'].room;
const { locationURL = { href: '' } as URL } = state['features/base/connection'];
const { tenant } = parseURIString(locationURL.href) || {};
Expand All @@ -281,6 +282,7 @@ function _handleLogin({ dispatch, getState }: IStore) {
{
audioMuted,
audioOnlyEnabled,
hideConferenceTimer,
skipPrejoin: true,
videoMuted
},
Expand Down
Loading