-
Notifications
You must be signed in to change notification settings - Fork 24
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
9 changed files
with
38 additions
and
246 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
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
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
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
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
13 changes: 13 additions & 0 deletions
13
src/frontend/packages/lib_video/src/components/common/Player/videojs/xapiPlugin/types.ts
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,8 +1,21 @@ | ||
import { Maybe } from 'lib-common'; | ||
import { Video } from 'lib-components'; | ||
import videojs, { Player } from 'video.js'; | ||
import PluginType from 'video.js/dist/types/plugin'; | ||
|
||
export interface XapiPluginOptions { | ||
video: Video; | ||
locale: Maybe<string>; | ||
dispatchPlayerTimeUpdate: (time: number) => void; | ||
} | ||
|
||
const Plugin = videojs.getPlugin('plugin') as typeof PluginType; | ||
export class XapiPlugin extends Plugin { | ||
declare player: Player; | ||
|
||
constructor(player: Player, _options?: XapiPluginOptions) { | ||
super(player); | ||
} | ||
} | ||
|
||
export type XapiPluginType = typeof XapiPlugin; |
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
Oops, something went wrong.