-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Depends on: * kaltura/playkit-js#324 * kaltura/playkit-js-ui#371 * kaltura/playkit-js-hls#83
- Loading branch information
Showing
29 changed files
with
4,941 additions
and
689 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
[ignore] | ||
.*/node_modules/conventional-changelog-core/test/fixtures/_malformation.json | ||
.*/node_modules/playkit-js/src/ | ||
.*/node_modules | ||
[include] | ||
[libs] | ||
node_modules/playkit-js/flow-typed/ | ||
node_modules/@playkit-js/playkit-js/flow-typed/ | ||
[options] | ||
unsafe.enable_getters_and_setters=true |
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 |
---|---|---|
@@ -0,0 +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-ima/issues): **\_\_** | ||
* [ ] Which Plugin [version](https://github.com/kaltura/playkit-js-ima/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. | ||
``` |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
### Description of the Changes | ||
|
||
Please add a detailed description of the change, whether it's an enhancement or a bugfix. | ||
If the PR is related to an open issue please link to it. | ||
|
||
### CheckLists | ||
|
||
* [ ] changes have been done against master branch, and PR does not conflict | ||
* [ ] new unit / functional tests have been added (whenever applicable) | ||
* [ ] test are passing in local environment | ||
* [ ] Travis tests are passing (or test results are not worse than on master branch :)) | ||
* [ ] Docs have been updated |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/dist | ||
/src/index.html | ||
CHANGELOG.md | ||
yarn.lock | ||
yarn-error.log | ||
LICENSE |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"printWidth": 150, | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"semi": true, | ||
"singleQuote": true, | ||
"trailingComma": "none", | ||
"bracketSpacing": false, | ||
"jsxBracketSameLine": true, | ||
"arrowParens": "avoid", | ||
"proseWrap": "preserve" | ||
} |
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,24 +1,79 @@ | ||
conditions: v1 | ||
sudo: required | ||
dist: trusty | ||
language: node_js | ||
node_js: | ||
- "node" | ||
|
||
addons: | ||
chrome: stable | ||
|
||
cache: | ||
yarn: true | ||
directories: | ||
- node_modules | ||
|
||
before_install: | ||
- export CHROME_BIN=/usr/bin/google-chrome | ||
- export DISPLAY=:99.0 | ||
- sh -e /etc/init.d/xvfb start | ||
- 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 DISPLAY=:99.0 | ||
- sh -e /etc/init.d/xvfb start | ||
- chmod +x ./scripts/travis.sh | ||
|
||
script: ./scripts/travis.sh | ||
|
||
stages: | ||
- Tests | ||
- Release canary | ||
- Release | ||
|
||
script: | ||
- npm run eslint | ||
- npm run flow | ||
- npm run test | ||
jobs: | ||
fast_finish: true | ||
include: | ||
# https://docs.travis-ci.com/user/build-stages/deploy-github-releases/ | ||
- stage: Release | ||
name: "Releasing a new version" | ||
if: tag IS present | ||
env: TRAVIS_MODE=release | ||
deploy: | ||
- provider: releases | ||
api_key: | ||
secure: $GH_TOKEN | ||
file_glob: true | ||
file: dist/* | ||
prerelease: true | ||
skip_cleanup: true | ||
on: | ||
branch: master | ||
tags: true | ||
- provider: npm | ||
api_key: $NPM_TOKEN | ||
email: $NPM_EMAIL | ||
skip_cleanup: true | ||
on: | ||
tags: true | ||
branch: master | ||
# publish canary package if on master | ||
- stage: Release canary | ||
if: (branch = master) AND (type != pull_request) AND commit_message !~ /^chore\(release\)/ | ||
env: TRAVIS_MODE=releaseCanary | ||
deploy: | ||
provider: npm | ||
api_key: $NPM_TOKEN | ||
email: $NPM_EMAIL | ||
skip_cleanup: true | ||
tag: canary | ||
on: | ||
tags: false | ||
branch: master | ||
# Required tests | ||
- stage: Tests | ||
if: (branch = master) OR (tag IS present) OR (type = pull_request) | ||
name: "Running lint" | ||
env: TRAVIS_MODE=lint | ||
- stage: Tests | ||
if: (branch = master) OR (tag IS present) OR (type = pull_request) | ||
name: "Running Flow type check" | ||
env: TRAVIS_MODE=flow | ||
- stage: Tests | ||
if: (branch = master) OR (tag IS present) OR (type = pull_request) | ||
name: "Running unit tests" | ||
env: TRAVIS_MODE=unitTests |
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,112 +1 @@ | ||
# PlayKit JS IMA DAI - IMA DAI plugin for the [PlayKit JS Player] | ||
|
||
[![Build Status](https://travis-ci.org/kaltura/playkit-js-ima-dai.svg?branch=master)](https://travis-ci.org/kaltura/playkit-js-ima-dai) | ||
|
||
PlayKit JS IMA DAI plugin integrates [IMA DAI SDK for HTML5] with the [PlayKit JS Player]. | ||
|
||
PlayKit JS IMA DAI is written in [ECMAScript6], statically analysed using [Flow] and transpiled in ECMAScript5 using [Babel]. | ||
|
||
[IMA DAI SDK for HTML5]: https://developers.google.com/interactive-media-ads/docs/sdks/html5/dai/ | ||
[Flow]: https://flow.org/ | ||
[ECMAScript6]: https://github.com/ericdouglas/ES6-Learning#articles--tutorials | ||
[Babel]: https://babeljs.io | ||
|
||
## Getting Started | ||
|
||
### Prerequisites | ||
The plugin requires [PlayKit JS Player] to be loaded first. | ||
|
||
The plugin uses the [IMA DAI SDK for HTML5] Javascript SDK, if the SDK is already loaded on the page the plugin will use it, and if it's not then it will load it. | ||
|
||
[Playkit JS Player]: https://github.com/kaltura/playkit-js | ||
|
||
### Installing | ||
|
||
First, clone and run [yarn] to install dependencies: | ||
|
||
[yarn]: https://yarnpkg.com/lang/en/ | ||
|
||
``` | ||
git clone https://github.com/kaltura/playkit-js-ima-dai.git | ||
cd playkit-js-ima | ||
yarn install | ||
``` | ||
|
||
### Building | ||
|
||
Then, build the player | ||
|
||
```javascript | ||
yarn run build | ||
``` | ||
|
||
### Embed the library in your test page | ||
|
||
Finally, add the bundle as a script tag in your page, and initialize the player | ||
|
||
```html | ||
<script type="text/javascript" src="/PATH/TO/FILE/playkit.js"></script> <!--PlayKit player--> | ||
<script type="text/javascript" src="/PATH/TO/FILE/playkit-ima-dai.js"></script> <!--PlayKit IMA plugin--> | ||
<div id="videoContainer" style="height:360px; width:640px"> | ||
<script type="text/javascript"> | ||
var config = { | ||
... | ||
plugins: { | ||
imaDAI: { | ||
imaDAI: { | ||
assetKey: "sN_IYUG8STe1ZzhIIE_ksA", | ||
cmsId : "19463", | ||
videoId : "tears-of-steel", | ||
apiKey:null, | ||
isLive:true | ||
} | ||
} | ||
} | ||
... | ||
}; | ||
var player = playkit.loadPlayer("videoContainer", config); | ||
player.play(); | ||
</script> | ||
``` | ||
|
||
|
||
## Running the tests | ||
|
||
Tests can be run locally via [Karma], which will run on Chrome, Firefox and Safari | ||
|
||
[Karma]: https://karma-runner.github.io/1.0/index.html | ||
``` | ||
yarn run test | ||
``` | ||
|
||
You can test individual browsers: | ||
``` | ||
yarn run test:chrome | ||
yarn run test:firefox | ||
yarn run test:safari | ||
``` | ||
|
||
### And coding style tests | ||
|
||
We use ESLint [recommended set](http://eslint.org/docs/rules/) with some additions for enforcing [Flow] types and other rules. | ||
|
||
See [ESLint config](.eslintrc.json) for full configuration. | ||
|
||
We also use [.editorconfig](.editorconfig) to maintain consistent coding styles and settings, please make sure you comply with the styling. | ||
|
||
|
||
## Compatibility | ||
|
||
TBD | ||
|
||
## Contributing | ||
|
||
Please read [CONTRIBUTING.md](https://gist.github.com/PurpleBooth/b24679402957c63ec426) for details on our code of conduct, and the process for submitting pull requests to us. | ||
|
||
## Versioning | ||
|
||
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/kaltura/playkit-js-ima/tags). | ||
|
||
## License | ||
|
||
This project is licensed under the AGPL-3.0 License - see the [LICENSE.md](LICENSE.md) file for details |
Oops, something went wrong.