mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
Initial commit
This commit is contained in:
4
videojs/videojs-tests.ts
Normal file
4
videojs/videojs-tests.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
// Tests for Video.js API
|
||||
/// <reference path="videojs.d.ts" />
|
||||
|
||||
var myPlayer:VideoJSPlayer = _V_("example_video_1");
|
||||
50
videojs/videojs.d.ts
vendored
Normal file
50
videojs/videojs.d.ts
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
// Type definitions for Video.js
|
||||
// The Video.js API allows you to interact with the video through Javascript, whether the browser is playing the video through HTML5 video, Flash, or any other supported playback technologies.
|
||||
// Project: https://github.com/zencoder/video-js
|
||||
// Definitions by: Vincent Bortone <https://github.com/vbortone/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
interface VideoJSOptions {
|
||||
techOrder?: string[];
|
||||
html5?: Object;
|
||||
width?: number;
|
||||
height?: number;
|
||||
defaultVolume?: number;
|
||||
children?: Object;
|
||||
}
|
||||
|
||||
interface VideoJSSource {
|
||||
type: string;
|
||||
src: string;
|
||||
}
|
||||
|
||||
interface VideoJSPlayer {
|
||||
play(): VideoJSPlayer;
|
||||
pause(): VideoJSPlayer;
|
||||
paused(): bool;
|
||||
src(newSource: string): VideoJSPlayer;
|
||||
src(newSource: VideoJSSource): VideoJSPlayer;
|
||||
src(newSource: VideoJSSource[]): VideoJSPlayer;
|
||||
currentTime(seconds: number): VideoJSPlayer;
|
||||
duration(): number;
|
||||
buffered(): TimeRanges;
|
||||
bufferedPercent(): number;
|
||||
volume(percentAsDecimal: number): TimeRanges;
|
||||
volume(): number;
|
||||
width(): number;
|
||||
width(pixels: number): VideoJSPlayer;
|
||||
height(): number;
|
||||
height(pixels: number): VideoJSPlayer;
|
||||
size(width: number, height: number): VideoJSPlayer;
|
||||
requestFullScreen(): VideoJSPlayer;
|
||||
cancelFullScreen(): VideoJSPlayer;
|
||||
ready(callback: () => void ): void;
|
||||
addEvent(eventName: string, callback: () => void ): void;
|
||||
removeEvent(eventName: string, callback: () => void ): void;
|
||||
}
|
||||
|
||||
interface VideoJSStatic {
|
||||
(id: any, options?: VideoJSOptions, ready?: () => void): VideoJSPlayer;
|
||||
}
|
||||
|
||||
declare var _V_:VideoJSStatic;
|
||||
Reference in New Issue
Block a user