signal-desktop/ts/util/lottieNoopAudioFactory.ts
Evan Hahn 5ce26eb91a
Speaking indicator for group calls
Co-authored-by: Peter Thatcher <peter@signal.org>
Co-authored-by: Jim Gustafson <jim@signal.org>
Co-authored-by: Josh Perez <60019601+josh-signal@users.noreply.github.com>
2022-02-08 12:30:33 -06:00

18 lines
508 B
TypeScript

// Copyright 2022 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { noop } from 'lodash';
import type { AnimationConfig } from '@evanhahn/lottie-web-light';
type LottieAudioFactory = NonNullable<AnimationConfig['audioFactory']>;
type LottieAudio = ReturnType<LottieAudioFactory>;
const lottieNoopAudio: LottieAudio = {
play: noop,
seek: noop,
playing: noop,
rate: noop,
setVolume: noop,
};
export const lottieNoopAudioFactory: LottieAudioFactory = () => lottieNoopAudio;