-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
26 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
"rootDir": ".", | ||
"outDir": "dist", | ||
"types": ["./node_modules/@oplayer/ui/src/shims-oplayer"] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,21 @@ | ||
// import { PlayerEventName, PlayerListener } from '@oplayer/core/src/types' | ||
import { Player } from '@oplayer/core' | ||
import { Setting, MenuBar, SubtitleSource, Thumbnails } from './types' | ||
|
||
//TODO: 扩展 PlayerEventName | ||
// NEED PR | ||
declare module '@oplayer/core' { | ||
export interface Player { | ||
registerSetting: (setting: Setting | Setting[]) => void | ||
unRegisterSetting: (key: string) => void | ||
selectSetting: (key: string, value: boolean | number) => void | ||
updateSettingLabel: (key: string, text: string) => void | ||
|
||
// declare global { | ||
// module '@oplayer/core' { | ||
// export * from '@oplayer/core' | ||
// interface Player { | ||
// readonly on: ( | ||
// name: | ||
// | PlayerEventName | ||
// | PlayerListener | ||
// | 'ui:notice' | ||
// | 'ui:controllerchange' | ||
// | 'ui:subtitlechange' // Switch existing subtitles eg: switch Chinese subtitles to English subtitles | ||
// | 'ui:subtitleconfigchange' // Modify existing subtitles eg: Add English subtitles | ||
// | 'ui:settingloaded' | ||
// | 'ui:settingshow' | ||
// | 'ui:settinghide' | ||
// | 'ui:settingadd' | ||
// | 'ui:settingremove', | ||
// listener?: PlayerListener, | ||
// options?: { once: boolean } | ||
// ) => this | ||
// } | ||
// } | ||
// } | ||
registerMenu: (menu: MenuBar) => void | ||
unRegisterMenu: (key: string) => void | ||
selectMenu: (key: string, value: boolean | number) => void | ||
|
||
// declare module '@oplayer/core' { | ||
// interface Player { | ||
// readonly on: ( | ||
// name: | ||
// | PlayerEventName | ||
// | PlayerListener | ||
// | 'ui:notice' | ||
// | 'ui:controllerchange' | ||
// | 'ui:subtitlechange' // Switch existing subtitles eg: switch Chinese subtitles to English subtitles | ||
// | 'ui:subtitleconfigchange' // Modify existing subtitles eg: Add English subtitles | ||
// | 'ui:settingloaded' | ||
// | 'ui:settingshow' | ||
// | 'ui:settinghide' | ||
// | 'ui:settingadd' | ||
// | 'ui:settingremove', | ||
// listener?: PlayerListener, | ||
// options?: { once: boolean } | ||
// ) => this | ||
// } | ||
// } | ||
registerHotKey: (map: { key: string; fn: Function }[]) => void | ||
unRegisterHotKey: (key: string[]) => void | ||
|
||
changeSubtitleSource: (source: SubtitleSource[]) => void | ||
changeThumbnailsSource: (src: string) => void | ||
} | ||
} |
3987d2c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
oplayer – ./
oplayer.vercel.app
oplayer-git-main-shiyiya.vercel.app
oplayer-shiyiya.vercel.app