@byomakase/omakase-player 0.2.5 → 0.3.1
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/api/omakase-player-api.d.ts +4 -0
- package/dist/audio/audio-controller.d.ts +3 -2
- package/dist/common/component.d.ts +2 -2
- package/dist/dom/dom-controller.d.ts +2 -1
- package/dist/omakase-player.cjs.js +37 -37
- package/dist/omakase-player.cjs.js.map +1 -1
- package/dist/omakase-player.d.ts +10 -10
- package/dist/omakase-player.es.js +5426 -5306
- package/dist/omakase-player.es.js.map +1 -1
- package/dist/omakase-player.umd.js +37 -37
- package/dist/omakase-player.umd.js.map +1 -1
- package/dist/subtitles/subtitles-controller.d.ts +2 -2
- package/dist/timeline/audio-track/audio-track-lane-item.d.ts +1 -0
- package/dist/timeline/audio-track/audio-track-lane.d.ts +1 -0
- package/dist/timeline/subtitles/subtitles-lane-item.d.ts +1 -0
- package/dist/timeline/timeline-lane.d.ts +1 -0
- package/dist/timeline/timeline.d.ts +3 -2
- package/dist/types/common.d.ts +3 -3
- package/dist/types/types.d.ts +3 -0
- package/dist/util/object-util.d.ts +1 -0
- package/dist/util/observable-util.d.ts +6 -1
- package/dist/video/video-controller.d.ts +4 -2
- package/dist/video/video.d.ts +9 -0
- package/package.json +1 -1
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
* <https://github.com/ReactiveX/rxjs/blob/master/LICENSE.txt>
|
|
19
19
|
*/
|
|
20
20
|
import { SubtitlesVttTrack } from "../track/subtitles-vtt-track";
|
|
21
|
-
import { OmakaseTextTrack, OmakaseTextTrackCue, SubtitlesCreateEvent, SubtitlesEvent, SubtitlesVttTrackConfig } from "../types";
|
|
21
|
+
import { Destroyable, OmakaseTextTrack, OmakaseTextTrackCue, SubtitlesCreateEvent, SubtitlesEvent, SubtitlesVttTrackConfig } from "../types";
|
|
22
22
|
import { Observable, Subject } from "rxjs";
|
|
23
23
|
import { VideoController } from "../video/video-controller";
|
|
24
24
|
import { SubtitlesApi } from "../api/subtitles-api";
|
|
25
|
-
export declare class SubtitlesController implements SubtitlesApi {
|
|
25
|
+
export declare class SubtitlesController implements SubtitlesApi, Destroyable {
|
|
26
26
|
protected currentTrack: OmakaseTextTrack<OmakaseTextTrackCue>;
|
|
27
27
|
protected videoController: VideoController;
|
|
28
28
|
protected subtitlesTracks: Map<string, OmakaseTextTrack<OmakaseTextTrackCue>>;
|
|
@@ -91,8 +91,8 @@ export declare class Timeline extends BaseComponent<TimelineConfig, TimelineStyl
|
|
|
91
91
|
private scrollbar;
|
|
92
92
|
private playheadHover;
|
|
93
93
|
private playhead;
|
|
94
|
-
private
|
|
95
|
-
private
|
|
94
|
+
private timelineLanes;
|
|
95
|
+
private timelineLanesMap;
|
|
96
96
|
private scrubberLane;
|
|
97
97
|
private thumbnailHover;
|
|
98
98
|
private headerTimecodeDisplay;
|
|
@@ -222,4 +222,5 @@ export declare class Timeline extends BaseComponent<TimelineConfig, TimelineStyl
|
|
|
222
222
|
private fetchThumbnailVttFile;
|
|
223
223
|
toggleLeftPanelVisible(visible: boolean): void;
|
|
224
224
|
clearContent(): void;
|
|
225
|
+
destroy(): void;
|
|
225
226
|
}
|
package/dist/types/common.d.ts
CHANGED
package/dist/types/types.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
export type CamelToSnakeCase<S extends string> = S extends `${infer T}${infer U}` ? `${T extends Capitalize<T> ? "_" : ""}${Lowercase<T>}${CamelToSnakeCase<U>}` : S;
|
|
2
2
|
export type PartialRecord<K extends keyof any, T> = Partial<Record<K, T>>;
|
|
3
3
|
export type WithOptionalPartial<T, K extends keyof T> = Omit<T, K> & PartialRecord<K, Partial<T[K]>>;
|
|
4
|
+
export type AtLeastOne<T, U = {
|
|
5
|
+
[K in keyof T]: Pick<T, K>;
|
|
6
|
+
}> = Partial<T> & U[keyof U];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isNullOrUndefined(value: any): boolean;
|
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
import { Subject } from "rxjs";
|
|
2
|
-
export declare function
|
|
2
|
+
export declare function nextCompleteVoidSubject(subject: Subject<void>): void;
|
|
3
|
+
export declare function nextCompleteVoidSubjects(...subjects: Subject<void>[]): void;
|
|
4
|
+
export declare function completeSubject(subject: Subject<any>): void;
|
|
5
|
+
export declare function completeSubjects(...subjects: Subject<any>[]): void;
|
|
6
|
+
export declare function unsubscribeSubjects(...subjects: Subject<any>[]): void;
|
|
7
|
+
export declare function unsubscribeSubject(subject: Subject<any>): void;
|
|
@@ -7,7 +7,7 @@ import { Video } from "./video";
|
|
|
7
7
|
import { DomController } from "../dom/dom-controller";
|
|
8
8
|
import { PlaybackState, PlaybackStateMachine } from "./playback-state";
|
|
9
9
|
import Hls from "hls.js";
|
|
10
|
-
import { HelpMenuGroup } from "../types";
|
|
10
|
+
import { Destroyable, HelpMenuGroup } from "../types";
|
|
11
11
|
export declare const HTMLVideoElementEventKeys: {
|
|
12
12
|
PAUSE: string;
|
|
13
13
|
WAITING: string;
|
|
@@ -29,7 +29,7 @@ interface VideoFrameCallbackData {
|
|
|
29
29
|
now: DOMHighResTimeStamp;
|
|
30
30
|
metadata: VideoFrameCallbackMetadata;
|
|
31
31
|
}
|
|
32
|
-
export declare abstract class VideoController implements VideoApi {
|
|
32
|
+
export declare abstract class VideoController implements VideoApi, Destroyable {
|
|
33
33
|
protected browserProvider: BrowserProvider;
|
|
34
34
|
protected domController: DomController;
|
|
35
35
|
protected crossorigin: HTMLVideoElementCrossorigin;
|
|
@@ -80,6 +80,7 @@ export declare abstract class VideoController implements VideoApi {
|
|
|
80
80
|
private detachVideoEventListeners;
|
|
81
81
|
private syncVideoFrames;
|
|
82
82
|
private seekTimeAndSync;
|
|
83
|
+
private seekTimeWithoutSync;
|
|
83
84
|
private _seekTimeFireAndForget;
|
|
84
85
|
private _seekTimeAndSyncNoEmitEvents;
|
|
85
86
|
/***
|
|
@@ -116,6 +117,7 @@ export declare abstract class VideoController implements VideoApi {
|
|
|
116
117
|
* return Video duration in seconds
|
|
117
118
|
*/
|
|
118
119
|
getDuration(): number;
|
|
120
|
+
getCorrectedDuration(): number;
|
|
119
121
|
getFrameRate(): number;
|
|
120
122
|
getTotalFrames(): number;
|
|
121
123
|
getCurrentFrame(): number;
|
package/dist/video/video.d.ts
CHANGED
|
@@ -9,6 +9,13 @@ export declare class Video {
|
|
|
9
9
|
* @private
|
|
10
10
|
*/
|
|
11
11
|
private readonly _frameDuration;
|
|
12
|
+
/**
|
|
13
|
+
* Corrected duration field will be updated once when last video fragment gets loaded
|
|
14
|
+
* and calculated duration get shorter than initially set duration
|
|
15
|
+
*
|
|
16
|
+
* @private correctedDuration
|
|
17
|
+
*/
|
|
18
|
+
private _correctedDuration;
|
|
12
19
|
constructor(element: HTMLVideoElement, sourceUrl: string, frameRate: number, duration: number);
|
|
13
20
|
get element(): HTMLVideoElement;
|
|
14
21
|
get sourceUrl(): string;
|
|
@@ -16,4 +23,6 @@ export declare class Video {
|
|
|
16
23
|
get duration(): number;
|
|
17
24
|
get totalFrames(): number;
|
|
18
25
|
get frameDuration(): number;
|
|
26
|
+
get correctedDuration(): number;
|
|
27
|
+
setCorrectedDuration(value: number): void;
|
|
19
28
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@byomakase/omakase-player",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "## Omakase Player - Open source JavaScript framework for building frame accurate video experiences",
|
|
5
5
|
"author": "ByOmakase",
|
|
6
6
|
"homepage": "https://player.byomakase.org",
|