Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/vimeo__player

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/vimeo__player - npm Package Compare versions

Comparing version 2.16.1 to 2.16.2

311

vimeo__player/index.d.ts

@@ -11,34 +11,298 @@ // Type definitions for @vimeo/player 2.16.3

export type TrackKind = 'captions' | 'subtitles';
export type CallbackFunction = (...args: any[]) => any;
export interface Error {name: string; message: string; method: string; }
export interface Error {
name: string;
message: string;
method: string;
}
export interface PasswordError extends Error {name: "PasswordError"; message: string; method: string; }
export interface PrivacyError extends Error {name: "PrivacyError"; message: string; method: string; }
export interface InvalidTrackLanguageError extends Error {name: "InvalidTrackLanguageError"; message: string; method: string; }
export interface InvalidTrackError extends Error {name: "InvalidTrackError"; message: string; method: string; }
export interface UnsupportedError extends Error {name: "UnsupportedError"; message: string; method: string; }
export interface ContrastError extends Error {name: "ContrastError"; message: string; method: string; }
export interface InvalidCuePoint extends Error {name: "InvalidCuePoint"; message: string; method: string; }
export interface RangeError extends Error {name: "RangeError"; message: string; method: string; }
export interface TypeError extends Error {name: "TypeError"; message: string; method: string; }
export interface PasswordError extends Error {
name: 'PasswordError';
message: string;
method: string;
}
export interface PrivacyError extends Error {
name: 'PrivacyError';
message: string;
method: string;
}
export interface InvalidTrackLanguageError extends Error {
name: 'InvalidTrackLanguageError';
message: string;
method: string;
}
export interface InvalidTrackError extends Error {
name: 'InvalidTrackError';
message: string;
method: string;
}
export interface UnsupportedError extends Error {
name: 'UnsupportedError';
message: string;
method: string;
}
export interface ContrastError extends Error {
name: 'ContrastError';
message: string;
method: string;
}
export interface InvalidCuePoint extends Error {
name: 'InvalidCuePoint';
message: string;
method: string;
}
export interface RangeError extends Error {
name: 'RangeError';
message: string;
method: string;
}
export interface TypeError extends Error {
name: 'TypeError';
message: string;
method: string;
}
export type EventName = "play" | "pause" | "ended" | "timeupdate" | "progress" | "seeked" | "seeking" | "texttrackchange" |
"cuechange" | "cuepoint" | "volumechange" | "playbackratechange" | "bufferstart" | "bufferend" | "error" | "loaded" | string;
export type EventCallback = (data: any) => any;
export interface TimeEvent {
duration: number;
percent: number;
seconds: number;
}
export interface TextTrackChangeEvent {
kind: TrackKind | null;
label: string | null;
language: string | null;
}
export interface ChapterChangeEvent {
startTime: number;
title: string;
/**
* The `index` property of each chapter is the place it holds in the order of all the chapters. It starts at 1.
*/
index: number;
}
export interface Cue {
/**
* The `html` property contains the HTML that the Player renders for that cue.
*/
html: string;
/**
* The `text` property of each cue is the raw value parsed from the caption or subtitle file.
*/
text: string;
}
export interface CueChangeEvent {
cues: Cue[];
kind: TrackKind;
label: string;
language: string;
}
export interface CuePointEvent {
time: number;
/**
* The `data` property will be the custom data provided in the `addCuePoint()` call, or an empty object if none was provided.
*/
data: VimeoCuePointData;
id: string;
}
export interface VolumeChangeEvent {
volume: number;
}
export interface PlaybackRateEvent {
playbackRate: number;
}
export interface LoadedEvent {
id: number;
}
export interface DurationChangeEvent {
duration: number;
}
export interface FullScreenChangeEvent {
fullscreen: boolean;
}
export interface QualityChangeEvent {
quality: VimeoVideoQuality;
}
export interface CameraChangeEvent {
yaw: number;
pitch: number;
roll: number;
fov: number;
}
export interface ResizeEvent {
videoWidth: number;
videoHeight: number;
}
export interface EventMap {
/**
* Triggered when video playback is initiated.
*/
play: TimeEvent;
/**
* Triggered when the video starts playing.
*/
playing: TimeEvent;
/**
* Triggered when the video pauses.
*/
pause: TimeEvent;
/**
* Triggered any time the video playback reaches the end. _Note_: when loop is turned on, the ended `event` will not fire.
*/
ended: TimeEvent;
/**
* Triggered as the `currentTime` of the video updates. It generally fires every 250ms, but it may vary depending on the browser.
*/
timeupdate: TimeEvent;
/**
* Triggered as the video is loaded. Reports back the amount of the video that has been buffered.
*/
progress: TimeEvent;
/**
* Triggered when the player starts seeking to a specific time. A `timeupdate` event will also be fired at the same time.
*/
seeking: TimeEvent;
/**
* Triggered when the player seeks to a specific time. A `timeupdate` event will also be fired at the same time.
*/
seeked: TimeEvent;
/**
* Triggered when the active text track (captions/subtitles) changes. The values will be null if text tracks are turned off.
*/
texttrackchange: TextTrackChangeEvent;
/**
* Triggered when the current chapter changes.
*/
chapterchange: ChapterChangeEvent;
/**
* Triggered when the active cue for the current text track changes. It also fires when the active text track changes. There may be multiple cues active.
*/
cuechange: CueChangeEvent;
/**
* Triggered when the current time hits a registered cue point.
*/
cuepoint: CuePointEvent;
/**
* Triggered when the volume in the player changes. Some devices do not support setting the volume of the video independently from the system volume, so this event will never fire on those
* devices.
*/
volumechange: VolumeChangeEvent;
/**
* Triggered when the playback rate of the video in the player changes. The ability to change rate can be disabled by the creator and the event will not fire for those videos. The new playback
* rate is returned with the event.
*/
playbackratechange: PlaybackRateEvent;
/**
* Triggered when buffering starts in the player. This is also triggered during preload and while seeking. There is no associated data with this event.
*/
bufferstart: never;
/**
* Triggered when buffering ends in the player. This is also triggered at the end of preload and seeking. There is no associated data with this event.
*/
bufferend: never;
/**
* Triggered when some kind of error is generated in the player. In general if you are using this API library, you should use `.catch()` on each method call instead of globally listening for
* error events.
*
* If the error was generated from a method call, the name of that method will be included.
*/
error: Error;
/**
* Triggered when a new video is loaded in the player.
*/
loaded: LoadedEvent;
/**
* Triggered when the duration attribute has been updated.
*/
durationchange: DurationChangeEvent;
/**
* Triggered when the player enters or exits fullscreen.
*/
fullscreenchange: FullScreenChangeEvent;
/**
* Triggered when the set quality changes.
*/
qualitychange: QualityChangeEvent;
/**
* Triggered when any of the camera properties change for 360° videos.
*/
camerachange: CameraChangeEvent;
/**
* Triggered when the intrinsic size of the media changes.
*/
resize: ResizeEvent;
/**
* Triggered when the player enters picture-in-picture.
*/
enterpictureinpicture: never;
/**
* Triggered when the player leaves picture-in-picture.
*/
leavepictureinpicture: never;
}
export type EventCallback<Data = any> = (data: Data) => any;
export type VimeoTimeRange = [number, number];
export type VimeoVideoQuality = "4K" | "2K" | "1080p" | "720p" | "540p" | "360p" | "240p";
export type VimeoVideoQuality = '4K' | '2K' | '1080p' | '720p' | '540p' | '360p' | '240p';
export class Player {
constructor(element: HTMLIFrameElement|HTMLElement|string, options?: Options);
constructor(element: HTMLIFrameElement | HTMLElement | string, options?: Options);
on(event: EventName, callback: EventCallback): void;
off(event: EventName, callback?: EventCallback): void;
on<EventName extends keyof EventMap>(event: EventName, callback: EventCallback<EventMap[EventName]>): void;
on(event: string, callback: EventCallback): void;
off<EventName extends keyof EventMap>(event: EventName, callback: EventCallback<EventMap[EventName]>): void;
off(event: string, callback?: EventCallback): void;
loadVideo(id: number | string): VimeoPromise<number, TypeError | PasswordError | PrivacyError | Error>;
ready(): VimeoPromise<void, Error>;
enableTextTrack(language: string, kind?: string): VimeoPromise<VimeoTextTrack, InvalidTrackLanguageError | InvalidTrackError | Error>;
enableTextTrack(
language: string,
kind?: TrackKind,
): VimeoPromise<VimeoTextTrack, InvalidTrackLanguageError | InvalidTrackError | Error>;
disableTextTrack(): VimeoPromise<void, Error>;
pause(): VimeoPromise<void, PasswordError | PrivacyError |Error>;
play(): VimeoPromise<void, PasswordError | PrivacyError |Error>;
pause(): VimeoPromise<void, PasswordError | PrivacyError | Error>;
play(): VimeoPromise<void, PasswordError | PrivacyError | Error>;
unload(): VimeoPromise<void, Error>;

@@ -91,3 +355,3 @@ getAutopause(): VimeoPromise<boolean, UnsupportedError | Error>;

language: string;
kind: string;
kind: TrackKind;
label: string;

@@ -127,6 +391,3 @@ mode?: string | undefined;

export interface VimeoPromise<Result, Reason> extends Promise<Result> {
(
successCallback?: (promiseValue: Result) => void,
rejectCallback?: (reasonValue: Reason) => void
): Promise<Result>;
(successCallback?: (promiseValue: Result) => void, rejectCallback?: (reasonValue: Reason) => void): Promise<Result>;
}

@@ -133,0 +394,0 @@

4

vimeo__player/package.json
{
"name": "@types/vimeo__player",
"version": "2.16.1",
"version": "2.16.2",
"description": "TypeScript definitions for @vimeo/player",

@@ -46,4 +46,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/vimeo__player",

"dependencies": {},
"typesPublisherContentHash": "3dd2d6df6ed5f0d558b7f0ac14e17c7cec036e5b30b73072d94543693de7c167",
"typesPublisherContentHash": "9744f0b47a685b210904605381b8461d6df17aff4cc41967ad978eca41dc4717",
"typeScriptVersion": "3.8"
}

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Wed, 02 Feb 2022 15:01:25 GMT
* Last updated: Tue, 15 Feb 2022 21:01:37 GMT
* Dependencies: none

@@ -14,0 +14,0 @@ * Global values: none

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc