-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
- Loading branch information
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import * as DPlayerType from '../types/DPlayer'; | ||
declare const defaultApiBackend: DPlayerType.APIBackend; | ||
export default defaultApiBackend; | ||
//# sourceMappingURL=api.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import Template from './template'; | ||
declare class Bar { | ||
elements: { | ||
[key: string]: HTMLElement; | ||
}; | ||
constructor(template: Template); | ||
/** | ||
* Update progress | ||
* | ||
* @param {String} type - Point out which bar it is | ||
* @param {Number} percentage | ||
* @param {String} direction - Point out the direction of this bar, Should be height or width | ||
*/ | ||
set(type: 'volume' | 'played' | 'loaded' | 'danmaku', percentage: number, direction: 'width' | 'height'): void; | ||
get(type: 'volume' | 'played' | 'loaded' | 'danmaku'): number; | ||
} | ||
export default Bar; | ||
//# sourceMappingURL=bar.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
declare class Bezel { | ||
container: HTMLElement; | ||
constructor(container: HTMLElement); | ||
switch(icon: string): void; | ||
} | ||
export default Bezel; | ||
//# sourceMappingURL=bezel.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import DPlayer from './player'; | ||
declare class Comment { | ||
player: DPlayer; | ||
constructor(player: DPlayer); | ||
show(): void; | ||
hide(): void; | ||
showSetting(): void; | ||
hideSetting(): void; | ||
toggleSetting(): void; | ||
send(): void; | ||
} | ||
export default Comment; | ||
//# sourceMappingURL=comment.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import DPlayer from './player'; | ||
declare class ContextMenu { | ||
contextmenuHandler: (e: MouseEvent) => void; | ||
player: DPlayer; | ||
shown: boolean; | ||
constructor(player: DPlayer); | ||
show(x: number, y: number): void; | ||
hide(): void; | ||
destroy(): void; | ||
} | ||
export default ContextMenu; | ||
//# sourceMappingURL=contextmenu.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import DPlayer from './player'; | ||
import Thumbnails from './thumbnails'; | ||
declare class Controller { | ||
player: DPlayer; | ||
disableAutoHide: boolean; | ||
autoHideTimer: number; | ||
mobileSkipTimer: number; | ||
mobileBackwardTime: number; | ||
mobileForwardTime: number; | ||
setAutoHideHandler: () => void; | ||
thumbnails: Thumbnails | null; | ||
constructor(player: DPlayer); | ||
initPlayButton(): void; | ||
initHighlights(): void; | ||
initThumbnails(): void; | ||
initPlayedBar(): void; | ||
initFullButton(): void; | ||
initPipButton(): void; | ||
initVolumeButton(): void; | ||
initSyncButton(): void; | ||
initScreenshotButton(): void; | ||
initAirplayButton(): void; | ||
initSubtitleButton(): void; | ||
setAutoHide(time?: number): void; | ||
show(): void; | ||
hide(): void; | ||
isShow(): boolean; | ||
toggle(): void; | ||
destroy(): void; | ||
} | ||
export default Controller; | ||
//# sourceMappingURL=controller.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
import DPlayer from './player'; | ||
import Events from './events'; | ||
import * as DPlayerType from '../types/DPlayer'; | ||
interface DanmakuOptions { | ||
player: DPlayer; | ||
container: HTMLElement; | ||
opacity: number; | ||
callback: () => void; | ||
error: (msg: string) => void; | ||
apiBackend: DPlayerType.APIBackend; | ||
borderColor: string; | ||
fontSize: number; | ||
time: () => number; | ||
unlimited: number; | ||
speedRate: number; | ||
api: DanmakuOptionsAPI; | ||
events: Events; | ||
tran: (msg: string) => string; | ||
} | ||
interface DanmakuOptionsAPI { | ||
id?: string; | ||
address?: string; | ||
token?: string; | ||
maximum?: number; | ||
addition?: string[]; | ||
user?: string; | ||
} | ||
declare class Danmaku { | ||
options: DanmakuOptions; | ||
player: DPlayer; | ||
container: HTMLElement; | ||
danTunnel: { | ||
right: { | ||
[key: string]: HTMLElement[]; | ||
}; | ||
top: { | ||
[key: string]: HTMLElement[]; | ||
}; | ||
bottom: { | ||
[key: string]: HTMLElement[]; | ||
}; | ||
}; | ||
danIndex: number; | ||
danFontSize: number; | ||
dan: DPlayerType.Dan[]; | ||
_opacity: number; | ||
events: Events; | ||
unlimited: boolean; | ||
context: CanvasRenderingContext2D | null; | ||
showing: boolean; | ||
paused: boolean; | ||
constructor(options: DanmakuOptions); | ||
load(): void; | ||
reload(newAPI: DanmakuOptionsAPI): void; | ||
/** | ||
* Asynchronously read danmaku from all API endpoints | ||
*/ | ||
_readAllEndpoints(endpoints: string[], callback: (results: DPlayerType.Dan[][]) => void): void; | ||
send(dan: DPlayerType.DanmakuItem, callback: () => void, isCallbackOnError?: boolean): void; | ||
frame(): void; | ||
opacity(percentage?: number): number; | ||
/** | ||
* Push a danmaku into DPlayer | ||
* | ||
* @param {Object Array} dan - {text, color, type} | ||
* text - danmaku content | ||
* color - danmaku color, default: `#ffeaea` | ||
* type - danmaku type, `right` `top` `bottom`, default: `right` | ||
* size - danmaku size, `medium` `big` `small`, default: `medium` | ||
*/ | ||
draw(dan: DPlayerType.DanmakuItem | DPlayerType.DanmakuItem[] | DPlayerType.Dan[]): DocumentFragment | null; | ||
play(): void; | ||
pause(): void; | ||
_measure(text: string, itemFontSize: number): number; | ||
seek(): void; | ||
clear(): void; | ||
htmlEncode(str: string): string; | ||
resize(): void; | ||
hide(): void; | ||
show(): void; | ||
toggle(): void; | ||
unlimit(boolean: boolean): void; | ||
speed(rate: number): void; | ||
_danAnimation(position: DPlayerType.DanmakuType): string; | ||
} | ||
export default Danmaku; | ||
//# sourceMappingURL=danmaku.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import * as DPlayerType from '../types/DPlayer'; | ||
declare class Events { | ||
events: { | ||
[key: string]: ((info: any) => void)[]; | ||
}; | ||
videoEvents: DPlayerType.VideoEvents[]; | ||
playerEvents: DPlayerType.PlayerEvents[]; | ||
constructor(); | ||
on(name: DPlayerType.Events, callback: (info?: any) => void): void; | ||
trigger(name: DPlayerType.Events, info?: any): void; | ||
type(name: DPlayerType.Events): 'player' | 'video' | null; | ||
} | ||
export default Events; | ||
//# sourceMappingURL=events.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import DPlayer from './player'; | ||
import * as DPlayerType from '../types/DPlayer'; | ||
declare class FullScreen { | ||
player: DPlayer; | ||
lastScrollPosition: { | ||
left: number; | ||
top: number; | ||
}; | ||
fullscreenchange: () => void; | ||
constructor(player: DPlayer); | ||
isFullScreen(type?: DPlayerType.FullscreenType): boolean; | ||
request(type?: DPlayerType.FullscreenType): void; | ||
cancel(type?: DPlayerType.FullscreenType): void; | ||
toggle(type?: DPlayerType.FullscreenType): void; | ||
destroy(): void; | ||
} | ||
export default FullScreen; | ||
//# sourceMappingURL=fullscreen.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import DPlayer from './player'; | ||
declare class HotKey { | ||
player: DPlayer; | ||
doHotKeyHandler: (e: KeyboardEvent) => void; | ||
cancelFullScreenHandler: (e: KeyboardEvent) => void; | ||
constructor(player: DPlayer); | ||
doHotKey(e: KeyboardEvent): void; | ||
cancelFullScreen(e: KeyboardEvent): void; | ||
destroy(): void; | ||
} | ||
export default HotKey; | ||
//# sourceMappingURL=hotkey.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
declare function i18n(this: any, lang: string): void; | ||
export default i18n; | ||
//# sourceMappingURL=i18n.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
declare const Icons: { | ||
play: string; | ||
pause: string; | ||
backward: string; | ||
forward: string; | ||
volumeUp: string; | ||
volumeDown: string; | ||
volumeOff: string; | ||
full: string; | ||
fullWeb: string; | ||
pip: string; | ||
setting: string; | ||
left: string; | ||
right: string; | ||
check: string; | ||
comment: string; | ||
commentOff: string; | ||
send: string; | ||
pallette: string; | ||
camera: string; | ||
subtitle: string; | ||
loading: string; | ||
airplay: string; | ||
}; | ||
export default Icons; | ||
//# sourceMappingURL=icons.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import '../css/index.scss'; | ||
import DPlayer from './player'; | ||
export default DPlayer; | ||
//# sourceMappingURL=index.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import DPlayer from './player'; | ||
import Template from './template'; | ||
declare class InfoPanel { | ||
player: DPlayer; | ||
container: HTMLElement; | ||
template: Template; | ||
video: HTMLVideoElement; | ||
beginTime: number; | ||
constructor(player: DPlayer); | ||
show(): void; | ||
hide(): void; | ||
toggle(): void; | ||
update(): void; | ||
fps(value: number): void; | ||
} | ||
export default InfoPanel; | ||
//# sourceMappingURL=info-panel.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import * as DPlayerType from '../types/DPlayer'; | ||
declare const _default: (options: DPlayerType.Options) => DPlayerType.OptionsInternal; | ||
export default _default; | ||
//# sourceMappingURL=options.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.