@nomercy-entertainment/nomercy-video-player 0.2.1 → 0.2.2

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/helpers.d.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  * @param time - The time to convert, in seconds or string format.
4
4
  * @returns A string representing the time in the format "DD:HH:MM:SS".
5
5
  */
6
- export declare const humanTime: (time: string | number) => any;
6
+ export declare const humanTime: (time: string | number) => string;
7
7
  /**
8
8
  * Converts a time string in the format "hh:mm:ss" to seconds.
9
9
  * @param hms The time string to convert.
package/dist/types.d.ts CHANGED
@@ -130,9 +130,9 @@ export interface TimeData {
130
130
  duration: number;
131
131
  percentage: number;
132
132
  remaining: number;
133
- currentTimeHuman: number;
134
- durationHuman: number;
135
- remainingHuman: number;
133
+ currentTimeHuman: string;
134
+ durationHuman: string;
135
+ remainingHuman: string;
136
136
  playbackRate: number;
137
137
  }
138
138
  export interface Position {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nomercy-entertainment/nomercy-video-player",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Full event-driven video player without a UI.",
5
5
  "type": "commonjs",
6
6
  "main": "./dist/index.js",
package/src/helpers.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * @param time - The time to convert, in seconds or string format.
6
6
  * @returns A string representing the time in the format "DD:HH:MM:SS".
7
7
  */
8
- export const humanTime = (time: string | number) => {
8
+ export const humanTime = (time: string | number): string => {
9
9
  time = parseInt(time as string, 10);
10
10
 
11
11
  let days: any = parseInt(`${(time / (3600 * 24))}`, 10);
package/src/types.ts CHANGED
@@ -148,9 +148,9 @@ export interface TimeData {
148
148
  duration: number;
149
149
  percentage: number;
150
150
  remaining: number;
151
- currentTimeHuman: number;
152
- durationHuman: number;
153
- remainingHuman: number;
151
+ currentTimeHuman: string;
152
+ durationHuman: string;
153
+ remainingHuman: string;
154
154
  playbackRate: number;
155
155
  }
156
156