Skip to content

Commit

Permalink
feat(FEC-10290): upgrade NPM packages (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Ziv authored Jul 26, 2020
1 parent 299f5e3 commit 45c4038
Show file tree
Hide file tree
Showing 36 changed files with 5,976 additions and 3,534 deletions.
23 changes: 12 additions & 11 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
{
"presets": [
"es2015"
],
"plugins": [
"transform-flow-strip-types",
"transform-class-properties"
],
"env": {
"test": {
"plugins": [
"istanbul"
]
"plugins": ["istanbul"]
}
}
},
"ignore": ["node_modules/**/*"],
"plugins": [
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-transform-flow-strip-types",
"@babel/plugin-transform-property-mutators",
"@babel/plugin-proposal-object-rest-spread",
"@babel/plugin-proposal-class-properties",
"@babel/plugin-transform-classes"
],
"presets": ["@babel/preset-env", "@babel/preset-flow"]
}
2 changes: 0 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/flow-typed/**/*.js
/coverage
/dist
karma.conf.js
webpack.config.js
4 changes: 3 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
"should": true,
"sinon": true,
"__VERSION__": true,
"__NAME__": true
"__NAME__": true,
"process": true,
"__dirname": true
},
"rules": {
"prettier/prettier": "error",
Expand Down
3 changes: 1 addition & 2 deletions .flowconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[ignore]
.*/node_modules
.*/node_modules/.*
[include]
[options]
unsafe.enable_getters_and_setters=true
18 changes: 12 additions & 6 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
<!-- If you are raising a bug playing a stream, you must fill out the following or your issue may not be responded to. For features or improvements, you may delete this. -->

##### Prerequisites
- [ ] Have you checked for duplicate [issues](https://github.com/kaltura/playkit-js-providers/issues): ______
- [ ] Which Plugin [version](https://github.com/kaltura/playkit-js-providers/releases) are you using: ______
- [ ] Can you reproduce the issue with our latest release version: ______
- [ ] Can you reproduce the issue with the latest code from master: ______
- [ ] What browser and OS names and versions are you using: ______
- [ ] If applicable, add test code or test page to reproduce:

- [ ] Have you checked for duplicate [issues](https://github.com/kaltura/playkit-js-providers/issues): **\_\_**
- [ ] Which Plugin [version](https://github.com/kaltura/playkit-js-providers/releases) are you using: **\_\_**
- [ ] Can you reproduce the issue with our latest release version: **\_\_**
- [ ] Can you reproduce the issue with the latest code from master: **\_\_**
- [ ] What browser and OS names and versions are you using: **\_\_**
- [ ] If applicable, add test code or test page to reproduce:

```
Paste test code here
```

##### Expected behavior

What you expected to happen

##### Actual behavior

What actually happened

##### Console output

```
Paste the contents of the browser console here.
```
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ CHANGELOG.md
yarn.lock
yarn-error.log
LICENSE
coverage
20 changes: 10 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ sudo: required
dist: xenial
language: node_js
node_js:
- "node"
- 'node'

services:
- xvfb
Expand All @@ -12,14 +12,14 @@ cache:
- node_modules

before_install:
- export CHROME_BIN=/usr/bin/google-chrome
- export DISPLAY=:99.0
- sudo apt-get update
- sudo apt-get install -y libappindicator1 fonts-liberation
- wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
- sudo dpkg -i google-chrome*.deb
- export CHROME_BIN=/usr/bin/google-chrome
- export DISPLAY=:99.0
- sudo apt-get update
- sudo apt-get install -y libappindicator1 fonts-liberation
- wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
- sudo dpkg -i google-chrome*.deb

script:
- npm run eslint
- npm run flow
- npm run test
- npm run eslint
- npm run flow
- npm run test
114 changes: 58 additions & 56 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,69 +56,71 @@ Finally, add the bundle as a script tag in your page, and initialize the provide
```html
<script type="text/javascript" src="/PATH/TO/FILE/playkit-ovp-provider.js"></script>
<div id="player-placeholder" style="height:360px; width:640px">
<script type="text/javascript">
// Step 1 - Create a provider options object
var options = {
partnerId: "YOUR_PARTNER_ID", // Mandatory
ks: "YOUR_KS", // Optional
log:{
level: "LOG_LEVEL", // Optional
}
uiConfId: UI_CONF_ID, // Optional
env: { // Optional
serviceUrl: "YOUR_SERVICE_URL",
cdnUrl: "YOUR_CDN_URL"
}
};
// Step 2 - Create a provider instance
var provider = new playkit.providers.ovp.Provider(options);
// Step 3 - Create media info object
var mediaInfo = {
entryId: "YOUR_ENTRY_ID" // Mandatory
ks: "YOUR_KS" // Optional
};
// Step 4 - Get the media config
provider.getMediaConfig(mediaInfo).then(function(mediaConfig) {
// Manipulate media config
});
</script>
<script type="text/javascript">
// Step 1 - Create a provider options object
var options = {
partnerId: "YOUR_PARTNER_ID", // Mandatory
ks: "YOUR_KS", // Optional
log:{
level: "LOG_LEVEL", // Optional
}
uiConfId: UI_CONF_ID, // Optional
env: { // Optional
serviceUrl: "YOUR_SERVICE_URL",
cdnUrl: "YOUR_CDN_URL"
}
};
// Step 2 - Create a provider instance
var provider = new playkit.providers.ovp.Provider(options);
// Step 3 - Create media info object
var mediaInfo = {
entryId: "YOUR_ENTRY_ID" // Mandatory
ks: "YOUR_KS" // Optional
};
// Step 4 - Get the media config
provider.getMediaConfig(mediaInfo).then(function(mediaConfig) {
// Manipulate media config
});
</script>
</div>
```

**Cloud TV Provider**

```html
<script type="text/javascript" src="/PATH/TO/FILE/playkit-ott-provider.js"></script>
<div id="player-placeholder" style="height:360px; width:640px">
<script type="text/javascript">
// Step 1 - Create a provider options object
var options = {
partnerId: "YOUR_PARTNER_ID", // Mandatory
ks: "YOUR_KS", // Optional
log:{
level:"LOG_LEVEL", // Optional
}
uiConfId: UI_CONF_ID, // Optional
env: { // Optional
serviceUrl: "YOUR_SERVICE_URL",
cdnUrl: "YOUR_CDN_URL"
}
};
// Step 2 - Create a provider instance
var provider = new playkit.providers.ott.Provider(options);
// Step 3 - Create media info object
var mediaInfo = {
entryId: "YOUR_ENTRY_ID", // Mandatory
ks: "YOUR_KS", // Optional,
mediaType: "YOUR_MEDIA_TYPE" // Optional, default: "MEDIA"
contextType: "YOUR_MEDIA_CONTEXT_TYPE", // Optional, default: "PLAYBACK"
protocol: "YOUR_PROTOCOL", // Optional
fileIds: "YOUR_FILE_IDS" // Optional
};
// Step 4 - Get the media config
provider.getMediaConfig(mediaInfo).then(function(mediaConfig) {
// Manipulate media config
});
</script>
<script type="text/javascript">
// Step 1 - Create a provider options object
var options = {
partnerId: "YOUR_PARTNER_ID", // Mandatory
ks: "YOUR_KS", // Optional
log:{
level:"LOG_LEVEL", // Optional
}
uiConfId: UI_CONF_ID, // Optional
env: { // Optional
serviceUrl: "YOUR_SERVICE_URL",
cdnUrl: "YOUR_CDN_URL"
}
};
// Step 2 - Create a provider instance
var provider = new playkit.providers.ott.Provider(options);
// Step 3 - Create media info object
var mediaInfo = {
entryId: "YOUR_ENTRY_ID", // Mandatory
ks: "YOUR_KS", // Optional,
mediaType: "YOUR_MEDIA_TYPE" // Optional, default: "MEDIA"
contextType: "YOUR_MEDIA_CONTEXT_TYPE", // Optional, default: "PLAYBACK"
protocol: "YOUR_PROTOCOL", // Optional
fileIds: "YOUR_FILE_IDS" // Optional
};
// Step 4 - Get the media config
provider.getMediaConfig(mediaInfo).then(function(mediaConfig) {
// Manipulate media config
});
</script>
</div>
```

## Documentation
Expand Down
3 changes: 1 addition & 2 deletions flow-typed/interfaces/loader.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
//@flow
import RequestBuilder from '../../src/util/request-builder'
import RequestBuilder from '../../src/util/request-builder';

declare interface ILoader {
static name: string;
requests: Array<RequestBuilder>;
response: any;
isValid(): boolean;
Expand Down
2 changes: 1 addition & 1 deletion flow-typed/types/caption-type.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// @flow
declare type CaptionType = { [type: string]: string };
declare type CaptionType = {[type: string]: string};
2 changes: 1 addition & 1 deletion flow-typed/types/filter-options.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// @flow
declare type ProviderFilterOptionsObject = {
redirectFromEntryId?: boolean;
redirectFromEntryId?: boolean
};
2 changes: 1 addition & 1 deletion flow-typed/types/media-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
declare type ProviderMediaConfigObject = {
session: ProviderMediaConfigSessionObject,
sources: ProviderMediaConfigSourcesObject,
plugins: { [plugin: string]: Object }
plugins: {[plugin: string]: Object}
};
1 change: 1 addition & 0 deletions flow-typed/types/media-entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ declare type ProviderMediaEntryObject = {
sources: ProviderMediaSourcesObject,
duration: number,
dvrStatus: number,
status: number,
metadata: Object,
type: string,
poster: string | Array<Object>
Expand Down
2 changes: 1 addition & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const customLaunchers = {
}
};

module.exports = function(config) {
module.exports = function (config) {
let karmaConf = {
logLevel: config.LOG_INFO,
browsers: ['Chrome', 'Firefox'],
Expand Down
Loading

0 comments on commit 45c4038

Please sign in to comment.