/* * THIS FILE WAS GENERATED BY "@atproto/lex". DO NOT EDIT. */ import { l } from "@atproto/lex"; import * as MediaDefs from "./defs.defs.js"; import * as RepoStrongRef from "../../../com/atproto/repo/strongRef.defs.js"; import * as StreamSegment from "../segment.defs.js"; import * as ActorDefs from "../../../app/bsky/actor/defs.defs.js"; const $nsid = "place.stream.media.track"; export { $nsid }; /** A track for a video stream, either part of the source or a custom additional track. One of: video, audio, subtitles. */ type Main = { $type: "place.stream.media.track";"track":l.$Typed | l.Unknown$TypedObject; /** * If this is a derived track like a transcode or a transcript, what was the source place.stream.video? */ "video"?:l.AtUriString; /** * If this is a derived track like a transcode or a transcript, what was the parent track? */ "parentTrack"?:RepoStrongRef.Main;"metadata"?:l.$Typed | l.Unknown$TypedObject }; export type { Main }; /** A track for a video stream, either part of the source or a custom additional track. One of: video, audio, subtitles. */ const main = /*#__PURE__*/ l.record<"tid", Main>("tid", $nsid, /*#__PURE__*/ l.object({"track":/*#__PURE__*/ l.typedUnion([/*#__PURE__*/ l.typedRef((() => MediaDefs.muxlTrack) as any)], false),"video":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.string({"format":"at-uri"})),"parentTrack":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.ref((() => RepoStrongRef.main) as any)),"metadata":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.typedUnion([/*#__PURE__*/ l.typedRef((() => commonMetadata) as any)], false))})); export { main }; export const $type = $nsid; export const $isTypeOf = /*#__PURE__*/ main.isTypeOf.bind(main); export const $build = /*#__PURE__*/ main.build.bind(main); export const $assert = /*#__PURE__*/ main.assert.bind(main); export const $check = /*#__PURE__*/ main.check.bind(main); export const $cast = /*#__PURE__*/ main.cast.bind(main); export const $ifMatches = /*#__PURE__*/ main.ifMatches.bind(main); export const $matches = /*#__PURE__*/ main.matches.bind(main); export const $parse = /*#__PURE__*/ main.parse.bind(main); export const $safeParse = /*#__PURE__*/ main.safeParse.bind(main); export const $validate = /*#__PURE__*/ main.validate.bind(main); export const $safeValidate = /*#__PURE__*/ main.safeValidate.bind(main); /** Metadata common to all media types. Contains subobjects for other media types. */ type CommonMetadata = { $type?: "place.stream.media.track#commonMetadata"; /** * IETF BCP 47 language tag corresponding to the content of this track */ "language"?:string; /** * duration of this track in milliseconds */ "durationMs"?:number;"video"?:StreamSegment.Video;"audio"?:StreamSegment.Audio }; export type { CommonMetadata }; /** Metadata common to all media types. Contains subobjects for other media types. */ const commonMetadata = /*#__PURE__*/ l.typedObject($nsid, "commonMetadata", /*#__PURE__*/ l.object({"language":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.string()),"durationMs":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.integer()),"video":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.ref((() => StreamSegment.video) as any)),"audio":/*#__PURE__*/ l.optional(/*#__PURE__*/ l.ref((() => StreamSegment.audio) as any))})); export { commonMetadata }; type TrackView = { $type?: "place.stream.media.track#trackView";"uri":l.AtUriString;"cid":l.CidString;"author":ActorDefs.ProfileViewBasic;"record":l.LexMap }; export type { TrackView }; const trackView = /*#__PURE__*/ l.typedObject($nsid, "trackView", /*#__PURE__*/ l.object({"uri":/*#__PURE__*/ l.string({"format":"at-uri"}),"cid":/*#__PURE__*/ l.string({"format":"cid"}),"author":/*#__PURE__*/ l.ref((() => ActorDefs.profileViewBasic) as any),"record":/*#__PURE__*/ l.lexMap()})); export { trackView };