Implement broadcast message preview (#9762)

This commit is contained in:
Michael Weimann 2022-12-16 12:01:16 +01:00 committed by GitHub
parent 6205c70462
commit 51554399fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 353 additions and 32 deletions

View file

@ -19,8 +19,7 @@ limitations under the License.
* {@link https://github.com/vector-im/element-meta/discussions/632}
*/
import { RelationType } from "matrix-js-sdk/src/matrix";
export * from "./types";
export * from "./models/VoiceBroadcastPlayback";
export * from "./models/VoiceBroadcastPreRecording";
export * from "./models/VoiceBroadcastRecording";
@ -55,27 +54,5 @@ export * from "./utils/shouldDisplayAsVoiceBroadcastTile";
export * from "./utils/shouldDisplayAsVoiceBroadcastStoppedText";
export * from "./utils/startNewVoiceBroadcastRecording";
export * from "./utils/textForVoiceBroadcastStoppedEvent";
export * from "./utils/textForVoiceBroadcastStoppedEventWithoutLink";
export * from "./utils/VoiceBroadcastResumer";
export const VoiceBroadcastInfoEventType = "io.element.voice_broadcast_info";
export const VoiceBroadcastChunkEventType = "io.element.voice_broadcast_chunk";
export type VoiceBroadcastLiveness = "live" | "not-live" | "grey";
export enum VoiceBroadcastInfoState {
Started = "started",
Paused = "paused",
Resumed = "resumed",
Stopped = "stopped",
}
export interface VoiceBroadcastInfoEventContent {
device_id: string;
state: VoiceBroadcastInfoState;
chunk_length?: number;
last_chunk_sequence?: number;
["m.relates_to"]?: {
rel_type: RelationType;
event_id: string;
};
}