element-desktop/src/displayMediaCallback.ts

21 lines
559 B
TypeScript
Raw Normal View History

/*
2024-09-06 17:56:18 +01:00
Copyright 2023, 2024 New Vector Ltd.
2024-09-06 17:56:18 +01:00
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
Please see LICENSE files in the repository root for full details.
*/
import { Streams } from "electron";
type DisplayMediaCallback = (streams: Streams) => void;
let displayMediaCallback: DisplayMediaCallback | null;
export const getDisplayMediaCallback = (): DisplayMediaCallback | null => {
return displayMediaCallback;
};
export const setDisplayMediaCallback = (callback: DisplayMediaCallback | null): void => {
displayMediaCallback = callback;
};