From 108316068d7d73e4dc7641d3fcda3ca5e38831a9 Mon Sep 17 00:00:00 2001 From: Dmytro Demchenko <91938357+DimaDemchenko@users.noreply.github.com> Date: Fri, 19 Jul 2024 14:40:03 +0300 Subject: [PATCH] Add files via upload --- .../classes/p2p_media_loader_core.Core.html | 40 +++++++++---------- ...2p_media_loader_core.CoreRequestError.html | 6 +-- .../p2p_media_loader_core.RequestError.html | 8 ++-- ...p2p_media_loader_hlsjs.HlsJsP2PEngine.html | 20 +++++----- ...p2p_media_loader_shaka.ShakaP2PEngine.html | 20 +++++----- docs/v1.0/index.html | 4 +- .../p2p_media_loader_core.ByteRange.html | 2 +- ...2p_media_loader_core.CommonCoreConfig.html | 2 +- .../p2p_media_loader_core.CoreConfig.html | 2 +- .../p2p_media_loader_core.CoreEventMap.html | 2 +- ...p_media_loader_core.DefinedCoreConfig.html | 2 +- .../p2p_media_loader_core.DownloadSource.html | 2 +- ...p_media_loader_core.DynamicCoreConfig.html | 2 +- ...a_loader_core.DynamicStreamProperties.html | 2 +- ...p2p_media_loader_core.EngineCallbacks.html | 2 +- ...edia_loader_core.HttpRequestErrorType.html | 2 +- .../p2p_media_loader_core.PeerDetails.html | 2 +- ...2p_media_loader_core.PeerErrorDetails.html | 2 +- ...edia_loader_core.PeerRequestErrorType.html | 2 +- ...dia_loader_core.RequestAbortErrorType.html | 2 +- ...2p_media_loader_core.RequestErrorType.html | 2 +- .../types/p2p_media_loader_core.Segment.html | 2 +- ...media_loader_core.SegmentAbortDetails.html | 2 +- ...media_loader_core.SegmentErrorDetails.html | 2 +- ..._media_loader_core.SegmentLoadDetails.html | 2 +- ...p2p_media_loader_core.SegmentResponse.html | 2 +- ...media_loader_core.SegmentStartDetails.html | 2 +- ...p_media_loader_core.SegmentWithStream.html | 2 +- .../types/p2p_media_loader_core.Stream.html | 2 +- .../p2p_media_loader_core.StreamConfig.html | 10 +++-- .../p2p_media_loader_core.StreamType.html | 2 +- ..._media_loader_core.StreamWithSegments.html | 2 +- ...media_loader_core.TrackerErrorDetails.html | 2 +- ...dia_loader_core.TrackerWarningDetails.html | 2 +- ...der_hlsjs.DynamicHlsJsP2PEngineConfig.html | 2 +- ...dia_loader_hlsjs.HlsJsP2PEngineConfig.html | 2 +- ...p_media_loader_hlsjs.HlsWithP2PConfig.html | 2 +- ...media_loader_hlsjs.HlsWithP2PInstance.html | 2 +- ...der_hlsjs.PartialHlsJsP2PEngineConfig.html | 2 +- ...der_shaka.DynamicShakaP2PEngineConfig.html | 2 +- ...loader_shaka.PartialShakaEngineConfig.html | 2 +- ...dia_loader_shaka.ShakaP2PEngineConfig.html | 2 +- 42 files changed, 91 insertions(+), 87 deletions(-) diff --git a/docs/v1.0/classes/p2p_media_loader_core.Core.html b/docs/v1.0/classes/p2p_media_loader_core.Core.html index e740194f..ec8dba86 100644 --- a/docs/v1.0/classes/p2p_media_loader_core.Core.html +++ b/docs/v1.0/classes/p2p_media_loader_core.Core.html @@ -157,7 +157,7 @@ --md-sys-color-surface-container-highest: #e9e1d9 }

Core class for managing media streams loading via P2P.

-

Type Parameters

Constructors

Type Parameters

Constructors

Properties

Methods

getConfig @@ -182,57 +182,57 @@

Example

// Create a Core instance using the default configuration.
const core = new Core();
-

Properties

DEFAULT_COMMON_CORE_CONFIG: CommonCoreConfig = ...

Default configuration for common core settings.

