Skip to content

Commit

Permalink
fix: fix providerName type to allow user to extend default providers
Browse files Browse the repository at this point in the history
  • Loading branch information
ala-n committed Jan 18, 2021
1 parent 177e8cc commit 4b6e67e
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/modules/esl-media/providers/brightcove-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export interface BCPlayerAccount {

@BaseProvider.register
export class BrightcoveProvider extends BaseProvider {
static readonly providerName = 'brightcove';
static readonly providerName: string = 'brightcove';

protected videojsClasses = 'video-js vjs-default-skin video-js-brightcove';

Expand Down
2 changes: 1 addition & 1 deletion src/modules/esl-media/providers/html5/audio-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {BaseProvider} from '../../core/esl-media-provider';

@BaseProvider.register
export class AudioProvider extends HTMLMediaProvider {
static readonly providerName = 'audio';
static readonly providerName: string = 'audio';
static readonly urlPattern = /\.(mp3|wav|aac)(\?|$)/;

protected _el: HTMLAudioElement;
Expand Down
2 changes: 1 addition & 1 deletion src/modules/esl-media/providers/html5/video-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {BaseProvider} from '../../core/esl-media-provider';

@BaseProvider.register
export class VideoProvider extends HTMLMediaProvider {
static readonly providerName = 'video';
static readonly providerName: string = 'video';
static readonly urlPattern = /\.(mp4|webm|ogv|mov)(\?|$)/;

protected _el: HTMLVideoElement;
Expand Down
2 changes: 1 addition & 1 deletion src/modules/esl-media/providers/iframe-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {generateUId} from '../../esl-utils/misc/uid';

@BaseProvider.register
export class IframeBasicProvider extends BaseProvider {
static readonly providerName = 'iframe';
static readonly providerName: string = 'iframe';

private _state: PlayerStates = PlayerStates.UNINITIALIZED;
protected _el: HTMLIFrameElement;
Expand Down
2 changes: 1 addition & 1 deletion src/modules/esl-media/providers/youtube-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const DEFAULT_ASPECT_RATIO = 16 / 9;

@BaseProvider.register
export class YouTubeProvider extends BaseProvider {
static readonly providerName = 'youtube';
static readonly providerName: string = 'youtube';
static readonly idRegexp = /(?:v\/|v=|vi=|vi\/|e\/|embed\/|user\/.*\/u\/\d+\/)([_0-9a-zA-Z-]+)/i;
static readonly providerRegexp = /^\s*(?:http(?:s)?:\/\/)?(?:www\.)?(?:youtu\.be|youtube(-nocookie)?\.com)/i;

Expand Down

0 comments on commit 4b6e67e

Please sign in to comment.