MCPcopy
hub / github.com/CapSoftware/Cap / getSource

Method getSource

packages/web-domain/src/Video.ts:51–71  ·  view source on GitHub ↗
(self: Video)

Source from the content-addressed store, hash-verified

49 static decodeSync = Schema.decodeSync(Video);
50
51 static getSource(self: Video) {
52 if (self.source.type === "MediaConvert")
53 return new M3U8Source({
54 videoId: self.id,
55 ownerId: self.ownerId,
56 subpath: "output/video_recording_000.m3u8",
57 });
58
59 if (self.source.type === "local")
60 return new M3U8Source({
61 videoId: self.id,
62 ownerId: self.ownerId,
63 subpath: "combined-source/stream.m3u8",
64 });
65
66 if (self.source.type === "desktopSegments")
67 return new SegmentsSource({ videoId: self.id, ownerId: self.ownerId });
68
69 if (self.source.type === "desktopMP4" || self.source.type === "webMP4")
70 return new Mp4Source({ videoId: self.id, ownerId: self.ownerId });
71 }
72}
73
74export const UploadPhase = Schema.Literal(

Callers 2

VideosClass · 0.80
route.tsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected