fix: Use auto_unmute as input to stream selection for HA (#2562)
- Closes #2479
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import {
|
||||
MEDIA_ACTION_POSITIVE_CONDITIONS,
|
||||
type AutoUnmuteCondition,
|
||||
} from '../../config/schema/common/media-actions.js';
|
||||
|
||||
/**
|
||||
* Whether the configured auto-unmute policy will unmute a stream as it loads
|
||||
* (i.e. on selection or visibility), rather than only later in response to a
|
||||
* user action or call event. Used to decide whether to pre-select a camera's
|
||||
* audio-carrying stream up front instead of switching to it after the fact.
|
||||
*/
|
||||
export const isAudioIntendedOnLoad = (
|
||||
autoUnmute: readonly AutoUnmuteCondition[],
|
||||
): boolean =>
|
||||
MEDIA_ACTION_POSITIVE_CONDITIONS.some((condition) => autoUnmute.includes(condition));
|
||||
Reference in New Issue
Block a user