Skip to content

Commit a080b28

Browse files
committed
feat(lsg): add all segments to extended playlist status
1 parent af14bcd commit a080b28

15 files changed

Lines changed: 569 additions & 269 deletions

File tree

packages/live-status-gateway-api/api/asyncapi.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,12 @@ components:
107107
description: Active Playlist status
108108
payload:
109109
$ref: './schemas/activePlaylist.yaml#/$defs/activePlaylist'
110+
extendedActivePlaylist:
111+
name: extendedActivePlaylist
112+
messageId: extendedActivePlaylistUpdate
113+
description: Extended Active Playlist status
114+
payload:
115+
$ref: './schemas/activePlaylist.yaml#/$defs/activePlaylist'
110116
activePieces:
111117
name: activePieces
112118
messageId: activePiecesUpdate

packages/live-status-gateway-api/api/schemas/root.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ $defs:
149149
enum:
150150
- studio
151151
- activePlaylist
152+
- extendedActivePlaylist
152153
- activePieces
153154
- segments
154155
- adLibs

packages/live-status-gateway-api/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "1.53.0-in-development",
44
"description": "Library for types & values shared by core, workers and gateways",
55
"main": "dist/index.js",
6+
"types": "dist/index.d.ts",
67
"typings": "dist/index.d.ts",
78
"license": "MIT",
89
"repository": {

packages/live-status-gateway-api/src/generated/schema.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ interface SubscriptionDetails {
5757
enum SubscriptionName {
5858
STUDIO = 'studio',
5959
ACTIVE_PLAYLIST = 'activePlaylist',
60+
EXTENDED_ACTIVE_PLAYLIST = 'extendedActivePlaylist',
6061
ACTIVE_PIECES = 'activePieces',
6162
SEGMENTS = 'segments',
6263
AD_LIBS = 'adLibs',
@@ -126,7 +127,7 @@ enum PlaylistActivationStatus {
126127
}
127128

128129
interface ActivePlaylistEvent {
129-
event: 'activePlaylist'
130+
event: 'activePlaylist' | 'extendedActivePlaylist'
130131
/**
131132
* Unique id of the active playlist
132133
*/
@@ -142,6 +143,7 @@ interface ActivePlaylistEvent {
142143
/**
143144
* The set of rundownIds in the active playlist, in order
144145
*/
146+
segments?: (Segment | null)[]
145147
rundownIds: string[]
146148
currentPart: CurrentPartStatus | null
147149
currentSegment: CurrentSegment | null

packages/live-status-gateway/src/liveStatusServer.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import { BucketsHandler } from './collections/bucketsHandler.js'
3030
import { BucketAdLibsHandler } from './collections/bucketAdLibsHandler.js'
3131
import { BucketAdLibActionsHandler } from './collections/bucketAdLibActionsHandler.js'
3232
import { BucketsTopic } from './topics/bucketsTopic.js'
33+
import { ExtendedActivePlaylistTopic } from './topics/extendedActivePlaylistTopic.js'
3334

3435
export interface CollectionHandlers {
3536
studioHandler: StudioHandler
@@ -117,13 +118,15 @@ export class LiveStatusServer {
117118
const studioTopic = new StudioTopic(this._logger, handlers)
118119
const activePiecesTopic = new ActivePiecesTopic(this._logger, handlers)
119120
const activePlaylistTopic = new ActivePlaylistTopic(this._logger, handlers)
121+
const extendedActivePlaylistTopic = new ExtendedActivePlaylistTopic(this._logger, handlers)
120122
const segmentsTopic = new SegmentsTopic(this._logger, handlers)
121123
const adLibsTopic = new AdLibsTopic(this._logger, handlers)
122124
const packageStatusTopic = new PackagesTopic(this._logger, handlers)
123125
const bucketsTopic = new BucketsTopic(this._logger, handlers)
124126

125127
rootChannel.addTopic(SubscriptionName.STUDIO, studioTopic)
126128
rootChannel.addTopic(SubscriptionName.ACTIVE_PLAYLIST, activePlaylistTopic)
129+
rootChannel.addTopic(SubscriptionName.EXTENDED_ACTIVE_PLAYLIST, extendedActivePlaylistTopic)
127130
rootChannel.addTopic(SubscriptionName.ACTIVE_PIECES, activePiecesTopic)
128131
rootChannel.addTopic(SubscriptionName.SEGMENTS, segmentsTopic)
129132
rootChannel.addTopic(SubscriptionName.AD_LIBS, adLibsTopic)

0 commit comments

Comments
 (0)