diff --git a/.eslintrc b/.eslintrc
index d0129e5e8..eff4592fd 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -1,7 +1,7 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
- "extends": ["plugin:prettier/recommended", "plugin:@typescript-eslint/recommended", "prettier"],
+ "extends": ["plugin:prettier/recommended", "prettier", "plugin:@typescript-eslint/recommended"],
"plugins": ["prettier", "@typescript-eslint"],
"rules": {
"max-len": [
@@ -16,11 +16,11 @@
}
],
"eol-last": "off",
- "prettier/prettier": "warn",
+ "prettier/prettier": "error",
"@typescript-eslint/explicit-function-return-type": "warn",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unused-vars": "error",
- "@typescript-eslint/no-explicit-any": "warn",
+ "@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-member-accessibility": [
"error",
{
diff --git a/demo/player-ott.html b/demo/player-ott.html
new file mode 100644
index 000000000..20d0b59e8
--- /dev/null
+++ b/demo/player-ott.html
@@ -0,0 +1,32 @@
+
+
+
+
+
+ Title
+
+
+
+
+
+
+
+
diff --git a/demo/index.html b/demo/player-ovp.html
similarity index 86%
rename from demo/index.html
rename to demo/player-ovp.html
index 473dfeb81..48fdbbf4d 100644
--- a/demo/index.html
+++ b/demo/player-ovp.html
@@ -4,7 +4,7 @@
-
+
Player
@@ -21,9 +21,9 @@
partnerId: 242,
env: {
serviceUrl: 'https://api.nvq2.ovp.kaltura.com/api_v3',
- cdnUrl: 'https://api.nvq2.ovp.kaltura.com',
+ cdnUrl: 'https://api.nvq2.ovp.kaltura.com'
}
- },
+ }
};
const player = KalturaPlayer.setup(config);
diff --git a/package.json b/package.json
index 3ec90aa81..c8f806b00 100644
--- a/package.json
+++ b/package.json
@@ -27,10 +27,10 @@
"access": "public"
},
"scripts": {
- "serve:ovp": "webpack serve --open --mode development --env playerType=ovp",
+ "serve:ovp": "webpack serve --open /player-ovp.html --mode development --env playerType=ovp",
"build:ovp": "webpack --mode production --env playerType=ovp",
"watch:ovp": "webpack --mode development --watch --env playerType=ovp",
- "serve:ott": "webpack serve --open --mode development --env playerType=ott",
+ "serve:ott": "webpack serve --open /player-ott.html --mode development --env playerType=ott",
"build:ott": "webpack --mode production --env playerType=ott",
"watch:ott": "webpack --mode development --watch --env playerType=ott",
"build": "yarn run clean && yarn run build:ovp && yarn run build:ott && yarn run build:types",
@@ -52,8 +52,8 @@
"@playkit-js/playkit-js": "0.84.5",
"@playkit-js/playkit-js-dash": "1.36.2",
"@playkit-js/playkit-js-hls": "1.32.11",
- "@playkit-js/playkit-js-providers": "2.40.3",
- "@playkit-js/playkit-js-ui": "0.78.1-canary.0-3e307cf",
+ "@playkit-js/playkit-js-providers": "2.40.4-canary.0-b3e5269",
+ "@playkit-js/playkit-js-ui": "0.78.1-canary.0-6f60446",
"hls.js": "1.4.11",
"shaka-player": "4.7.0"
},
diff --git a/src/common/cast/player-snapshot.ts b/src/common/cast/player-snapshot.ts
index d41eba58d..85978c2b3 100644
--- a/src/common/cast/player-snapshot.ts
+++ b/src/common/cast/player-snapshot.ts
@@ -1,7 +1,7 @@
import { KalturaPlayer } from '../../kaltura-player';
import { TextStyle, TrackType, Utils } from '@playkit-js/playkit-js';
import { KPMediaConfig } from '../../types';
-import { ProviderMediaInfoObject } from '@playkit-js/playkit-js-providers/ovp-provider';
+import { ProviderMediaInfoObject } from '@playkit-js/playkit-js-providers/types';
/**
* @class PlayerSnapshot
diff --git a/src/common/cast/remote-player.ts b/src/common/cast/remote-player.ts
index 5bdcdb994..917a2d426 100644
--- a/src/common/cast/remote-player.ts
+++ b/src/common/cast/remote-player.ts
@@ -1,5 +1,5 @@
import { FakeEvent, TextStyle, Track } from '@playkit-js/playkit-js';
-import { ProviderMediaInfoObject } from '@playkit-js/playkit-js-providers/ovp-provider';
+import { ProviderMediaInfoObject } from '@playkit-js/playkit-js-providers/types';
import { RemoteSession } from './remote-session';
import { KPMediaConfig } from '../../types';
diff --git a/src/common/playlist/playlist-manager.ts b/src/common/playlist/playlist-manager.ts
index 3baeca914..6b61ae6d2 100644
--- a/src/common/playlist/playlist-manager.ts
+++ b/src/common/playlist/playlist-manager.ts
@@ -4,7 +4,7 @@ import {
ProviderMediaInfoObject,
ProviderPlaylistMetadataObject,
ProviderPlaylistObject
-} from '@playkit-js/playkit-js-providers/ovp-provider';
+} from '@playkit-js/playkit-js-providers/types';
import { KalturaPlayer } from '../../kaltura-player';
import { PlaylistEventType } from './playlist-event-type';
import { Playlist } from './playlist';
diff --git a/src/common/playlist/playlist.ts b/src/common/playlist/playlist.ts
index 8ec263f33..7ed6cb132 100644
--- a/src/common/playlist/playlist.ts
+++ b/src/common/playlist/playlist.ts
@@ -1,5 +1,5 @@
import { Utils } from '@playkit-js/playkit-js';
-import { ProviderPlaylistMetadataObject } from '@playkit-js/playkit-js-providers/ovp-provider';
+import { ProviderPlaylistMetadataObject } from '@playkit-js/playkit-js-providers/types';
import { PlaylistItem } from './playlist-item';
import { KPPlaylistObject, SourcesConfig, PluginsConfig, MediaSourceOptionsObject } from '../../types';
diff --git a/src/common/thumbnail-manager.ts b/src/common/thumbnail-manager.ts
index fd6f47668..9edc6e931 100644
--- a/src/common/thumbnail-manager.ts
+++ b/src/common/thumbnail-manager.ts
@@ -1,5 +1,5 @@
import { Utils, ThumbnailInfo, MediaType, EventManager } from '@playkit-js/playkit-js';
-import { Poster } from '@playkit-js/playkit-js-providers/ovp-provider';
+import { Poster } from '@playkit-js/playkit-js-providers/types';
import evaluate from './utils/evaluate';
import { KalturaPlayer } from '../kaltura-player';
import { KPThumbnailConfig, UiConfig, KPMediaConfig } from '../types';
diff --git a/src/common/utils/setup-helpers.ts b/src/common/utils/setup-helpers.ts
index 7fd376a71..68f246d29 100644
--- a/src/common/utils/setup-helpers.ts
+++ b/src/common/utils/setup-helpers.ts
@@ -13,7 +13,7 @@ import {
ILogLevel,
PKSourcesConfigObject
} from '@playkit-js/playkit-js';
-import { ProviderOptionsObject } from '@playkit-js/playkit-js-providers/ovp-provider';
+import { ProviderOptionsObject } from '@playkit-js/playkit-js-providers/types';
import { ValidationErrorType } from './validation-error';
import LocalStorageManager from '../storage/local-storage-manager';
import { KalturaPlayer } from '../../kaltura-player';
diff --git a/src/kaltura-player.ts b/src/kaltura-player.ts
index b5bfde8f6..362efd0c6 100644
--- a/src/kaltura-player.ts
+++ b/src/kaltura-player.ts
@@ -32,17 +32,14 @@ import {
LoggerLevels
} from '@playkit-js/playkit-js';
import {
- BaseProvider,
- OTTProviderMediaInfoObject,
- OVPProviderMediaInfoObject,
- Provider,
ProviderEntryListObject,
ProviderMediaConfigObject,
ProviderMediaConfigSourcesObject,
ProviderMediaInfoObject,
ProviderPlaylistInfoObject,
ProviderPlaylistObject
-} from '@playkit-js/playkit-js-providers/ovp-provider';
+} from '@playkit-js/playkit-js-providers/types';
+import { Provider } from '@playkit-js/playkit-js-providers/ovp-provider';
import { UIWrapper } from './common/ui-wrapper';
import { AdsController, ControllerProvider } from './common/controllers';
import { BaseRemotePlayer } from './common/cast/base-remote-player';
@@ -83,7 +80,7 @@ import {
export class KalturaPlayer extends FakeEventTarget {
private static _logger: any = getLogger('KalturaPlayer' + Utils.Generator.uniqueId(5));
private _localPlayer: Player;
- private _provider: BaseProvider;
+ private _provider: Provider;
private _uiWrapper: UIWrapper;
private _controllerProvider: ControllerProvider;
private _adsController: AdsController | undefined;
@@ -744,7 +741,7 @@ export class KalturaPlayer extends FakeEventTarget {
return this._pluginManager.getAll();
}
- public get provider(): BaseProvider {
+ public get provider(): Provider {
return this._provider;
}
diff --git a/src/ott/poster.ts b/src/ott/poster.ts
index da375f72b..e2f268ed8 100644
--- a/src/ott/poster.ts
+++ b/src/ott/poster.ts
@@ -1,6 +1,5 @@
-import { ProviderMediaConfigSourcesObject } from '@playkit-js/playkit-js-providers/ott-provider';
import { PKDimensionsConfig, PKSourcesConfigObject } from '@playkit-js/playkit-js';
-import { Poster } from '@playkit-js/playkit-js-providers/ott-provider';
+import { Poster, ProviderMediaConfigSourcesObject } from '@playkit-js/playkit-js-providers/types';
/**
* Add poster with player dimensions.
diff --git a/src/ovp/poster.ts b/src/ovp/poster.ts
index 7be3dc601..0ae73d56b 100644
--- a/src/ovp/poster.ts
+++ b/src/ovp/poster.ts
@@ -1,6 +1,6 @@
import { THUMBNAIL_REGEX } from '../common/thumbnail-manager';
-import { ProviderMediaConfigSourcesObject } from '@playkit-js/playkit-js-providers/ovp-provider';
import { PKDimensionsConfig, PKSourcesConfigObject } from '@playkit-js/playkit-js';
+import { ProviderMediaConfigSourcesObject } from '@playkit-js/playkit-js-providers/types';
/**
* Add poster with player dimensions to thumbnail API call
diff --git a/src/types/kaltura-player-options.ts b/src/types/kaltura-player-options.ts
index b2ebb0493..9f1998cd4 100644
--- a/src/types/kaltura-player-options.ts
+++ b/src/types/kaltura-player-options.ts
@@ -6,7 +6,7 @@ import { UiConfig } from './ui-config';
import { ViewabilityConfig } from './visibility-config';
import { NetworkConfig } from './network-config';
import { PluginsConfig } from './plugins';
-import { ProviderOptionsObject } from '@playkit-js/playkit-js-providers/ovp-provider';
+
import {
PKAbrConfigObject,
PKDimensionsConfig,
@@ -14,6 +14,7 @@ import {
PKSourcesConfigObject,
PKTextConfigObject
} from '@playkit-js/playkit-js';
+import { ProviderOptionsObject } from "@playkit-js/playkit-js-providers/types";
export interface KalturaPlayerConfig {
targetId: string;
diff --git a/src/types/media-config.ts b/src/types/media-config.ts
index 3e312d1bd..f44d484fc 100644
--- a/src/types/media-config.ts
+++ b/src/types/media-config.ts
@@ -1,8 +1,6 @@
import { PlaybackConfig } from './playback-config';
-import {
- ProviderMediaConfigSessionObject,
- ProviderMediaConfigSourcesObject
-} from '@playkit-js/playkit-js-providers/ovp-provider';
+import { ProviderMediaConfigSourcesObject, ProviderMediaConfigSessionObject } from "@playkit-js/playkit-js-providers/types";
+
/**
* @typedef {Object} KPMediaConfig
diff --git a/src/types/playlist-object.ts b/src/types/playlist-object.ts
index 0e0648f8f..a24c3c94c 100644
--- a/src/types/playlist-object.ts
+++ b/src/types/playlist-object.ts
@@ -1,7 +1,7 @@
import { PlaylistOptions } from './playlist';
import { PlaylistCountdownOptions } from './playlist';
import { PlaylistItem } from '../common/playlist/playlist-item';
-import { ProviderPlaylistMetadataObject } from '@playkit-js/playkit-js-providers/ovp-provider';
+import { ProviderPlaylistMetadataObject } from "@playkit-js/playkit-js-providers/types";
export interface PlaylistConfig {
id: string;
diff --git a/src/types/playlist/KPPlaylistObject.ts b/src/types/playlist/KPPlaylistObject.ts
index 8a851be0e..2bd9ec2e4 100644
--- a/src/types/playlist/KPPlaylistObject.ts
+++ b/src/types/playlist/KPPlaylistObject.ts
@@ -1,6 +1,6 @@
import { PlaylistItem } from '../../common/playlist/playlist-item';
import { PlaylistConfigObject } from './playlist-config-object';
-import { ProviderPlaylistMetadataObject } from '@playkit-js/playkit-js-providers/ovp-provider';
+import { ProviderPlaylistMetadataObject } from "@playkit-js/playkit-js-providers/types";
/**
* @typedef {Object} KPPlaylistObject
diff --git a/src/types/sources-config.ts b/src/types/sources-config.ts
index bb70a7bb6..fd8c44fa8 100644
--- a/src/types/sources-config.ts
+++ b/src/types/sources-config.ts
@@ -1,7 +1,7 @@
import { ExternalThumbnailsConfig } from './exteranl-thumbnails-object';
import { MediaSourceOptionsObject } from './media-source-options';
import { ImageSourceOptions } from './image-player-options';
-import { ProviderMediaConfigSourcesObject } from '@playkit-js/playkit-js-providers/ovp-provider';
+import { ProviderMediaConfigSourcesObject } from "@playkit-js/playkit-js-providers/types";
export interface SourcesConfig
extends Omit {
diff --git a/yarn.lock b/yarn.lock
index f459c9c74..24874330e 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1182,15 +1182,15 @@
resolved "https://registry.yarnpkg.com/@playkit-js/playkit-js-hls/-/playkit-js-hls-1.32.11.tgz#0d4d514750a660e9899d04e97482af6311355707"
integrity sha512-YWhFAYeBpONeENRQbmm6901FtkT4vwzu8O5mzrrty7TUGR3zXpBGszul1bngAZQWS6UZ5vpuvAuLSz+37BFUpg==
-"@playkit-js/playkit-js-providers@2.40.3":
- version "2.40.3"
- resolved "https://registry.yarnpkg.com/@playkit-js/playkit-js-providers/-/playkit-js-providers-2.40.3.tgz#d6da4e07711b3fa5a9d650e0752018584b71f5fe"
- integrity sha512-6xfG+jhNqOCoPcjI5C+h6/SVS+RV6IObiBiQ6/TtP+FEZz+3lyg1D7R6kZMoUGB02ris1ODI954IAxngFdEaDA==
-
-"@playkit-js/playkit-js-ui@0.78.1-canary.0-3e307cf":
- version "0.78.1-canary.0-3e307cf"
- resolved "https://registry.yarnpkg.com/@playkit-js/playkit-js-ui/-/playkit-js-ui-0.78.1-canary.0-3e307cf.tgz#7351100b24c5714308e14d43f33df808bcdae68f"
- integrity sha512-x/FuSlnQ5rtaIiSkShSLfa4Hx67ThQ+CXgDNk5PhKgJ1xjwKjmIEQoQ3g2Q1h1yLvZhr31ioEUTS75v5OMF4tA==
+"@playkit-js/playkit-js-providers@2.40.4-canary.0-b3e5269":
+ version "2.40.4-canary.0-b3e5269"
+ resolved "https://registry.yarnpkg.com/@playkit-js/playkit-js-providers/-/playkit-js-providers-2.40.4-canary.0-b3e5269.tgz#0505713d1ca5dae3178704d1ef23e043f782289a"
+ integrity sha512-W9fHWtdAZgsXJhfEEqXEPIbqXBLuOQsTjRq/sDZXnuaBfPXZAZYNrIG10DCGUbeXGiNq/s8oomZOEskwSbsL1Q==
+
+"@playkit-js/playkit-js-ui@0.78.1-canary.0-6f60446":
+ version "0.78.1-canary.0-6f60446"
+ resolved "https://registry.yarnpkg.com/@playkit-js/playkit-js-ui/-/playkit-js-ui-0.78.1-canary.0-6f60446.tgz#6c20a000db964f143f4f0768a09b1544be66a177"
+ integrity sha512-RgiaGrB1wD97fAKXBlnSboDAGXh0Dy2m3EKzvf4GLxjuZhCm4EpTrCLgbGAixOlI9Y5SssfjUezQC8BNK2ij0w==
dependencies:
preact "10.4.6"
preact-i18n "2.0.0-preactx.2"