@telemetryos/sdk 1.12.0 → 1.13.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/CHANGELOG.md +26 -0
- package/README.md +50 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +266 -227
- package/dist/playlist.d.ts +18 -5
- package/package.json +2 -2
package/dist/playlist.d.ts
CHANGED
|
@@ -30,20 +30,33 @@ export declare class Playlist {
|
|
|
30
30
|
/**
|
|
31
31
|
* Sets the display duration for the current page.
|
|
32
32
|
*
|
|
33
|
-
*
|
|
34
|
-
* the current page is displayed before advancing to the next page.
|
|
33
|
+
* The timer starts from the moment of this call, not from page start.
|
|
35
34
|
*
|
|
36
|
-
* @param duration The duration in
|
|
35
|
+
* @param duration The duration in seconds
|
|
37
36
|
* @returns A promise that resolves to true if successful
|
|
38
37
|
* @example
|
|
39
38
|
* // Set page duration to 10 seconds
|
|
40
|
-
* await playlist().setDuration(
|
|
39
|
+
* await playlist().setDuration(10);
|
|
41
40
|
*
|
|
42
41
|
* @example
|
|
43
42
|
* // Extend duration based on content
|
|
44
43
|
* if (hasMoreContent) {
|
|
45
|
-
* await playlist().setDuration(
|
|
44
|
+
* await playlist().setDuration(30); // 30 seconds
|
|
46
45
|
* }
|
|
47
46
|
*/
|
|
48
47
|
setDuration(duration: number): Promise<boolean>;
|
|
48
|
+
/**
|
|
49
|
+
* Gets the predefined page duration from the playlist.
|
|
50
|
+
*
|
|
51
|
+
* Returns the original page.duration as configured in the playlist,
|
|
52
|
+
* not the remaining time or any value altered via setDuration.
|
|
53
|
+
*
|
|
54
|
+
* @returns A promise that resolves to { success: boolean, duration: number } in seconds, or 0 if undefined
|
|
55
|
+
* @example
|
|
56
|
+
* const { duration } = await playlist().getDuration();
|
|
57
|
+
*/
|
|
58
|
+
getDuration(): Promise<{
|
|
59
|
+
success: boolean;
|
|
60
|
+
duration: number;
|
|
61
|
+
}>;
|
|
49
62
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telemetryos/sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.0",
|
|
4
4
|
"description": "The official TelemetryOS application API package. Use it to build applications that run on the TelemetryOS platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"license": "",
|
|
43
43
|
"repository": "github:TelemetryTV/Application-API",
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@telemetryos/root-sdk": "^1.
|
|
45
|
+
"@telemetryos/root-sdk": "^1.13.0",
|
|
46
46
|
"zod": "^3.24.4"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|