amazon-ivs-player
Advanced tools
Comparing version 1.19.0 to 1.20.0
@@ -1,2 +0,1 @@ | ||
/// <reference types="emscripten" /> | ||
@@ -18,69 +17,2 @@ /** | ||
/** | ||
* Represents a contiguous range of playable media. | ||
* @public | ||
*/ | ||
declare interface BufferRange_2 { | ||
/** | ||
* The start of the buffered range, in seconds. | ||
*/ | ||
start: number; | ||
/** | ||
* The end of the buffered range, in seconds. | ||
*/ | ||
end: number; | ||
} | ||
declare interface CachedState { | ||
[index: string]: unknown; // Allows CachedState to be typed as Record<string, unknown> | ||
averageBitrate: number; | ||
bandwidthEstimate: number; | ||
bufferedPosition: number; | ||
looping: boolean; | ||
liveLatency: number; | ||
autoQualityMode: boolean; | ||
state: PlayerState_2; | ||
quality: Quality_2; | ||
qualities: Quality_2[]; | ||
duration: number; | ||
path: string; | ||
position: number; | ||
protocol: string; | ||
startOffset: number; | ||
sessionId: string | undefined; | ||
sessionData: SessionData_2; | ||
volume: number; | ||
liveLowLatencyEnabled: boolean; | ||
// Set to true if Core starts in low-latency mode, false otherwise | ||
liveLowLatency: boolean; | ||
statistics: VideoStatistics; | ||
// Cached source buffer ranges | ||
trackBufferedRanges: TrackBufferedRanges_2; | ||
} | ||
declare interface CachedState_2 { | ||
[index: string]: unknown; | ||
averageBitrate: number; | ||
bandwidthEstimate: number; | ||
bufferedPosition: number; | ||
looping: boolean; | ||
liveLatency: number; | ||
autoQualityMode: boolean; | ||
state: PlayerState; | ||
quality: Quality; | ||
qualities: Quality[]; | ||
duration: number; | ||
path: string; | ||
position: number; | ||
protocol: string; | ||
startOffset: number; | ||
sessionId: string | undefined; | ||
sessionData: SessionData; | ||
volume: number; | ||
liveLowLatencyEnabled: boolean; | ||
liveLowLatency: boolean; | ||
statistics: VideoStatistics_2; | ||
trackBufferedRanges: TrackBufferedRanges; | ||
} | ||
export declare interface CaptureEventMap { | ||
@@ -165,4 +97,4 @@ | ||
/** | ||
* A class implementing the [[Player]] interface. Do not instantiate this class directly; instead, use the factory | ||
* [[create]] function. | ||
* A class implementing the {@link Player} interface. Do not instantiate this class directly; instead, use the factory | ||
* {@link create} function. | ||
* @public | ||
@@ -259,3 +191,3 @@ */ | ||
* | ||
* Listen to events with [[Player.addEventListener]]. | ||
* Listen to events with {@link Player.addEventListener} | ||
* @event | ||
@@ -272,3 +204,3 @@ */ | ||
* @deprecated | ||
* Use {@link PlayerEventType.TEXT_CUES} instead. | ||
* Use {@link PlayerEventType.TEXT_CUE} instead. | ||
* @param payload - `Object` Caption info | ||
@@ -295,3 +227,3 @@ * @event | ||
/** | ||
* Maps [[MetadataEventType]] event names to their payload values. | ||
* Maps {@link MetadataEventType} event names to their payload values. | ||
* All metadata events return `void`. | ||
@@ -306,3 +238,2 @@ */ | ||
* An interface describing the API of the media player. | ||
* | ||
* Create a player instance with the {@link create} function. The player's APIs are generally | ||
@@ -312,3 +243,3 @@ * asynchronous when setting and synchronous when getting. Listen to events via | ||
*/ | ||
declare interface Player { | ||
export declare interface Player { | ||
/** | ||
@@ -318,3 +249,3 @@ * Adds an event listener to the player. | ||
* | ||
* Remove listeners with [[Player.removeEventListener]]. | ||
* Remove listeners with {@link Player.removeEventListener}. | ||
* @param name - The name of the event. Available events include {@link PlayerState} events and | ||
@@ -575,4 +506,2 @@ * {@link PlayerEventType} events. | ||
* For a live stream, returns the latency from the server to the player. Note: For non-live streams, this value is not meaningful. | ||
* | ||
* This API is not supported on iOS mobile (iPhone) browsers. | ||
* @returns the latency in seconds. | ||
@@ -653,3 +582,3 @@ */ | ||
* @deprecated | ||
* This can be set after construction using [[Player.setLogLevel]]. | ||
* This can be set after construction using {@link Player.setLogLevel}. | ||
*/ | ||
@@ -666,9 +595,9 @@ logLevel?: LogLevel; | ||
/** | ||
* An interface describing the payload of the [[PlayerEventType.ERROR]] event. The interface | ||
* An interface describing the payload of the {@link PlayerEventType.ERROR} event. The interface | ||
* has properties that can uniquely identify the error. | ||
* | ||
* Some valuable errors to handle: | ||
* * source: MasterPlaylist type: [[ErrorType.AUTHORIZATION]] code: 403 - This is a private stream and viewer authorization is missing or invalid. | ||
* * source: MasterPlaylist type: [[ErrorType.NOT_AVAILABLE]] code: 429 - The concurrent-viewers limit has been reached. See [Amazon IVS Service Quotas](https://docs.aws.amazon.com/ivs/latest/userguide/SQ.html). | ||
* * source: MasterPlaylist type: [[ErrorType.NOT_AVAILABLE]] code: 404 - The stream is invalid (e.g., the playback URL is incorrect) or not online. | ||
* * source: MasterPlaylist type: {@link ErrorType.AUTHORIZATION} code: 403 - This is a private stream and viewer authorization is missing or invalid. | ||
* * source: MasterPlaylist type: {@link ErrorType.NOT_AVAILABLE} code: 429 - The concurrent-viewers limit has been reached. See [Amazon IVS Service Quotas](https://docs.aws.amazon.com/ivs/latest/userguide/SQ.html). | ||
* * source: MasterPlaylist type: {@link ErrorType.NOT_AVAILABLE} code: 404 - The stream is invalid (e.g., the playback URL is incorrect) or not online. | ||
* @public | ||
@@ -684,3 +613,3 @@ */ | ||
* source and result types. For example, if source is "Segment", the result is | ||
* [[ErrorType.NETWORK]], and the code value is 400, this indicates that an HTTP 400 | ||
* {@link ErrorType.NETWORK}, and the code value is 400, this indicates that an HTTP 400 | ||
* error occurred while trying to download a video segment. | ||
@@ -714,5 +643,5 @@ */ | ||
/** | ||
* An enumeration describing general events sent from the [[Player]]. | ||
* An enumeration describing general events sent from the {@link Player}. | ||
* | ||
* To listen to events, use [[Player.addEventListener]]. | ||
* To listen to events, use {@link Player.addEventListener}. | ||
* @public | ||
@@ -884,5 +813,5 @@ * @event | ||
/** | ||
* An enumeration describing [[Player]] state updates. | ||
* An enumeration describing {@link Player} state updates. | ||
* | ||
* To listen to events, use [[Player.addEventListener]]. | ||
* To listen to events, use {@link Player.addEventListener}. | ||
* @public | ||
@@ -930,55 +859,2 @@ * @event | ||
/** | ||
* @internal | ||
* Publicly exposed state change events (listen with `addEventListener()`). | ||
* One of these is fired whenever `getPlayerState` changes. The getters that | ||
* are updated with each state change are listed below. The string values of | ||
* each state MUST match the string representation of the 'State' enum in player.hpp. | ||
*/ | ||
/** | ||
* An enumeration describing [[Player]] state updates. | ||
* | ||
* To listen to events, use [[Player.addEventListener]]. | ||
* @public | ||
* @event | ||
*/ | ||
declare enum PlayerState_2 { | ||
/** | ||
* Indicates that the Player is idle or paused. This is the initial state. | ||
* @updated {@link Player.getState} | ||
* @param payload - `void` | ||
* @event | ||
*/ | ||
IDLE = 'Idle', | ||
/** | ||
* Indicates that the Player is ready to play the loaded video or live stream. | ||
* @updated {@link Player.getState} {@link Player.getQualities} | ||
* @param payload - `void` | ||
* @event | ||
*/ | ||
READY = 'Ready', | ||
/** | ||
* Indicates that the Player is buffering content and playback stopped. | ||
* @updated {@link Player.getState} | ||
* @param payload - `void` | ||
* @event | ||
*/ | ||
BUFFERING = 'Buffering', | ||
/** | ||
* Indicates that the Player is playing. | ||
* @updated {@link Player.getState} | ||
* @param payload - `void` | ||
* @event | ||
*/ | ||
PLAYING = 'Playing', | ||
/** | ||
* Indicates that the Player reached the end of a video or a live stream ends. | ||
* @updated {@link Player.getState} | ||
* @param payload - `void` | ||
* @event | ||
*/ | ||
ENDED = 'Ended', | ||
} | ||
/** | ||
* An interface describing a media rendition, which is a selection from video/audio tracks of the loaded media. | ||
@@ -1004,30 +880,10 @@ * @public | ||
/** | ||
* An interface describing a media rendition, which is a selection from video/audio tracks of the loaded media. | ||
* @public | ||
*/ | ||
declare interface Quality_2 { | ||
/** The name of the quality object. */ | ||
name: string; | ||
/** The codec string, both audio and video tracks. For example, "avc1.64002A,mp4a.40.2". */ | ||
codecs: string; | ||
/** The bitrate of the media in bits per second. */ | ||
bitrate: number; | ||
/** The video width, or zero if unknown or not applicable. */ | ||
width: number; | ||
/** The video height, or zero if unknown or not applicable. */ | ||
height: number; | ||
} | ||
/** | ||
* Registers the Amazon IVS quality plugin with Video.js. No-op if already registered. | ||
* | ||
* Once registered, you have access to the | ||
* [[enableIVSQualityPlugin]] method on the Video.js object, | ||
* {@link VideoJSQualityPlugin.enableIVSQualityPlugin} method on the Video.js object, | ||
* which enables the quality UI toggle. | ||
* | ||
* @param videojs - video.js object. | ||
* @throws Will throw a [[VideoJSError]] if video.js is not available | ||
* @throws Will throw a {@link VideoJSError} if video.js is not available | ||
*/ | ||
@@ -1041,3 +897,3 @@ export declare function registerIVSQualityPlugin(videojs: any): void; | ||
* @param config - {@link PlayerConfig} object. | ||
* @throws Will throw a [[VideoJSError]] if video.js or WebAssembly is not available | ||
* @throws Will throw a {@link VideoJSError} if video.js or WebAssembly is not available | ||
*/ | ||
@@ -1054,3 +910,3 @@ export declare function registerIVSTech(vjs: any, config: PlayerConfig): void; | ||
/** | ||
* Maps [[PlayerState]] event names to their payload values. | ||
* Maps {@link PlayerState} event names to their payload values. | ||
* All state events return `void`. | ||
@@ -1131,5 +987,5 @@ */ | ||
export declare interface VideoJSIVSTech { | ||
/** Gets the [[Player]] instance. */ | ||
/** Gets the {@link Player} instance. */ | ||
getIVSPlayer(): Player; | ||
/** Gets a [[VideoJSEvents]] object, which holds IVS Player events and errors. */ | ||
/** Gets a {@link VideoJSEvents} object, which holds IVS Player events and errors. */ | ||
getIVSEvents(): VideoJSEvents; | ||
@@ -1150,53 +1006,2 @@ } | ||
declare interface VideoStatistics { | ||
bitrate: number; | ||
framerate: number; | ||
droppedFrames: number; | ||
decodedFrames: number; | ||
renderedFrames: number; | ||
} | ||
declare interface VideoStatistics_2 { | ||
bitrate: number; | ||
framerate: number; | ||
droppedFrames: number; | ||
decodedFrames: number; | ||
renderedFrames: number; | ||
} | ||
export declare interface WebViewHost { | ||
/** Name WebView host platforms such as android-tv, playstation, etc. */ | ||
name: string; | ||
/** Manufacturer name such as Nvidia or Sony */ | ||
manufacturer?: string; | ||
/** Device name. ex: Nvidia Shield, Playstation 4, etc. */ | ||
device?: string; | ||
/** Device version. This can be the firmware or OS version, or a mix of both. */ | ||
version?: string; | ||
} | ||
declare class WorkerShim { | ||
private workerPort; | ||
private emitter; | ||
private messageQueue; | ||
constructor(scriptFile: string); | ||
postMessage(message: { | ||
funcName: string; | ||
args?: unknown[]; | ||
transfer: Transferable[]; | ||
}): void; | ||
addEventListener(name: string, fn: (...args: unknown[]) => void): void; | ||
removeEventListener(name: string, fn: (...args: unknown[]) => void): void; | ||
onmessage(): void; | ||
onmessageerror(): void; | ||
onerror(): void; | ||
terminate(): void; | ||
dispatchEvent(): boolean; | ||
private loadScript; | ||
private applyWorkerEnv; | ||
private postMessageFromWorker; | ||
private postMessageToWorker; | ||
} | ||
export { } |
@@ -8,5 +8,5 @@ // This file is read by tools that parse documentation comments conforming to the TSDoc standard. | ||
"packageName": "@microsoft/api-extractor", | ||
"packageVersion": "7.22.2" | ||
"packageVersion": "7.36.0" | ||
} | ||
] | ||
} |
{ | ||
"name": "amazon-ivs-player", | ||
"version": "1.19.0", | ||
"version": "1.20.0", | ||
"description": "Amazon IVS Player Web SDK", | ||
@@ -23,4 +23,5 @@ "homepage": "https://aws.amazon.com/ivs/", | ||
"prepare-release:ci": "npm ci && bash ./scripts/prepare-release.sh", | ||
"generate-types": "api-extractor run --local --verbose", | ||
"verify-api": "api-extractor run --local", | ||
"validate-api": "api-extractor run --local --verbose", | ||
"validate-types": "cp dist/index.d.ts ./dist/index-temp.ts && tsc ./dist/index-temp.ts --declaration --emitDeclarationOnly --skipLibCheck && echo 'Successfully validated types'", | ||
"update-types": "api-extractor run --local && bash ./scripts/strip-directives.sh && npm run validate-types", | ||
"docs": "typedoc --options typedoc.json" | ||
@@ -39,3 +40,3 @@ }, | ||
"@microsoft/api-extractor": "^7.22.2", | ||
"typedoc": "^0.18.0" | ||
"typedoc": "^0.24.8" | ||
}, | ||
@@ -42,0 +43,0 @@ "author": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3495144
856
7