-
DEFAULT_STREAM_CONFIG: StreamConfig = ...

Default configuration for stream settings.

-

Methods

Properties

DEFAULT_COMMON_CORE_CONFIG: CommonCoreConfig = ...

Default configuration for common core settings.

+
DEFAULT_STREAM_CONFIG: StreamConfig = ...

Default configuration for stream settings.

+

Methods

  • Applies a set of dynamic configuration updates to the core, merging with the existing configuration.

    +
  • Applies a set of dynamic configuration updates to the core, merging with the existing configuration.

    Parameters

    Returns void

    Example

    // Example of dynamically updating the download time windows and timeout settings.
    const dynamicConfig = {
    httpDownloadTimeWindowMs: 60, // Set HTTP download time window to 60 seconds
    p2pDownloadTimeWindowMs: 60, // Set P2P download time window to 60 seconds
    httpNotReceivingBytesTimeoutMs: 1500, // Set HTTP timeout to 1500 milliseconds
    p2pNotReceivingBytesTimeoutMs: 1500 // Set P2P timeout to 1500 milliseconds
    };
    core.applyDynamicConfig(dynamicConfig);
    -
  • Adds an event listener for the specified event type on the core event target.

    +
  • Adds an event listener for the specified event type on the core event target.

    Type Parameters

    Parameters

    • eventName: K

      The name of the event to listen for.

    • listener: CoreEventMap[K]

      The callback function to invoke when the event is fired.

      -

    Returns void

  • Removes an event listener for the specified event type on the core event target.

    +

Returns void

  • Removes an event listener for the specified event type on the core event target.

    Type Parameters

    Parameters

    • eventName: K

      The name of the event to listen for.

    • listener: CoreEventMap[K]

      The callback function to be removed.

      -

    Returns void

  • Sets the response URL for the manifest, stripping any query parameters.

    +

Returns void

Returns void

Returns void

Returns void

Returns void

Returns void

Returns void

Returns void

Custom error class for errors that occur during core network requests.

-

Hierarchy

  • Error
    • CoreRequestError

Constructors

Hierarchy

  • Error
    • CoreRequestError

Constructors

Properties

Constructors

  • Constructs a new CoreRequestError.

    Parameters

    • type: "failed" | "aborted"

      The type of the error, either 'failed' or 'aborted'.

      -

    Returns CoreRequestError

Properties

type: "failed" | "aborted"

The type of the error, either 'failed' or 'aborted'.

-

Represents an error that can occur during the request process, with a timestamp for when the error occurred.

Type Parameters

Hierarchy

  • Error
    • RequestError

Constructors

Hierarchy

  • Error
    • RequestError

Constructors

Properties

Constructors

Properties

timestamp: number

Error timestamp.

-
type: T

The specific error type.

-
ByteRange: {
    start: number;
    end: number;
}

Represents a range of bytes, used for specifying a segment of data to download.

Type declaration

  • start: number

    The starting byte index of the range.

  • end: number

    The ending byte index of the range.

    -
DefinedCoreConfig: CommonCoreConfig & {
    mainStream: StreamConfig;
    secondaryStream: StreamConfig;
}

Represents a defined Core configuration with specific settings for the main and secondary streams.

Type declaration

  • mainStream: StreamConfig

    Configuration for the main stream.

  • secondaryStream: StreamConfig

    Configuration for the secondary stream.

    -
DownloadSource: "http" | "p2p"

Specifies the source of a download within a media streaming context.

"http" - Indicates that the segment was downloaded using the HTTP protocol.

"p2p"- Indicates that the segment was downloaded through a peer-to-peer network.

-
DynamicStreamProperties: "highDemandTimeWindow" | "httpDownloadTimeWindow" | "p2pDownloadTimeWindow" | "simultaneousHttpDownloads" | "simultaneousP2PDownloads" | "webRtcMaxMessageSize" | "p2pNotReceivingBytesTimeoutMs" | "p2pInactiveLoaderDestroyTimeoutMs" | "httpNotReceivingBytesTimeoutMs" | "httpErrorRetries" | "p2pErrorRetries" | "validateP2PSegment" | "httpRequestSetup" | "isP2PDisabled"

Represents a set of properties that can be dynamically modified at runtime.

-
HttpRequestErrorType: "http-error" | "http-bytes-mismatch" | "http-unexpected-status-code"

