@portalshq/capability-video-delivery 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -0
- package/package.json +13 -0
- package/src/index.ts +2 -0
- package/src/live-session.ts +20 -0
- package/src/vod-session.ts +11 -0
package/README.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# @portalshq/capability-video-delivery
|
|
2
|
+
|
|
3
|
+
Live + VOD behind one interface so branching-film, game-show, and any
|
|
4
|
+
future video-bearing channel type share the same delivery capability
|
|
5
|
+
instead of each integrating their own transcoding/CDN stack. Edge target
|
|
6
|
+
is Akamai (see infra/terraform/akamai-cdn) — chosen for video-egress cost,
|
|
7
|
+
which the platform economics review flags as the dominant linear cost
|
|
8
|
+
driver at audience scale.
|
package/package.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@portalshq/capability-video-delivery",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "git+https://github.com/portalshq/portals-cloud"
|
|
7
|
+
},
|
|
8
|
+
"description": "Live and VOD session delivery, abstracted behind one interface. Edge delivery target: Akamai CDN.",
|
|
9
|
+
"main": "src/index.ts",
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"@portalshq/contracts": "*"
|
|
12
|
+
}
|
|
13
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Live broadcast delivery. Origin -> Akamai edge -> audience. This package
|
|
3
|
+
* intentionally exposes only session lifecycle + manifest URL — codec,
|
|
4
|
+
* bitrate ladder, and origin packaging are implementation details that can
|
|
5
|
+
* change without breaking any channel that consumes this capability.
|
|
6
|
+
*/
|
|
7
|
+
export interface LiveSessionHandle {
|
|
8
|
+
sessionId: string;
|
|
9
|
+
ingestUrl: string; // where the broadcaster pushes
|
|
10
|
+
playbackManifestUrl: string; // HLS/LL-HLS manifest served from Akamai edge
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export class LiveDelivery {
|
|
14
|
+
async start(sessionId: string): Promise<LiveSessionHandle> {
|
|
15
|
+
throw new Error("LiveDelivery.start: not yet wired to origin/Akamai config");
|
|
16
|
+
}
|
|
17
|
+
async stop(sessionId: string): Promise<void> {
|
|
18
|
+
throw new Error("LiveDelivery.stop: not yet implemented");
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface VodAsset {
|
|
2
|
+
assetId: string;
|
|
3
|
+
playbackManifestUrl: string;
|
|
4
|
+
durationSeconds: number;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export class VodDelivery {
|
|
8
|
+
async getAsset(assetId: string): Promise<VodAsset> {
|
|
9
|
+
throw new Error("VodDelivery.getAsset: not yet wired to object storage / Akamai edge");
|
|
10
|
+
}
|
|
11
|
+
}
|