Add media controls (#229)

This commit is contained in:
Matt Hensman
2022-08-24 02:17:35 +01:00
committed by GitHub
parent cbc039a355
commit ac46802431
37 changed files with 1694 additions and 432 deletions

View File

@@ -19,7 +19,8 @@ import {
MediaStatus,
ReceiverMediaMessage,
SenderMediaMessage,
SenderMessage
SenderMessage,
_MediaCommand
} from "./types";
import { SessionStatus } from "./enums";
@@ -29,16 +30,6 @@ import { MediaCommand } from "./media/enums";
import { LoadRequest, QueueLoadRequest, QueueItem } from "./media/classes";
import Media, { NS_MEDIA } from "./media/Media";
/** supportedMediaCommands bitflag returned in MEDIA_STATUS messages */
enum _MediaCommand {
PAUSE = 1,
SEEK = 2,
STREAM_VOLUME = 4,
STREAM_MUTE = 8,
QUEUE_NEXT = 64,
QUEUE_PREV = 128
}
/**
* Takes a media object and a media status object and merges the status
* with the existing media object, updating it with new properties.