Defines the types of errors specific to HTTP requests.

-
PeerDetails: {
    peerId: string;
    streamType: StreamType;
}

Represents the details of a peer in a peer-to-peer network.

Type declaration

  • peerId: string

    The unique identifier for a peer in the network.

  • streamType: StreamType

    The type of stream that the peer is connected to.

    -
PeerRequestErrorType: "peer-response-bytes-length-mismatch" | "peer-protocol-violation" | "peer-segment-absent" | "peer-closed" | "p2p-segment-validation-failed"

Defines the types of errors specific to peer-to-peer requests.

-
RequestAbortErrorType: "abort" | "bytes-receiving-timeout"

Defines the types of errors that can occur during a request abortion process.

-

Enumerates all possible request error types, including HTTP and peer-related errors.

-
SegmentResponse: {
    data: ArrayBuffer;
    bandwidth: number;
}

Represents the response from a segment request, including the data and measured bandwidth.

Type declaration

  • data: ArrayBuffer

    Segment data as an ArrayBuffer.

  • bandwidth: number

    Measured bandwidth for the segment download, in bytes per second.

    -
SegmentWithStream<TStream>: Segment & {
    stream: StreamWithSegments<TStream>;
}

Extends a Segment with a reference to its associated stream.

-

Type Parameters

Type declaration

StreamType: "main" | "secondary"

Represents the types of streams available, either primary (main) or secondary.

-
StreamWithSegments<TStream>: TStream & {
    segments: Map<string, SegmentWithStream<TStream>>;
}

Represents a stream that includes multiple segments, each associated with the stream.

Type Parameters

  • TStream extends Stream = Stream

    Type of the underlying stream data structure.

    -

Type declaration

TrackerErrorDetails: {
    streamType: StreamType;
    error: unknown;
}

Represents the details of a tracker error event.

Type declaration

  • streamType: StreamType

    The type of stream that the tracker is for.

  • error: unknown

    The error that occurred during the tracker request.

    -
TrackerWarningDetails: {
    streamType: StreamType;
    warning: unknown;
}

Type declaration

  • streamType: StreamType

    The type of stream that the tracker is for.

  • warning: unknown

    The warning that occurred during the tracker request.

    -
DynamicHlsJsP2PEngineConfig: {
    core?: DynamicCoreConfig;
}

Type for specifying dynamic configuration options that can be changed at runtime for the P2P engine's core.

Type declaration

HlsJsP2PEngineConfig: {
    core: CoreConfig;
}

Represents the complete configuration for HlsJsP2PEngine.

Type declaration

HlsWithP2PConfig<HlsType>: ConstructorParameters<HlsType>[0] & {
    p2p?: PartialHlsJsP2PEngineConfig & {
        onHlsJsCreated?: ((hls) => void);
    };
}

Configuration type for HLS instances that includes P2P settings, augmenting standard HLS configuration with P2P capabilities.

Type Parameters

  • HlsType extends (abstract new () => unknown)

    A constructor type that produces an HLS instance.

    -

Type declaration

HlsWithP2PInstance<HlsType>: HlsType & {
    p2pEngine: HlsJsP2PEngine;
}

Extends a generic HLS type to include the P2P engine, integrating P2P capabilities directly into the HLS instance.

Type Parameters

  • HlsType

    The base HLS type that is being extended.

Type declaration

PartialHlsJsP2PEngineConfig: Partial<Omit<HlsJsP2PEngineConfig, "core">> & {
    core?: Partial<CoreConfig>;
}

Allows for partial configuration of HlsJsP2PEngine, useful for providing overrides or partial updates.

Type declaration

  • Optional core?: Partial<CoreConfig>

    Partial core config

    -
DynamicShakaP2PEngineConfig: {
    core?: DynamicCoreConfig;
}

Type for specifying dynamic configuration options that can be changed at runtime for the P2P engine's core.

Type declaration

PartialShakaEngineConfig: Partial<Omit<ShakaP2PEngineConfig, "core">> & {
    core?: Partial<CoreConfig>;
}

Allows for partial configuration settings for the Shaka P2P Engine.

Type declaration

  • Optional core?: Partial<CoreConfig>

    Partial core config

    -
ShakaP2PEngineConfig: {
    core: CoreConfig;
}

Represents the complete configuration for ShakaP2PEngine.

Type declaration