-
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.
♻️(lib-video) adapt plugin video.js sharedMediaPlugin
We adapt the plugin sharedMediaPlugin to work with video.js version 8.
- Loading branch information
Showing
4 changed files
with
49 additions
and
20 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
10 changes: 5 additions & 5 deletions
10
...ontend/packages/lib_video/src/components/common/Player/videojs/sharedMediaPlugin/index.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
17 changes: 15 additions & 2 deletions
17
...ontend/packages/lib_video/src/components/common/Player/videojs/sharedMediaPlugin/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,11 +1,24 @@ | ||
import { SharedLiveMedia } from '@lib-components/types/tracks'; | ||
import videojs from 'video.js'; | ||
import videojs, { Player } from 'video.js'; | ||
import MenuItemOptions from 'video.js/dist/types/menu/menu-item'; | ||
import PluginType from 'video.js/dist/types/plugin'; | ||
|
||
export interface SharedLiveMediaItemOptions extends videojs.MenuItemOptions { | ||
export interface SharedLiveMediaItemOptions extends MenuItemOptions { | ||
label: string; | ||
src: string | undefined; | ||
} | ||
|
||
export interface SharedLiveMediaOptions { | ||
sharedLiveMedias: SharedLiveMedia[]; | ||
} | ||
|
||
const Plugin = videojs.getPlugin('plugin') as typeof PluginType; | ||
export class SharedLiveMediaClass extends Plugin { | ||
declare player: Player; | ||
|
||
constructor(player: Player, _options?: SharedLiveMediaOptions) { | ||
super(player); | ||
} | ||
} | ||
|
||
export type SharedLiveMediaType = typeof SharedLiveMediaClass; |