Initial commit

This commit is contained in:
Vincent Bortone
2013-02-08 15:39:33 -05:00
parent b6872deb38
commit f8b142ba4c
2 changed files with 54 additions and 0 deletions

4
videojs/videojs-tests.ts Normal file
View 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
View 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;