UNPKG

@etherna/sdk-js

Version:

Etherna SDKs for operations on the network

44 lines 1.89 kB
import { MantarayNode } from "../../handlers/mantaray"; import type { ImageType, VideoDetails, VideoPreview, VideoQuality } from "../.."; import type { BatchId, BeeClient, EthAddress, Reference } from "../../clients"; import type { SerializedVideoBuilder, Video, VideoDetailsRaw, VideoPreviewRaw } from "../../schemas/video"; interface VideoBuilderRequestOptions { beeClient: BeeClient; batchId?: BatchId; signal?: AbortSignal; } export declare const VIDEO_PREVIEW_META_PATH = "preview"; export declare const VIDEO_DETAILS_META_PATH = "details"; export declare class VideoBuilder { reference: Reference; previewMeta: VideoPreviewRaw; detailsMeta: VideoDetailsRaw; node: MantarayNode; private queue; constructor(); static Immerable: typeof VideoBuilder; static unimmerable(instance: VideoBuilder): VideoBuilder; initialize(ownerAddress: EthAddress, previewMeta?: VideoPreview, detailsMeta?: VideoDetails): void; loadNode(opts: VideoBuilderRequestOptions): Promise<void>; saveNode(opts: VideoBuilderRequestOptions): Promise<Reference>; addMp4Source(data: Uint8Array): Promise<void>; addAdaptiveSource(type: "dash" | "hls", data: Uint8Array, filename: string, fullSize: number): Promise<void>; removeAdapterSources(type: "dash" | "hls"): void; addThumbnailSource(data: Uint8Array, width: number, type: ImageType): Promise<void>; removeMp4Source(quality: VideoQuality): void; removeThumbnail(): void; getVideo(beeUrl: string): Video; serialize(): SerializedVideoBuilder; deserialize(value: unknown): void; private enqueueData; private addVideoSource; private addFile; private addThumbSource; private getThumbPath; private getVideoPath; private getAdaptivePath; private getSourceContentType; private updateNode; } export {}; //# sourceMappingURL=builder.d.ts.map