@sanity/client 7.18.0 → 7.19.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/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.d.cts +27 -0
- package/dist/index.browser.d.ts +27 -0
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +27 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/media-library.cjs.map +1 -1
- package/dist/media-library.d.cts +27 -0
- package/dist/media-library.d.ts +27 -0
- package/dist/media-library.js.map +1 -1
- package/dist/stega.browser.d.cts +27 -0
- package/dist/stega.browser.d.ts +27 -0
- package/dist/stega.d.cts +27 -0
- package/dist/stega.d.ts +27 -0
- package/package.json +1 -1
- package/src/media-library.ts +1 -0
- package/src/types.ts +27 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media-library.cjs","sources":["../src/media-library.ts"],"sourcesContent":["import type {\n VideoPlaybackInfo,\n VideoPlaybackInfoItem,\n VideoPlaybackInfoItemSigned,\n VideoPlaybackInfoSigned,\n VideoPlaybackTokens,\n} from './types'\n\nexport type {VideoRenditionInfo, VideoRenditionInfoPublic, VideoRenditionInfoSigned} from './types'\n\n/**\n * Check if a playback info item (stream/thumbnail/etc) has a signed token\n * @internal\n */\nfunction isSignedPlayback(item: VideoPlaybackInfoItem): item is VideoPlaybackInfoItemSigned {\n return 'token' in item\n}\n\n/**\n * Check if the entire playback info response requires signed URLs\n * @public\n */\nexport function isSignedPlaybackInfo(\n playbackInfo: VideoPlaybackInfo,\n): playbackInfo is VideoPlaybackInfoSigned {\n return isSignedPlayback(playbackInfo.stream)\n}\n\n/**\n * Extract playback tokens from signed video playback info\n * @param playbackInfo - The video playback info\n * @returns The playback tokens or undefined if the response is not signed\n * @public\n * @example\n * const tokens = getPlaybackTokens(playbackInfo)\n * console.log(tokens)\n * ```json\n * {\n * stream: \"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...\",\n * thumbnail: \"eyJ0a2VuIjoiVGh1bWJuYWlsVG9rZW4tMTIz...\",\n * animated: \"eyJ0a2VuIjoiQW5pbWF0ZWRUb2tlbi1kZWY...\",\n * storyboard: \"eyJ0a2VuIjoiU3Rvcnlib2FyZFRva2VuLTc4...\"\n * }\n * ```\n */\nexport function getPlaybackTokens(\n playbackInfo: VideoPlaybackInfo,\n): VideoPlaybackTokens | undefined {\n if (isSignedPlaybackInfo(playbackInfo)) {\n return {\n stream: playbackInfo.stream.token,\n thumbnail: playbackInfo.thumbnail.token,\n storyboard: playbackInfo.storyboard.token,\n animated: playbackInfo.animated.token,\n }\n }\n\n return undefined\n}\n"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"media-library.cjs","sources":["../src/media-library.ts"],"sourcesContent":["import type {\n VideoPlaybackInfo,\n VideoPlaybackInfoItem,\n VideoPlaybackInfoItemSigned,\n VideoPlaybackInfoSigned,\n VideoPlaybackTokens,\n} from './types'\n\nexport type {VideoRenditionInfo, VideoRenditionInfoPublic, VideoRenditionInfoSigned} from './types'\nexport type {VideoSubtitleInfo, VideoSubtitleInfoPublic, VideoSubtitleInfoSigned} from './types'\n\n/**\n * Check if a playback info item (stream/thumbnail/etc) has a signed token\n * @internal\n */\nfunction isSignedPlayback(item: VideoPlaybackInfoItem): item is VideoPlaybackInfoItemSigned {\n return 'token' in item\n}\n\n/**\n * Check if the entire playback info response requires signed URLs\n * @public\n */\nexport function isSignedPlaybackInfo(\n playbackInfo: VideoPlaybackInfo,\n): playbackInfo is VideoPlaybackInfoSigned {\n return isSignedPlayback(playbackInfo.stream)\n}\n\n/**\n * Extract playback tokens from signed video playback info\n * @param playbackInfo - The video playback info\n * @returns The playback tokens or undefined if the response is not signed\n * @public\n * @example\n * const tokens = getPlaybackTokens(playbackInfo)\n * console.log(tokens)\n * ```json\n * {\n * stream: \"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...\",\n * thumbnail: \"eyJ0a2VuIjoiVGh1bWJuYWlsVG9rZW4tMTIz...\",\n * animated: \"eyJ0a2VuIjoiQW5pbWF0ZWRUb2tlbi1kZWY...\",\n * storyboard: \"eyJ0a2VuIjoiU3Rvcnlib2FyZFRva2VuLTc4...\"\n * }\n * ```\n */\nexport function getPlaybackTokens(\n playbackInfo: VideoPlaybackInfo,\n): VideoPlaybackTokens | undefined {\n if (isSignedPlaybackInfo(playbackInfo)) {\n return {\n stream: playbackInfo.stream.token,\n thumbnail: playbackInfo.thumbnail.token,\n storyboard: playbackInfo.storyboard.token,\n animated: playbackInfo.animated.token,\n }\n }\n\n return undefined\n}\n"],"names":[],"mappings":";;AAeA,SAAS,iBAAiB,MAAkE;AAC1F,SAAO,WAAW;AACpB;AAMO,SAAS,qBACd,cACyC;AACzC,SAAO,iBAAiB,aAAa,MAAM;AAC7C;AAmBO,SAAS,kBACd,cACiC;AACjC,MAAI,qBAAqB,YAAY;AACnC,WAAO;AAAA,MACL,QAAQ,aAAa,OAAO;AAAA,MAC5B,WAAW,aAAa,UAAU;AAAA,MAClC,YAAY,aAAa,WAAW;AAAA,MACpC,UAAU,aAAa,SAAS;AAAA,IAAA;AAKtC;;;"}
|
package/dist/media-library.d.cts
CHANGED
|
@@ -33,6 +33,9 @@ declare interface VideoPlaybackInfo<
|
|
|
33
33
|
R extends VideoRenditionInfo = T extends VideoPlaybackInfoItemSigned
|
|
34
34
|
? VideoRenditionInfoSigned
|
|
35
35
|
: VideoRenditionInfo,
|
|
36
|
+
S extends VideoSubtitleInfo = T extends VideoPlaybackInfoItemSigned
|
|
37
|
+
? VideoSubtitleInfoSigned
|
|
38
|
+
: VideoSubtitleInfo,
|
|
36
39
|
> {
|
|
37
40
|
id: string
|
|
38
41
|
thumbnail: T
|
|
@@ -42,6 +45,7 @@ declare interface VideoPlaybackInfo<
|
|
|
42
45
|
duration: number
|
|
43
46
|
aspectRatio: number
|
|
44
47
|
renditions?: R[]
|
|
48
|
+
subtitles?: S[]
|
|
45
49
|
}
|
|
46
50
|
|
|
47
51
|
/** @public */
|
|
@@ -87,4 +91,27 @@ export declare interface VideoRenditionInfoSigned extends VideoRenditionInfoPubl
|
|
|
87
91
|
expiresAt: string
|
|
88
92
|
}
|
|
89
93
|
|
|
94
|
+
/** @public */
|
|
95
|
+
export declare type VideoSubtitleInfo = VideoSubtitleInfoPublic | VideoSubtitleInfoSigned
|
|
96
|
+
|
|
97
|
+
/** @public */
|
|
98
|
+
export declare interface VideoSubtitleInfoPublic {
|
|
99
|
+
/** Subtitle track identifier */
|
|
100
|
+
trackId: string
|
|
101
|
+
/** ISO 639-1 language code */
|
|
102
|
+
languageCode: string
|
|
103
|
+
/** URL to the subtitle file */
|
|
104
|
+
url: string
|
|
105
|
+
/** Whether this track contains closed captions */
|
|
106
|
+
closedCaptions: boolean
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/** @public */
|
|
110
|
+
export declare interface VideoSubtitleInfoSigned extends VideoSubtitleInfoPublic {
|
|
111
|
+
/** Authentication token for signed playback */
|
|
112
|
+
token: string
|
|
113
|
+
/** Token expiration time in ISO 8601 format */
|
|
114
|
+
expiresAt: string
|
|
115
|
+
}
|
|
116
|
+
|
|
90
117
|
export {}
|
package/dist/media-library.d.ts
CHANGED
|
@@ -33,6 +33,9 @@ declare interface VideoPlaybackInfo<
|
|
|
33
33
|
R extends VideoRenditionInfo = T extends VideoPlaybackInfoItemSigned
|
|
34
34
|
? VideoRenditionInfoSigned
|
|
35
35
|
: VideoRenditionInfo,
|
|
36
|
+
S extends VideoSubtitleInfo = T extends VideoPlaybackInfoItemSigned
|
|
37
|
+
? VideoSubtitleInfoSigned
|
|
38
|
+
: VideoSubtitleInfo,
|
|
36
39
|
> {
|
|
37
40
|
id: string
|
|
38
41
|
thumbnail: T
|
|
@@ -42,6 +45,7 @@ declare interface VideoPlaybackInfo<
|
|
|
42
45
|
duration: number
|
|
43
46
|
aspectRatio: number
|
|
44
47
|
renditions?: R[]
|
|
48
|
+
subtitles?: S[]
|
|
45
49
|
}
|
|
46
50
|
|
|
47
51
|
/** @public */
|
|
@@ -87,4 +91,27 @@ export declare interface VideoRenditionInfoSigned extends VideoRenditionInfoPubl
|
|
|
87
91
|
expiresAt: string
|
|
88
92
|
}
|
|
89
93
|
|
|
94
|
+
/** @public */
|
|
95
|
+
export declare type VideoSubtitleInfo = VideoSubtitleInfoPublic | VideoSubtitleInfoSigned
|
|
96
|
+
|
|
97
|
+
/** @public */
|
|
98
|
+
export declare interface VideoSubtitleInfoPublic {
|
|
99
|
+
/** Subtitle track identifier */
|
|
100
|
+
trackId: string
|
|
101
|
+
/** ISO 639-1 language code */
|
|
102
|
+
languageCode: string
|
|
103
|
+
/** URL to the subtitle file */
|
|
104
|
+
url: string
|
|
105
|
+
/** Whether this track contains closed captions */
|
|
106
|
+
closedCaptions: boolean
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/** @public */
|
|
110
|
+
export declare interface VideoSubtitleInfoSigned extends VideoSubtitleInfoPublic {
|
|
111
|
+
/** Authentication token for signed playback */
|
|
112
|
+
token: string
|
|
113
|
+
/** Token expiration time in ISO 8601 format */
|
|
114
|
+
expiresAt: string
|
|
115
|
+
}
|
|
116
|
+
|
|
90
117
|
export {}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media-library.js","sources":["../src/media-library.ts"],"sourcesContent":["import type {\n VideoPlaybackInfo,\n VideoPlaybackInfoItem,\n VideoPlaybackInfoItemSigned,\n VideoPlaybackInfoSigned,\n VideoPlaybackTokens,\n} from './types'\n\nexport type {VideoRenditionInfo, VideoRenditionInfoPublic, VideoRenditionInfoSigned} from './types'\n\n/**\n * Check if a playback info item (stream/thumbnail/etc) has a signed token\n * @internal\n */\nfunction isSignedPlayback(item: VideoPlaybackInfoItem): item is VideoPlaybackInfoItemSigned {\n return 'token' in item\n}\n\n/**\n * Check if the entire playback info response requires signed URLs\n * @public\n */\nexport function isSignedPlaybackInfo(\n playbackInfo: VideoPlaybackInfo,\n): playbackInfo is VideoPlaybackInfoSigned {\n return isSignedPlayback(playbackInfo.stream)\n}\n\n/**\n * Extract playback tokens from signed video playback info\n * @param playbackInfo - The video playback info\n * @returns The playback tokens or undefined if the response is not signed\n * @public\n * @example\n * const tokens = getPlaybackTokens(playbackInfo)\n * console.log(tokens)\n * ```json\n * {\n * stream: \"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...\",\n * thumbnail: \"eyJ0a2VuIjoiVGh1bWJuYWlsVG9rZW4tMTIz...\",\n * animated: \"eyJ0a2VuIjoiQW5pbWF0ZWRUb2tlbi1kZWY...\",\n * storyboard: \"eyJ0a2VuIjoiU3Rvcnlib2FyZFRva2VuLTc4...\"\n * }\n * ```\n */\nexport function getPlaybackTokens(\n playbackInfo: VideoPlaybackInfo,\n): VideoPlaybackTokens | undefined {\n if (isSignedPlaybackInfo(playbackInfo)) {\n return {\n stream: playbackInfo.stream.token,\n thumbnail: playbackInfo.thumbnail.token,\n storyboard: playbackInfo.storyboard.token,\n animated: playbackInfo.animated.token,\n }\n }\n\n return undefined\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"media-library.js","sources":["../src/media-library.ts"],"sourcesContent":["import type {\n VideoPlaybackInfo,\n VideoPlaybackInfoItem,\n VideoPlaybackInfoItemSigned,\n VideoPlaybackInfoSigned,\n VideoPlaybackTokens,\n} from './types'\n\nexport type {VideoRenditionInfo, VideoRenditionInfoPublic, VideoRenditionInfoSigned} from './types'\nexport type {VideoSubtitleInfo, VideoSubtitleInfoPublic, VideoSubtitleInfoSigned} from './types'\n\n/**\n * Check if a playback info item (stream/thumbnail/etc) has a signed token\n * @internal\n */\nfunction isSignedPlayback(item: VideoPlaybackInfoItem): item is VideoPlaybackInfoItemSigned {\n return 'token' in item\n}\n\n/**\n * Check if the entire playback info response requires signed URLs\n * @public\n */\nexport function isSignedPlaybackInfo(\n playbackInfo: VideoPlaybackInfo,\n): playbackInfo is VideoPlaybackInfoSigned {\n return isSignedPlayback(playbackInfo.stream)\n}\n\n/**\n * Extract playback tokens from signed video playback info\n * @param playbackInfo - The video playback info\n * @returns The playback tokens or undefined if the response is not signed\n * @public\n * @example\n * const tokens = getPlaybackTokens(playbackInfo)\n * console.log(tokens)\n * ```json\n * {\n * stream: \"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...\",\n * thumbnail: \"eyJ0a2VuIjoiVGh1bWJuYWlsVG9rZW4tMTIz...\",\n * animated: \"eyJ0a2VuIjoiQW5pbWF0ZWRUb2tlbi1kZWY...\",\n * storyboard: \"eyJ0a2VuIjoiU3Rvcnlib2FyZFRva2VuLTc4...\"\n * }\n * ```\n */\nexport function getPlaybackTokens(\n playbackInfo: VideoPlaybackInfo,\n): VideoPlaybackTokens | undefined {\n if (isSignedPlaybackInfo(playbackInfo)) {\n return {\n stream: playbackInfo.stream.token,\n thumbnail: playbackInfo.thumbnail.token,\n storyboard: playbackInfo.storyboard.token,\n animated: playbackInfo.animated.token,\n }\n }\n\n return undefined\n}\n"],"names":[],"mappings":"AAeA,SAAS,iBAAiB,MAAkE;AAC1F,SAAO,WAAW;AACpB;AAMO,SAAS,qBACd,cACyC;AACzC,SAAO,iBAAiB,aAAa,MAAM;AAC7C;AAmBO,SAAS,kBACd,cACiC;AACjC,MAAI,qBAAqB,YAAY;AACnC,WAAO;AAAA,MACL,QAAQ,aAAa,OAAO;AAAA,MAC5B,WAAW,aAAa,UAAU;AAAA,MAClC,YAAY,aAAa,WAAW;AAAA,MACpC,UAAU,aAAa,SAAS;AAAA,IAAA;AAKtC;"}
|
package/dist/stega.browser.d.cts
CHANGED
|
@@ -6814,6 +6814,9 @@ export declare interface VideoPlaybackInfo<
|
|
|
6814
6814
|
R extends VideoRenditionInfo = T extends VideoPlaybackInfoItemSigned
|
|
6815
6815
|
? VideoRenditionInfoSigned
|
|
6816
6816
|
: VideoRenditionInfo,
|
|
6817
|
+
S extends VideoSubtitleInfo = T extends VideoPlaybackInfoItemSigned
|
|
6818
|
+
? VideoSubtitleInfoSigned
|
|
6819
|
+
: VideoSubtitleInfo,
|
|
6817
6820
|
> {
|
|
6818
6821
|
id: string
|
|
6819
6822
|
thumbnail: T
|
|
@@ -6823,6 +6826,7 @@ export declare interface VideoPlaybackInfo<
|
|
|
6823
6826
|
duration: number
|
|
6824
6827
|
aspectRatio: number
|
|
6825
6828
|
renditions?: R[]
|
|
6829
|
+
subtitles?: S[]
|
|
6826
6830
|
}
|
|
6827
6831
|
|
|
6828
6832
|
/** @public */
|
|
@@ -6873,6 +6877,29 @@ export declare interface VideoRenditionInfoSigned extends VideoRenditionInfoPubl
|
|
|
6873
6877
|
expiresAt: string
|
|
6874
6878
|
}
|
|
6875
6879
|
|
|
6880
|
+
/** @public */
|
|
6881
|
+
export declare type VideoSubtitleInfo = VideoSubtitleInfoPublic | VideoSubtitleInfoSigned
|
|
6882
|
+
|
|
6883
|
+
/** @public */
|
|
6884
|
+
export declare interface VideoSubtitleInfoPublic {
|
|
6885
|
+
/** Subtitle track identifier */
|
|
6886
|
+
trackId: string
|
|
6887
|
+
/** ISO 639-1 language code */
|
|
6888
|
+
languageCode: string
|
|
6889
|
+
/** URL to the subtitle file */
|
|
6890
|
+
url: string
|
|
6891
|
+
/** Whether this track contains closed captions */
|
|
6892
|
+
closedCaptions: boolean
|
|
6893
|
+
}
|
|
6894
|
+
|
|
6895
|
+
/** @public */
|
|
6896
|
+
export declare interface VideoSubtitleInfoSigned extends VideoSubtitleInfoPublic {
|
|
6897
|
+
/** Authentication token for signed playback */
|
|
6898
|
+
token: string
|
|
6899
|
+
/** Token expiration time in ISO 8601 format */
|
|
6900
|
+
expiresAt: string
|
|
6901
|
+
}
|
|
6902
|
+
|
|
6876
6903
|
/**
|
|
6877
6904
|
* Emitted when the listener reconnects and successfully resumes from
|
|
6878
6905
|
* its previous position.
|
package/dist/stega.browser.d.ts
CHANGED
|
@@ -6814,6 +6814,9 @@ export declare interface VideoPlaybackInfo<
|
|
|
6814
6814
|
R extends VideoRenditionInfo = T extends VideoPlaybackInfoItemSigned
|
|
6815
6815
|
? VideoRenditionInfoSigned
|
|
6816
6816
|
: VideoRenditionInfo,
|
|
6817
|
+
S extends VideoSubtitleInfo = T extends VideoPlaybackInfoItemSigned
|
|
6818
|
+
? VideoSubtitleInfoSigned
|
|
6819
|
+
: VideoSubtitleInfo,
|
|
6817
6820
|
> {
|
|
6818
6821
|
id: string
|
|
6819
6822
|
thumbnail: T
|
|
@@ -6823,6 +6826,7 @@ export declare interface VideoPlaybackInfo<
|
|
|
6823
6826
|
duration: number
|
|
6824
6827
|
aspectRatio: number
|
|
6825
6828
|
renditions?: R[]
|
|
6829
|
+
subtitles?: S[]
|
|
6826
6830
|
}
|
|
6827
6831
|
|
|
6828
6832
|
/** @public */
|
|
@@ -6873,6 +6877,29 @@ export declare interface VideoRenditionInfoSigned extends VideoRenditionInfoPubl
|
|
|
6873
6877
|
expiresAt: string
|
|
6874
6878
|
}
|
|
6875
6879
|
|
|
6880
|
+
/** @public */
|
|
6881
|
+
export declare type VideoSubtitleInfo = VideoSubtitleInfoPublic | VideoSubtitleInfoSigned
|
|
6882
|
+
|
|
6883
|
+
/** @public */
|
|
6884
|
+
export declare interface VideoSubtitleInfoPublic {
|
|
6885
|
+
/** Subtitle track identifier */
|
|
6886
|
+
trackId: string
|
|
6887
|
+
/** ISO 639-1 language code */
|
|
6888
|
+
languageCode: string
|
|
6889
|
+
/** URL to the subtitle file */
|
|
6890
|
+
url: string
|
|
6891
|
+
/** Whether this track contains closed captions */
|
|
6892
|
+
closedCaptions: boolean
|
|
6893
|
+
}
|
|
6894
|
+
|
|
6895
|
+
/** @public */
|
|
6896
|
+
export declare interface VideoSubtitleInfoSigned extends VideoSubtitleInfoPublic {
|
|
6897
|
+
/** Authentication token for signed playback */
|
|
6898
|
+
token: string
|
|
6899
|
+
/** Token expiration time in ISO 8601 format */
|
|
6900
|
+
expiresAt: string
|
|
6901
|
+
}
|
|
6902
|
+
|
|
6876
6903
|
/**
|
|
6877
6904
|
* Emitted when the listener reconnects and successfully resumes from
|
|
6878
6905
|
* its previous position.
|
package/dist/stega.d.cts
CHANGED
|
@@ -6814,6 +6814,9 @@ export declare interface VideoPlaybackInfo<
|
|
|
6814
6814
|
R extends VideoRenditionInfo = T extends VideoPlaybackInfoItemSigned
|
|
6815
6815
|
? VideoRenditionInfoSigned
|
|
6816
6816
|
: VideoRenditionInfo,
|
|
6817
|
+
S extends VideoSubtitleInfo = T extends VideoPlaybackInfoItemSigned
|
|
6818
|
+
? VideoSubtitleInfoSigned
|
|
6819
|
+
: VideoSubtitleInfo,
|
|
6817
6820
|
> {
|
|
6818
6821
|
id: string
|
|
6819
6822
|
thumbnail: T
|
|
@@ -6823,6 +6826,7 @@ export declare interface VideoPlaybackInfo<
|
|
|
6823
6826
|
duration: number
|
|
6824
6827
|
aspectRatio: number
|
|
6825
6828
|
renditions?: R[]
|
|
6829
|
+
subtitles?: S[]
|
|
6826
6830
|
}
|
|
6827
6831
|
|
|
6828
6832
|
/** @public */
|
|
@@ -6873,6 +6877,29 @@ export declare interface VideoRenditionInfoSigned extends VideoRenditionInfoPubl
|
|
|
6873
6877
|
expiresAt: string
|
|
6874
6878
|
}
|
|
6875
6879
|
|
|
6880
|
+
/** @public */
|
|
6881
|
+
export declare type VideoSubtitleInfo = VideoSubtitleInfoPublic | VideoSubtitleInfoSigned
|
|
6882
|
+
|
|
6883
|
+
/** @public */
|
|
6884
|
+
export declare interface VideoSubtitleInfoPublic {
|
|
6885
|
+
/** Subtitle track identifier */
|
|
6886
|
+
trackId: string
|
|
6887
|
+
/** ISO 639-1 language code */
|
|
6888
|
+
languageCode: string
|
|
6889
|
+
/** URL to the subtitle file */
|
|
6890
|
+
url: string
|
|
6891
|
+
/** Whether this track contains closed captions */
|
|
6892
|
+
closedCaptions: boolean
|
|
6893
|
+
}
|
|
6894
|
+
|
|
6895
|
+
/** @public */
|
|
6896
|
+
export declare interface VideoSubtitleInfoSigned extends VideoSubtitleInfoPublic {
|
|
6897
|
+
/** Authentication token for signed playback */
|
|
6898
|
+
token: string
|
|
6899
|
+
/** Token expiration time in ISO 8601 format */
|
|
6900
|
+
expiresAt: string
|
|
6901
|
+
}
|
|
6902
|
+
|
|
6876
6903
|
/**
|
|
6877
6904
|
* Emitted when the listener reconnects and successfully resumes from
|
|
6878
6905
|
* its previous position.
|
package/dist/stega.d.ts
CHANGED
|
@@ -6814,6 +6814,9 @@ export declare interface VideoPlaybackInfo<
|
|
|
6814
6814
|
R extends VideoRenditionInfo = T extends VideoPlaybackInfoItemSigned
|
|
6815
6815
|
? VideoRenditionInfoSigned
|
|
6816
6816
|
: VideoRenditionInfo,
|
|
6817
|
+
S extends VideoSubtitleInfo = T extends VideoPlaybackInfoItemSigned
|
|
6818
|
+
? VideoSubtitleInfoSigned
|
|
6819
|
+
: VideoSubtitleInfo,
|
|
6817
6820
|
> {
|
|
6818
6821
|
id: string
|
|
6819
6822
|
thumbnail: T
|
|
@@ -6823,6 +6826,7 @@ export declare interface VideoPlaybackInfo<
|
|
|
6823
6826
|
duration: number
|
|
6824
6827
|
aspectRatio: number
|
|
6825
6828
|
renditions?: R[]
|
|
6829
|
+
subtitles?: S[]
|
|
6826
6830
|
}
|
|
6827
6831
|
|
|
6828
6832
|
/** @public */
|
|
@@ -6873,6 +6877,29 @@ export declare interface VideoRenditionInfoSigned extends VideoRenditionInfoPubl
|
|
|
6873
6877
|
expiresAt: string
|
|
6874
6878
|
}
|
|
6875
6879
|
|
|
6880
|
+
/** @public */
|
|
6881
|
+
export declare type VideoSubtitleInfo = VideoSubtitleInfoPublic | VideoSubtitleInfoSigned
|
|
6882
|
+
|
|
6883
|
+
/** @public */
|
|
6884
|
+
export declare interface VideoSubtitleInfoPublic {
|
|
6885
|
+
/** Subtitle track identifier */
|
|
6886
|
+
trackId: string
|
|
6887
|
+
/** ISO 639-1 language code */
|
|
6888
|
+
languageCode: string
|
|
6889
|
+
/** URL to the subtitle file */
|
|
6890
|
+
url: string
|
|
6891
|
+
/** Whether this track contains closed captions */
|
|
6892
|
+
closedCaptions: boolean
|
|
6893
|
+
}
|
|
6894
|
+
|
|
6895
|
+
/** @public */
|
|
6896
|
+
export declare interface VideoSubtitleInfoSigned extends VideoSubtitleInfoPublic {
|
|
6897
|
+
/** Authentication token for signed playback */
|
|
6898
|
+
token: string
|
|
6899
|
+
/** Token expiration time in ISO 8601 format */
|
|
6900
|
+
expiresAt: string
|
|
6901
|
+
}
|
|
6902
|
+
|
|
6876
6903
|
/**
|
|
6877
6904
|
* Emitted when the listener reconnects and successfully resumes from
|
|
6878
6905
|
* its previous position.
|
package/package.json
CHANGED
package/src/media-library.ts
CHANGED
|
@@ -7,6 +7,7 @@ import type {
|
|
|
7
7
|
} from './types'
|
|
8
8
|
|
|
9
9
|
export type {VideoRenditionInfo, VideoRenditionInfoPublic, VideoRenditionInfoSigned} from './types'
|
|
10
|
+
export type {VideoSubtitleInfo, VideoSubtitleInfoPublic, VideoSubtitleInfoSigned} from './types'
|
|
10
11
|
|
|
11
12
|
/**
|
|
12
13
|
* Check if a playback info item (stream/thumbnail/etc) has a signed token
|
package/src/types.ts
CHANGED
|
@@ -1996,12 +1996,38 @@ export interface VideoRenditionInfoSigned extends VideoRenditionInfoPublic {
|
|
|
1996
1996
|
/** @public */
|
|
1997
1997
|
export type VideoRenditionInfo = VideoRenditionInfoPublic | VideoRenditionInfoSigned
|
|
1998
1998
|
|
|
1999
|
+
/** @public */
|
|
2000
|
+
export interface VideoSubtitleInfoPublic {
|
|
2001
|
+
/** Subtitle track identifier */
|
|
2002
|
+
trackId: string
|
|
2003
|
+
/** ISO 639-1 language code */
|
|
2004
|
+
languageCode: string
|
|
2005
|
+
/** URL to the subtitle file */
|
|
2006
|
+
url: string
|
|
2007
|
+
/** Whether this track contains closed captions */
|
|
2008
|
+
closedCaptions: boolean
|
|
2009
|
+
}
|
|
2010
|
+
|
|
2011
|
+
/** @public */
|
|
2012
|
+
export interface VideoSubtitleInfoSigned extends VideoSubtitleInfoPublic {
|
|
2013
|
+
/** Authentication token for signed playback */
|
|
2014
|
+
token: string
|
|
2015
|
+
/** Token expiration time in ISO 8601 format */
|
|
2016
|
+
expiresAt: string
|
|
2017
|
+
}
|
|
2018
|
+
|
|
2019
|
+
/** @public */
|
|
2020
|
+
export type VideoSubtitleInfo = VideoSubtitleInfoPublic | VideoSubtitleInfoSigned
|
|
2021
|
+
|
|
1999
2022
|
/** @public */
|
|
2000
2023
|
export interface VideoPlaybackInfo<
|
|
2001
2024
|
T extends VideoPlaybackInfoItem = VideoPlaybackInfoItem,
|
|
2002
2025
|
R extends VideoRenditionInfo = T extends VideoPlaybackInfoItemSigned
|
|
2003
2026
|
? VideoRenditionInfoSigned
|
|
2004
2027
|
: VideoRenditionInfo,
|
|
2028
|
+
S extends VideoSubtitleInfo = T extends VideoPlaybackInfoItemSigned
|
|
2029
|
+
? VideoSubtitleInfoSigned
|
|
2030
|
+
: VideoSubtitleInfo,
|
|
2005
2031
|
> {
|
|
2006
2032
|
id: string
|
|
2007
2033
|
thumbnail: T
|
|
@@ -2011,6 +2037,7 @@ export interface VideoPlaybackInfo<
|
|
|
2011
2037
|
duration: number
|
|
2012
2038
|
aspectRatio: number
|
|
2013
2039
|
renditions?: R[]
|
|
2040
|
+
subtitles?: S[]
|
|
2014
2041
|
}
|
|
2015
2042
|
|
|
2016
2043
|
/** @public */
|