@byomakase/omakase-react-components 0.0.1-SNAPSHOT.1743070950
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/LICENSE +204 -0
- package/README.md +3 -0
- package/dist/index.cjs.js +213 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.es.d.ts +2 -0
- package/dist/index.es.js +3959 -0
- package/dist/index.es.js.map +1 -0
- package/dist/index.umd.js +213 -0
- package/dist/index.umd.js.map +1 -0
- package/dist/omakase-react-components.css +1 -0
- package/dist/react/omakase-components/src/components/OmakaseMarkerListComponent/OmakaseMarkerListComponent.d.ts +10 -0
- package/dist/react/omakase-components/src/components/OmakaseMarkerListComponent/index.d.ts +1 -0
- package/dist/react/omakase-components/src/components/OmakasePlayerComponent/OmakasePlayerComponent.d.ts +12 -0
- package/dist/react/omakase-components/src/components/OmakasePlayerComponent/OmakasePlayerHotKeyHandler.d.ts +5 -0
- package/dist/react/omakase-components/src/components/OmakasePlayerComponent/index.d.ts +1 -0
- package/dist/react/omakase-components/src/components/OmakasePlayerTimelineComponent/OmakasePlayerTimelineComponent.d.ts +9 -0
- package/dist/react/omakase-components/src/components/OmakasePlayerTimelineComponent/OmaksePlayerTimelineBuilder.d.ts +21 -0
- package/dist/react/omakase-components/src/components/OmakasePlayerTimelineComponent/index.d.ts +2 -0
- package/dist/react/omakase-components/src/components/OmakasePlayerTimelineControlsToolbar/OmakaseButton.d.ts +12 -0
- package/dist/react/omakase-components/src/components/OmakasePlayerTimelineControlsToolbar/OmakasePlayerTimelineControlsToolbar.d.ts +25 -0
- package/dist/react/omakase-components/src/components/OmakasePlayerTimelineControlsToolbar/index.d.ts +1 -0
- package/dist/react/omakase-components/src/components/OmakaseTamsPlayerComponent/OmakaseTamsPlayerComponent.d.ts +17 -0
- package/dist/react/omakase-components/src/components/OmakaseTamsPlayerComponent/index.d.ts +1 -0
- package/dist/react/omakase-components/src/components/OmakaseTamsPlayerComponent/virtual-manifest/m3u8-exporter.d.ts +2 -0
- package/dist/react/omakase-components/src/components/OmakaseTamsPlayerComponent/virtual-manifest/m3u8.d.ts +79 -0
- package/dist/react/omakase-components/src/components/OmakaseTamsPlayerComponent/virtual-manifest/m3u8.model.d.ts +127 -0
- package/dist/react/omakase-components/src/components/OmakaseTimeRangePicker/OmakaseTimeRangePicker.d.ts +11 -0
- package/dist/react/omakase-components/src/components/OmakaseTimeRangePicker/index.d.ts +1 -0
- package/dist/react/omakase-components/src/components/index.d.ts +7 -0
- package/dist/react/omakase-components/src/icons/Back3Icon.d.ts +3 -0
- package/dist/react/omakase-components/src/icons/DeleteMarkerIcon.d.ts +3 -0
- package/dist/react/omakase-components/src/icons/Forward3Icon.d.ts +3 -0
- package/dist/react/omakase-components/src/icons/LeftBracketIcon.d.ts +3 -0
- package/dist/react/omakase-components/src/icons/LeftDoubleBracketIcon.d.ts +3 -0
- package/dist/react/omakase-components/src/icons/LeftMarkerIcon.d.ts +3 -0
- package/dist/react/omakase-components/src/icons/PlusIcon.d.ts +3 -0
- package/dist/react/omakase-components/src/icons/RefreshIcon.d.ts +3 -0
- package/dist/react/omakase-components/src/icons/RightBracketIcon.d.ts +3 -0
- package/dist/react/omakase-components/src/icons/RightDoubleBracketIcon.d.ts +3 -0
- package/dist/react/omakase-components/src/icons/RightMarkerIcon.d.ts +3 -0
- package/dist/react/omakase-components/src/icons/SplitMarkerIcon.d.ts +3 -0
- package/dist/react/omakase-components/src/icons/index.d.ts +1 -0
- package/dist/react/omakase-components/src/index.d.ts +3 -0
- package/dist/react/omakase-components/src/types/tams/index.d.ts +1 -0
- package/dist/react/omakase-components/src/types/tams/model/audio-codec-parameters.d.ts +19 -0
- package/dist/react/omakase-components/src/types/tams/model/audio-flow-essence-parameters.d.ts +21 -0
- package/dist/react/omakase-components/src/types/tams/model/audio-flow.d.ts +104 -0
- package/dist/react/omakase-components/src/types/tams/model/avc-codec-parameters.d.ts +23 -0
- package/dist/react/omakase-components/src/types/tams/model/collection-item.d.ts +15 -0
- package/dist/react/omakase-components/src/types/tams/model/container-mapping-audio-track.d.ts +22 -0
- package/dist/react/omakase-components/src/types/tams/model/container-mapping-isobmff-container.d.ts +18 -0
- package/dist/react/omakase-components/src/types/tams/model/container-mapping-mp2ts-container.d.ts +18 -0
- package/dist/react/omakase-components/src/types/tams/model/container-mapping-mxf-container.d.ts +22 -0
- package/dist/react/omakase-components/src/types/tams/model/container-mapping.d.ts +21 -0
- package/dist/react/omakase-components/src/types/tams/model/container-mapping1.d.ts +21 -0
- package/dist/react/omakase-components/src/types/tams/model/contentformat.d.ts +19 -0
- package/dist/react/omakase-components/src/types/tams/model/data-flow-essence-parameters.d.ts +18 -0
- package/dist/react/omakase-components/src/types/tams/model/data-flow.d.ts +104 -0
- package/dist/react/omakase-components/src/types/tams/model/deletion-request-error.d.ts +30 -0
- package/dist/react/omakase-components/src/types/tams/model/deletion-request.d.ts +56 -0
- package/dist/react/omakase-components/src/types/tams/model/event-stream-mechanism.d.ts +26 -0
- package/dist/react/omakase-components/src/types/tams/model/flow-core-segment-duration.d.ts +22 -0
- package/dist/react/omakase-components/src/types/tams/model/flow-segment-get-urls-inner.d.ts +19 -0
- package/dist/react/omakase-components/src/types/tams/model/flow-segment.d.ts +38 -0
- package/dist/react/omakase-components/src/types/tams/model/flow-segment1.d.ts +38 -0
- package/dist/react/omakase-components/src/types/tams/model/flow-storage-post.d.ts +18 -0
- package/dist/react/omakase-components/src/types/tams/model/flow.d.ts +14 -0
- package/dist/react/omakase-components/src/types/tams/model/http-request.d.ts +32 -0
- package/dist/react/omakase-components/src/types/tams/model/image-flow-essence-parameters.d.ts +19 -0
- package/dist/react/omakase-components/src/types/tams/model/image-flow.d.ts +104 -0
- package/dist/react/omakase-components/src/types/tams/model/media-bucket-object-store-media-objects-inner.d.ts +12 -0
- package/dist/react/omakase-components/src/types/tams/model/media-bucket-object-store-pre-inner.d.ts +19 -0
- package/dist/react/omakase-components/src/types/tams/model/media-bucket-object-store.d.ts +16 -0
- package/dist/react/omakase-components/src/types/tams/model/models.d.ts +41 -0
- package/dist/react/omakase-components/src/types/tams/model/multi-essence-flow.d.ts +102 -0
- package/dist/react/omakase-components/src/types/tams/model/register-webhook.d.ts +50 -0
- package/dist/react/omakase-components/src/types/tams/model/register-webhook1.d.ts +50 -0
- package/dist/react/omakase-components/src/types/tams/model/service-media-store.d.ts +24 -0
- package/dist/react/omakase-components/src/types/tams/model/service.d.ts +32 -0
- package/dist/react/omakase-components/src/types/tams/model/source.d.ts +61 -0
- package/dist/react/omakase-components/src/types/tams/model/uncompressed-audio-parameters.d.ts +23 -0
- package/dist/react/omakase-components/src/types/tams/model/uncompressed-video-parameters.d.ts +36 -0
- package/dist/react/omakase-components/src/types/tams/model/update-service-info.d.ts +22 -0
- package/dist/react/omakase-components/src/types/tams/model/video-flow-essence-parameters-aspect-ratio.d.ts +22 -0
- package/dist/react/omakase-components/src/types/tams/model/video-flow-essence-parameters-frame-rate.d.ts +22 -0
- package/dist/react/omakase-components/src/types/tams/model/video-flow-essence-parameters-pixel-aspect-ratio.d.ts +22 -0
- package/dist/react/omakase-components/src/types/tams/model/video-flow-essence-parameters.d.ts +78 -0
- package/dist/react/omakase-components/src/types/tams/model/video-flow.d.ts +104 -0
- package/dist/react/omakase-components/src/types/user-agent.d.ts +2 -0
- package/dist/react/omakase-components/src/util/array-util.d.ts +3 -0
- package/dist/react/omakase-components/src/util/blob-util.d.ts +7 -0
- package/dist/react/omakase-components/src/util/color-util.d.ts +21 -0
- package/dist/react/omakase-components/src/util/crypto-util.d.ts +3 -0
- package/dist/react/omakase-components/src/util/frame-rate-util.d.ts +3 -0
- package/dist/react/omakase-components/src/util/object-util.d.ts +1 -0
- package/dist/react/omakase-components/src/util/player-util.d.ts +3 -0
- package/dist/react/omakase-components/src/util/rxjs-util.d.ts +2 -0
- package/dist/react/omakase-components/src/util/string-util.d.ts +9 -0
- package/dist/react/omakase-components/src/util/time-range-util.d.ts +38 -0
- package/dist/react/omakase-components/src/util/timecode-util.d.ts +10 -0
- package/dist/react/omakase-components/src/util/window-util.d.ts +6 -0
- package/dist/react/omakase-components/vite.config.d.ts +2 -0
- package/package.json +32 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Time-addressable Media Store
|
|
3
|
+
*
|
|
4
|
+
* Contact: cloudfit-opensource@rd.bbc.co.uk
|
|
5
|
+
*
|
|
6
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
7
|
+
* https://openapi-generator.tech
|
|
8
|
+
* Do not edit the class manually.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* The pixel aspect ratio. This is usually 1:1 (i.e. square pixels) for modern video. Some, usually older, video formats use non-square pixels e.g. some Standard Definition video. This is where that may be indicated.
|
|
12
|
+
*/
|
|
13
|
+
export interface VideoFlowEssenceParametersPixelAspectRatio {
|
|
14
|
+
/**
|
|
15
|
+
* numerator
|
|
16
|
+
*/
|
|
17
|
+
numerator: number;
|
|
18
|
+
/**
|
|
19
|
+
* denominator
|
|
20
|
+
*/
|
|
21
|
+
denominator: number;
|
|
22
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { VideoFlowEssenceParametersFrameRate } from './video-flow-essence-parameters-frame-rate';
|
|
2
|
+
import { AVCCodecParameters } from './avc-codec-parameters';
|
|
3
|
+
import { VideoFlowEssenceParametersAspectRatio } from './video-flow-essence-parameters-aspect-ratio';
|
|
4
|
+
import { VideoFlowEssenceParametersPixelAspectRatio } from './video-flow-essence-parameters-pixel-aspect-ratio';
|
|
5
|
+
import { UncompressedVideoParameters } from './uncompressed-video-parameters';
|
|
6
|
+
/**
|
|
7
|
+
* Describes the parameters of the essence inside this video Flow
|
|
8
|
+
*/
|
|
9
|
+
export interface VideoFlowEssenceParameters {
|
|
10
|
+
frame_rate?: VideoFlowEssenceParametersFrameRate;
|
|
11
|
+
/**
|
|
12
|
+
* The width of the picture in pixels.
|
|
13
|
+
*/
|
|
14
|
+
frame_width: number;
|
|
15
|
+
/**
|
|
16
|
+
* The height of the picture in pixels.
|
|
17
|
+
*/
|
|
18
|
+
frame_height: number;
|
|
19
|
+
/**
|
|
20
|
+
* The number of significant bits used to represent the video component sample. If codec is `video/raw`, bit_depth must be set.
|
|
21
|
+
*/
|
|
22
|
+
bit_depth?: number;
|
|
23
|
+
/**
|
|
24
|
+
* Interlaced video mode for frames in this Flow
|
|
25
|
+
*/
|
|
26
|
+
interlace_mode?: VideoFlowEssenceParameters.InterlaceModeEnum;
|
|
27
|
+
/**
|
|
28
|
+
* Colorspace used for the video
|
|
29
|
+
*/
|
|
30
|
+
colorspace?: VideoFlowEssenceParameters.ColorspaceEnum;
|
|
31
|
+
/**
|
|
32
|
+
* Transfer characteristic
|
|
33
|
+
*/
|
|
34
|
+
transfer_characteristic?: VideoFlowEssenceParameters.TransferCharacteristicEnum;
|
|
35
|
+
aspect_ratio?: VideoFlowEssenceParametersAspectRatio;
|
|
36
|
+
pixel_aspect_ratio?: VideoFlowEssenceParametersPixelAspectRatio;
|
|
37
|
+
/**
|
|
38
|
+
* Picture component representation.
|
|
39
|
+
*/
|
|
40
|
+
component_type?: VideoFlowEssenceParameters.ComponentTypeEnum;
|
|
41
|
+
/**
|
|
42
|
+
* Horizontal chroma component sub-sampling. When unc_type is set to a YUV type, horiz_chroma_subs must be set.
|
|
43
|
+
*/
|
|
44
|
+
horiz_chroma_subs?: number;
|
|
45
|
+
/**
|
|
46
|
+
* Vertical chroma component sub-sampling. When unc_type is set to a YUV type, vert_chroma_subs must be set.
|
|
47
|
+
*/
|
|
48
|
+
vert_chroma_subs?: number;
|
|
49
|
+
unc_parameters?: UncompressedVideoParameters;
|
|
50
|
+
avc_parameters?: AVCCodecParameters;
|
|
51
|
+
}
|
|
52
|
+
export declare namespace VideoFlowEssenceParameters {
|
|
53
|
+
type InterlaceModeEnum = 'progressive' | 'interlaced_tff' | 'interlaced_bff' | 'interlaced_psf';
|
|
54
|
+
const InterlaceModeEnum: {
|
|
55
|
+
Progressive: InterlaceModeEnum;
|
|
56
|
+
InterlacedTff: InterlaceModeEnum;
|
|
57
|
+
InterlacedBff: InterlaceModeEnum;
|
|
58
|
+
InterlacedPsf: InterlaceModeEnum;
|
|
59
|
+
};
|
|
60
|
+
type ColorspaceEnum = 'BT601' | 'BT709' | 'BT2020' | 'BT2100';
|
|
61
|
+
const ColorspaceEnum: {
|
|
62
|
+
Bt601: ColorspaceEnum;
|
|
63
|
+
Bt709: ColorspaceEnum;
|
|
64
|
+
Bt2020: ColorspaceEnum;
|
|
65
|
+
Bt2100: ColorspaceEnum;
|
|
66
|
+
};
|
|
67
|
+
type TransferCharacteristicEnum = 'SDR' | 'HLG' | 'PQ';
|
|
68
|
+
const TransferCharacteristicEnum: {
|
|
69
|
+
Sdr: TransferCharacteristicEnum;
|
|
70
|
+
Hlg: TransferCharacteristicEnum;
|
|
71
|
+
Pq: TransferCharacteristicEnum;
|
|
72
|
+
};
|
|
73
|
+
type ComponentTypeEnum = 'YCbCr' | 'RGB';
|
|
74
|
+
const ComponentTypeEnum: {
|
|
75
|
+
YcbCr: ComponentTypeEnum;
|
|
76
|
+
Rgb: ComponentTypeEnum;
|
|
77
|
+
};
|
|
78
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { FlowCoreSegmentDuration } from './flow-core-segment-duration';
|
|
2
|
+
import { ContainerMapping1 } from './container-mapping1';
|
|
3
|
+
import { VideoFlowEssenceParameters } from './video-flow-essence-parameters';
|
|
4
|
+
import { CollectionItem } from './collection-item';
|
|
5
|
+
/**
|
|
6
|
+
* Describes a video Flow
|
|
7
|
+
*/
|
|
8
|
+
export interface VideoFlow {
|
|
9
|
+
/**
|
|
10
|
+
* Flow identifier
|
|
11
|
+
*/
|
|
12
|
+
id: string;
|
|
13
|
+
/**
|
|
14
|
+
* Source identifier
|
|
15
|
+
*/
|
|
16
|
+
source_id: string;
|
|
17
|
+
/**
|
|
18
|
+
* Freeform string label for the flow
|
|
19
|
+
*/
|
|
20
|
+
label?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Freeform text describing the flow
|
|
23
|
+
*/
|
|
24
|
+
description?: string;
|
|
25
|
+
/**
|
|
26
|
+
* A string identifier for the entity that created the flow. Implementations SHOULD set suitable default values for `created_by` based on the principal accessing the system, and MAY permit clients to edit the value, subject to suitable permissions-based limitations.
|
|
27
|
+
*/
|
|
28
|
+
created_by?: string;
|
|
29
|
+
/**
|
|
30
|
+
* A string identifier for the entity that updated the flow metadata most recently. Implementations SHOULD set suitable default values for `updated_by` based on the principal accessing the system, and MAY permit clients to edit the value, subject to suitable permissions-based limitations.
|
|
31
|
+
*/
|
|
32
|
+
updated_by?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Key value is a freeform string.
|
|
35
|
+
*/
|
|
36
|
+
tags?: {
|
|
37
|
+
[key: string]: string;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* A change to the flow metadata, not including metadata_version, last_update or segments, results in a new version. If the metadata_version for flow instances is identical then the metadata is identical.
|
|
41
|
+
*/
|
|
42
|
+
metadata_version?: string;
|
|
43
|
+
/**
|
|
44
|
+
* An indication of how many lossy encodings the flow content has been through. A flow with a higher generation may contain less of the original information than a flow with a lower generation.
|
|
45
|
+
*/
|
|
46
|
+
generation?: number;
|
|
47
|
+
/**
|
|
48
|
+
* The date-time the flow was created in a given context, e.g. in the store. Implementations SHOULD ignore this if given in a PUT request, and instead manage it internally
|
|
49
|
+
*/
|
|
50
|
+
created?: string;
|
|
51
|
+
/**
|
|
52
|
+
* The date-time the flow metadata was updated in a given context, e.g. in the store. Implementations SHOULD ignore this if given in a PUT request, and instead manage it internally
|
|
53
|
+
*/
|
|
54
|
+
metadata_updated?: string;
|
|
55
|
+
/**
|
|
56
|
+
* The date-time the flow segments were updated in a given context, e.g. in the store. Implementations SHOULD ignore this if given in a PUT request, and instead manage it internally
|
|
57
|
+
*/
|
|
58
|
+
segments_updated?: string;
|
|
59
|
+
/**
|
|
60
|
+
* If set to \'true\', implementations SHOULD reject client requests to update Flow metadata (other than the read_only property), Flow Segments and media objects
|
|
61
|
+
*/
|
|
62
|
+
read_only?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* A MIME type identification of the (lossy or lossless) coding used for the flow content.
|
|
65
|
+
*/
|
|
66
|
+
codec?: string;
|
|
67
|
+
/**
|
|
68
|
+
* The container MIME type for flow segments.
|
|
69
|
+
*/
|
|
70
|
+
container?: string;
|
|
71
|
+
/**
|
|
72
|
+
* The average bit rate of the flow segments in 1000 bits/second. A precise definition can be found in the [Setting Flow Bit Rate Properties](https://github.com/bbc/tams/blob/main/docs/appnotes/0013-setting-flow-bit-rate-properties.md) AppNote.
|
|
73
|
+
*/
|
|
74
|
+
avg_bit_rate?: number;
|
|
75
|
+
/**
|
|
76
|
+
* The maximum bit rate of the flow segments in 1000 bits/second. A precise definition can be found in the [Setting Flow Bit Rate Properties](https://github.com/bbc/tams/blob/main/docs/appnotes/0013-setting-flow-bit-rate-properties.md) AppNote.
|
|
77
|
+
*/
|
|
78
|
+
max_bit_rate?: number;
|
|
79
|
+
segment_duration?: FlowCoreSegmentDuration;
|
|
80
|
+
/**
|
|
81
|
+
* The timerange of samples available in the flow, as described by the [TimeRange](../schemas/timerange#top) type
|
|
82
|
+
*/
|
|
83
|
+
timerange?: string;
|
|
84
|
+
/**
|
|
85
|
+
* List of Flows that are collected together by this Flow.
|
|
86
|
+
*/
|
|
87
|
+
flow_collection?: Array<CollectionItem>;
|
|
88
|
+
/**
|
|
89
|
+
* Flows that reference this Flow to include it in a collection. This attribute is intended to be read-only. Implementations SHOULD ignore this if given in a PUT request, and instead manage it internally
|
|
90
|
+
*/
|
|
91
|
+
collected_by?: Array<string>;
|
|
92
|
+
container_mapping?: ContainerMapping1;
|
|
93
|
+
/**
|
|
94
|
+
* The primary content type URN for the flow.
|
|
95
|
+
*/
|
|
96
|
+
format: VideoFlow.FormatEnum;
|
|
97
|
+
essence_parameters: VideoFlowEssenceParameters;
|
|
98
|
+
}
|
|
99
|
+
export declare namespace VideoFlow {
|
|
100
|
+
type FormatEnum = 'urn:x-nmos:format:video';
|
|
101
|
+
const FormatEnum: {
|
|
102
|
+
UrnxNmosformatvideo: FormatEnum;
|
|
103
|
+
};
|
|
104
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare class ColorUtil {
|
|
2
|
+
static randomHexColor(): string;
|
|
3
|
+
static inverseFillGradient(gradient: (string | number)[]): (string | number)[];
|
|
4
|
+
static hexToRgb(hex: string): {
|
|
5
|
+
r: number;
|
|
6
|
+
g: number;
|
|
7
|
+
b: number;
|
|
8
|
+
} | undefined;
|
|
9
|
+
static getLuminance({ r, g, b }: {
|
|
10
|
+
r: number;
|
|
11
|
+
g: number;
|
|
12
|
+
b: number;
|
|
13
|
+
}): number;
|
|
14
|
+
static rgbToHex({ r, g, b }: {
|
|
15
|
+
r: number;
|
|
16
|
+
g: number;
|
|
17
|
+
b: number;
|
|
18
|
+
}): string;
|
|
19
|
+
static isLightColor(hex: string): boolean;
|
|
20
|
+
static lightenColor(hex: string, percent: number): string;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isNullOrUndefined(value: any): boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare class StringUtil {
|
|
2
|
+
static isNullUndefinedOrWhitespace(value: string | undefined | null): boolean;
|
|
3
|
+
static isNonEmpty(value: string | undefined | null): boolean;
|
|
4
|
+
static endsWith(value: string, suffix: string): boolean;
|
|
5
|
+
static toMixedCase(value: string): string;
|
|
6
|
+
static replaceWhitespace(searchValue: string, replaceValue: string): string;
|
|
7
|
+
static whitespacesToCommas(searchValue: string): string;
|
|
8
|
+
static tokenizeWhitespaceSeparated(value: string): string[] | undefined;
|
|
9
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export interface AuthResponse {
|
|
2
|
+
access_token: string;
|
|
3
|
+
expires_in: number;
|
|
4
|
+
token_type: string;
|
|
5
|
+
}
|
|
6
|
+
export interface AuthSession {
|
|
7
|
+
authResponse: AuthResponse;
|
|
8
|
+
refreshAtLatestByUtcTimestamp: number;
|
|
9
|
+
expiresUtcTimestamp: number;
|
|
10
|
+
}
|
|
11
|
+
export type TimeMoment = [number, number];
|
|
12
|
+
export interface TimeRange {
|
|
13
|
+
start?: TimeMoment;
|
|
14
|
+
end?: TimeMoment;
|
|
15
|
+
isStartInclusive: boolean;
|
|
16
|
+
isEndInclusive: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare class TimeRangeUtil {
|
|
19
|
+
private static timeRangePattern;
|
|
20
|
+
static parseTimeMoment(timeMomentText: string): TimeMoment;
|
|
21
|
+
static parseTimeRange(timeRangeStr: string): TimeRange;
|
|
22
|
+
static timeMomentToSeconds(timeMoment: TimeMoment): number;
|
|
23
|
+
static timeMomentToMilliseconds(timeMoment: TimeMoment): number;
|
|
24
|
+
static timeMomentToDate(timeMoment: TimeMoment): Date;
|
|
25
|
+
static formatTimeMomentToTimecodeText(timeMoment: TimeMoment, frameRateFraction: string, audioOnly?: boolean): string;
|
|
26
|
+
static formatTimerangeToTimecodeText(timerange: string, frameRateFraction: string, audioOnly?: boolean): string;
|
|
27
|
+
static nanosecondsToSeconds(nanoseconds: number): number;
|
|
28
|
+
static nanosecondsToTimeMoment(nanoseconds: number): TimeMoment;
|
|
29
|
+
static secondsToTimeMoment(seconds: number): TimeMoment;
|
|
30
|
+
static timerangeExprDuration(timerange: string): number;
|
|
31
|
+
static timeRangeDuration(timeRange: TimeRange): number;
|
|
32
|
+
static formatTimeMomentExpr(timeMoment: TimeMoment): string;
|
|
33
|
+
static formatNanosecondsToTimeMomentExpr(nanoseconds: number): string;
|
|
34
|
+
static toTimeRange(start?: TimeMoment, end?: TimeMoment, isStartInclusive?: boolean, isEndInclusive?: boolean): TimeRange;
|
|
35
|
+
static formatTimeRangeExpr(timeRange: TimeRange): string;
|
|
36
|
+
static timerangeDuration(timerangeExpr: string): number;
|
|
37
|
+
private static padZero;
|
|
38
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare class TimecodeUtil {
|
|
2
|
+
static formatToTimecode(time: number, frameRate: number, audioOnly?: boolean): string;
|
|
3
|
+
static formatTimecodeText(hours: number, minutes: number, seconds: number, frames: number, audioOnly?: boolean): string;
|
|
4
|
+
/**
|
|
5
|
+
* Fast padding
|
|
6
|
+
* @param num
|
|
7
|
+
* @private
|
|
8
|
+
*/
|
|
9
|
+
private static padZero;
|
|
10
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare class WindowUtil {
|
|
2
|
+
static resetCursorStyle(): void;
|
|
3
|
+
static cursor(cursor: 'default' | 'pointer' | 'grab' | 'grabbing' | 'ew-resize' | 'col-resize'): void;
|
|
4
|
+
static open(url: string, target?: '_self' | '_blank' | '_parent' | '_top' | '_unfencedTop', features?: string): WindowProxy | undefined;
|
|
5
|
+
static close(): void;
|
|
6
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@byomakase/omakase-react-components",
|
|
3
|
+
"version": "0.0.1-SNAPSHOT.1743070950",
|
|
4
|
+
"description": "Omakase Player React.js wrapped components",
|
|
5
|
+
"main": "./dist/index.cjs.js",
|
|
6
|
+
"module": "./dist/index.es.js",
|
|
7
|
+
"types": "./dist/index.es.d.ts",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"build": "vite build",
|
|
10
|
+
"build:prod": "rm -rf dist && tsc --noEmit && vite build --mode production"
|
|
11
|
+
},
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "https://github.com/byomakase/omakase-player-utils.git"
|
|
15
|
+
},
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"@types/node": "^22.13.13",
|
|
18
|
+
"@types/react": "^19.0.0",
|
|
19
|
+
"@types/react-dom": "^19.0.4",
|
|
20
|
+
"typescript": "^5.7.3",
|
|
21
|
+
"vite": "^6.2.0",
|
|
22
|
+
"vite-plugin-dts": "^4.5.0"
|
|
23
|
+
},
|
|
24
|
+
"peerDependencies": {
|
|
25
|
+
"@byomakase/omakase-player": "0.15.1-SNAPSHOT.1742994494",
|
|
26
|
+
"react": "^18.3.1"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"decimal.js": "^10.5.0",
|
|
30
|
+
"rxjs": "7.8.1"
|
|
31
|
+
}
|
|
32
|
+
}
|