Skip to content

Commit

Permalink
feat(FEC-10290): upgrade NPM packages (#335)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Ziv authored Jul 28, 2020
1 parent 0d14999 commit 07fa73b
Show file tree
Hide file tree
Showing 52 changed files with 7,102 additions and 5,726 deletions.
Binary file removed .DS_Store
Binary file not shown.
33 changes: 12 additions & 21 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
{
"presets": [
"es2015"
],
"ignore": [
"node_modules/**/*"
],
"plugins": [
"transform-flow-strip-types",
"transform-class-properties",
["babel-plugin-transform-es2015-classes",
{
"loose": true
}
],
"babel-plugin-transform-es5-property-mutators",
"transform-object-rest-spread"
],
"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"]
}
24 changes: 8 additions & 16 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
{
"parser": "babel-eslint",
"extends": [
"eslint:recommended",
"plugin:flowtype/recommended"
],
"plugins": [
"prettier",
"import",
"flowtype",
"mocha-no-only"
],
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"extends": ["eslint:recommended", "plugin:flowtype/recommended"],
"plugins": ["prettier", "import", "flowtype", "mocha-no-only"],
"env": {
"browser": true,
"es6": true,
Expand All @@ -28,11 +24,7 @@
"rules": {
"prettier/prettier": "error",
"mocha-no-only/mocha-no-only": "off",
"require-jsdoc": [
"error"
],
"valid-jsdoc": [
"error"
]
"require-jsdoc": ["error"],
"valid-jsdoc": ["error"]
}
}
3 changes: 1 addition & 2 deletions .flowconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[ignore]
.*/node_modules
.*/node_modules/.*
[include]
[libs]
./src/index.js
Expand All @@ -9,7 +9,6 @@ node_modules/@playkit-js/playkit-js-dash/flow-typed/
node_modules/@playkit-js/playkit-js-ui/flow-typed/
node_modules/playkit-js-providers/flow-typed/
[options]
unsafe.enable_getters_and_setters=true
module.name_mapper='playkit-js-providers' -> 'playkit-js-providers/dist/playkit-ovp-provider'
module.name_mapper='playkit-js-providers' -> 'playkit-js-providers/dist/playkit-ott-provider'
module.name_mapper='player-defaults' -> '<PROJECT_ROOT>/src/ovp/player-defaults'
Expand Down
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/kaltura-player-js/issues): ______
- [ ] Which Plugin [version](https://github.com/kaltura/kaltura-player-js/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/kaltura-player-js/issues): **\_\_**
- [ ] Which Plugin [version](https://github.com/kaltura/kaltura-player-js/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 .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@ jspm_packages
.idea

/dist/
.DS_Store
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ yarn.lock
yarn-error.log
LICENSE
/samples
/coverage
14 changes: 7 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ sudo: required
dist: xenial
language: node_js
node_js:
- "node"
- 'node'

addons:
chrome: stable
Expand All @@ -16,7 +16,7 @@ cache:
- node_modules

before_install:
- export DISPLAY=:99.0
- export DISPLAY=:99.0

script:
- set -ev
Expand All @@ -34,7 +34,7 @@ jobs:
# publish canary package if on master
- stage: Release
if: (tag IS present)
name: "Release"
name: 'Release'
script:
- currentVersion=$(npx -c 'echo "$npm_package_version"')
- chmod +x ./scripts/after_deploy.sh
Expand All @@ -43,7 +43,7 @@ jobs:
# publish canary package if on master
- stage: Release canary
if: (branch = master) AND (type != pull_request) AND commit_message !~ /^chore\(release\)/ AND commit_message !~ /^(chore).*(update dist)$/
name: "Release canary"
name: 'Release canary'
script:
- git checkout master
- echo "Run standard-version"
Expand All @@ -65,16 +65,16 @@ jobs:
# Required tests
- stage: Tests
if: (branch = master) OR (tag IS present) OR (type = pull_request)
name: "Running lint"
name: 'Running lint'
script:
- yarn run eslint
- stage: Tests
if: (branch = master) OR (tag IS present) OR (type = pull_request)
name: "Running Flow type check"
name: 'Running Flow type check'
script:
- yarn run flow
- stage: Tests
if: (branch = master) OR (tag IS present) OR (type = pull_request)
name: "Running unit tests"
name: 'Running unit tests'
script:
- yarn run test
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
theme: jekyll-theme-cayman
theme: jekyll-theme-cayman
28 changes: 14 additions & 14 deletions docs/ads.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ if (player.ads.isAdBreak()) {
## Ad Events Timeline

During ad playback, there are events that get triggered to indicate the current ad state or state changes.
Some events are life cycle indicators and will always get triggered, while others are reactive to specific actions -- such as the user clicking the ad -- and may or may not be triggered.
Some events are life cycle indicators and will always get triggered, while others are reactive to specific actions -- such as the user clicking the ad -- and may or may not be triggered.

In the following diagram you can observe the events timeline from the point that an ad break starts to the point that the ad break ends.

Expand Down Expand Up @@ -112,8 +112,8 @@ You can observe the following timeline diagram that simulates these events' exac
> Fires when the ad manifest has been loaded and the ad layout is available.
> <br><br>_payload parameters:_
>
> | Name | Type | Description |
> | ------------------ | --------------- | ---------------------------------------------------------------- |
> | Name | Type | Description |
> | ------------------ | --------------- | ------------------------------------------------------------------- |
> | `adBreaksPosition` | `Array<number>` | An array that represents the ad break's time on the media timeline. |
#
Expand All @@ -123,8 +123,8 @@ You can observe the following timeline diagram that simulates these events' exac
> Fires when an ad has been loaded and ad data is available.
> <br><br>_payload parameters:_
>
> | Name | Type | Description |
> | ---- | ----------- | ------------ |
> | Name | Type | Description |
> | ---- | ----------- | ----------- |
> | `ad` | [`Ad`](#Ad) | The ad data |
#
Expand All @@ -134,8 +134,8 @@ You can observe the following timeline diagram that simulates these events' exac
> Fires when an ad has been started and ad data is available.
> <br><br>_payload parameters:_
>
> | Name | Type | Description |
> | ---- | ----------- | ------------ |
> | Name | Type | Description |
> | ---- | ----------- | ----------- |
> | `ad` | [`Ad`](#Ad) | The ad data |
#
Expand Down Expand Up @@ -177,9 +177,9 @@ You can observe the following timeline diagram that simulates these events' exac
>
> | Name | Type | Description |
> | ---------- | -------- | --------------------------------------------------------------------------- |
> | `severity` | `string` | The error severity |
> | `category` | `string` | The error category |
> | `code` | `number` | The error code |
> | `severity` | `string` | The error severity |
> | `category` | `string` | The error category |
> | `code` | `number` | The error code |
> | `data` | `Object` | The error data: the original ad error can be accessed by `data.innerError`. |
#
Expand All @@ -195,8 +195,8 @@ You can observe the following timeline diagram that simulates these events' exac
> Fires before an ad break is about to start.
> <br><br>_payload parameters:_
>
> | Name | Type | Description |
> | --------- | --------------------- | ------------------ |
> | Name | Type | Description |
> | --------- | --------------------- | ----------------- |
> | `adBreaK` | [`AdBreak`](#AdBreak) | The ad break data |
#
Expand Down Expand Up @@ -248,8 +248,8 @@ You can observe the following timeline diagram that simulates these events' exac
> Fires on ad time progress.
> <br><br>_payload parameters:_
>
> | Name | Type | Description |
> | ------------ | ------------------ | --------------------- |
> | Name | Type | Description |
> | ------------ | ------------------ | -------------------- |
> | `adProgress` | `AdProgressObject` | The ad progress data |
>
> ###### Type `AdProgressObject`
Expand Down
10 changes: 5 additions & 5 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1057,7 +1057,7 @@ Playback UI of the remote player.
- `props` **[Object][268]** UI creation parameters.
Returns **React$Element&lt;any>** Component.
Returns **React\$Element&lt;any>** Component.
### idleUI
Expand All @@ -1067,7 +1067,7 @@ Idle UI of the remote player.
- `props` **[Object][268]** UI creation parameters.
Returns **React$Element&lt;any>** Component.
Returns **React\$Element&lt;any>** Component.
### adsUI
Expand All @@ -1077,7 +1077,7 @@ Idle UI of the remote player.
- `props` **[Object][268]** UI creation parameters.
Returns **React$Element&lt;any>** Component.
Returns **React\$Element&lt;any>** Component.
### liveUI
Expand All @@ -1087,7 +1087,7 @@ Live UI of the remote player.
- `props` **[Object][268]** UI creation parameters.
Returns **React$Element&lt;any>** Component.
Returns **React\$Element&lt;any>** Component.
### errorUI
Expand All @@ -1097,7 +1097,7 @@ Error UI of the remote player.
- `props` **[Object][268]** UI creation parameters.
Returns **React$Element&lt;any>** Component.
Returns **React\$Element&lt;any>** Component.
### uis
Expand Down
50 changes: 30 additions & 20 deletions docs/embed-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,23 @@ Basic dynamic embed codes look like this:
```html
<div id="{TARGET_ID}" style="width: 640px;height: 360px"></div>
<script type="text/javascript" src="https://cdnapisec.kaltura.com/p/{PARTNER_ID}/embedPlaykitJs/uiconf_id/{UICONF_ID}"></script>
<script type="text/javascript">
try {
var kalturaPlayer = KalturaPlayer.setup({
targetId: "{TARGET_ID}",
provider: {
partnerId: {PARTNER_ID},
uiConfId: {UICONF_ID}
},
playback: {
autoplay: true
}
});
kalturaPlayer.loadMedia({entryId: '{ENTRY_ID}'});
} catch (e) {
console.error(e.message)
}
</script>
<script type="text/javascript">
try {
var kalturaPlayer = KalturaPlayer.setup({
targetId: '{TARGET_ID}',
provider: {
partnerId: {PARTNER_ID},
uiConfId: {UICONF_ID}
},
playback: {
autoplay: true
}
});
kalturaPlayer.loadMedia({entryId: '{ENTRY_ID}'});
} catch (e) {
console.error(e.message);
}
</script>
```

## Auto Embed
Expand All @@ -43,7 +43,10 @@ The configuration will be decoded properly to the original characters.

```html
<div id="{TARGET_ID}" style="width: 640px;height: 360px"></div>
<script type="text/javascript" src='https://cdnapisec.kaltura.com/p/{PARTNER_ID}/embedPlaykitJs/uiconf_id/{UICONF_ID}?autoembed=true&targetId={TARGET_ID}&entry_id={ENTRY_ID}&config[playback]={"autoplay":true}'></script>
<script
type="text/javascript"
src='https://cdnapisec.kaltura.com/p/{PARTNER_ID}/embedPlaykitJs/uiconf_id/{UICONF_ID}?autoembed=true&targetId={TARGET_ID}&entry_id={ENTRY_ID}&config[playback]={"autoplay":true}'
></script>
```

## IFrame Embed
Expand All @@ -55,7 +58,14 @@ It is possible to control the configuration passed to the player by adding query
Note that if you use the iframe only embed mode, the page won't be able to access the player API:

```html
<iframe type="text/javascript" src='https://cdnapisec.kaltura.com/p/{PARTNER_ID}/embedPlaykitJs/uiconf_id/{UICONF_ID}?iframeembed=true&entry_id={ENTRY_ID}&config[playback]={"autoplay":true}'
style="width: 640px;height: 360px" allowfullscreen webkitallowfullscreen mozAllowFullScreen frameborder="0">
<iframe
type="text/javascript"
src='https://cdnapisec.kaltura.com/p/{PARTNER_ID}/embedPlaykitJs/uiconf_id/{UICONF_ID}?iframeembed=true&entry_id={ENTRY_ID}&config[playback]={"autoplay":true}'
style="width: 640px;height: 360px"
allowfullscreen
webkitallowfullscreen
mozAllowFullScreen
frameborder="0"
>
</iframe>
```
Loading

0 comments on commit 07fa73b

Please sign in to comment.