Skip to content

Commit

Permalink
feat(FEC-10015): support smart scrubber preview and timeline marker (#1)
Browse files Browse the repository at this point in the history
* `timeline` plugin.
* `TimelineManager` class which exposes: `addCuePoint`, `removeCuePoint` and `setSeekbarPreview`.
* `CuePoint` component.
* `adBreakCuePoint` config

depends on:
kaltura/kaltura-player-js#359
kaltura/playkit-js-ui#546

Solves [FEC-10015](https://kaltura.atlassian.net/browse/FEC-10015)
  • Loading branch information
yairans authored Dec 10, 2020
1 parent bf59901 commit f27d921
Show file tree
Hide file tree
Showing 45 changed files with 11,483 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"env": {
"test": {
"plugins": ["istanbul"]
}
},
"ignore": ["node_modules/**/*"],
"plugins": [
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-transform-flow-strip-types",
[
"@babel/plugin-proposal-decorators",
{
"legacy": true
}
],
"@babel/plugin-transform-property-mutators",
"@babel/plugin-proposal-object-rest-spread",
"@babel/plugin-proposal-class-properties",
"@babel/plugin-transform-classes",
[
"@babel/plugin-transform-react-jsx",
{
"pragma": "KalturaPlayer.ui.h"
}
]
],
"presets": ["@babel/preset-env", "@babel/preset-flow"]
}
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# http://editorconfig.org
root = true

[*]
charset = utf-8
indent_size = 2
end_of_line = lf
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/flow-typed/
/coverage
/dist
27 changes: 27 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"parser": "babel-eslint",
"extends": ["eslint:recommended", "plugin:flowtype/recommended"],
"plugins": ["prettier", "import", "flowtype", "mocha-no-only"],
"env": {
"browser": true,
"es6": true,
"mocha": true,
"amd": true,
"commonjs": true
},
"globals": {
"should": true,
"sinon": true,
"__VERSION__": true,
"__NAME__": true,
"process": true,
"__dirname": true,
"cssVars": true
},
"rules": {
"prettier/prettier": "error",
"mocha-no-only/mocha-no-only": "off",
"require-jsdoc": ["error"],
"valid-jsdoc": ["error"]
}
}
8 changes: 8 additions & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[ignore]
.*/node_modules
[include]
[libs]
node_modules/@playkit-js/playkit-js/flow-typed/
node_modules/kaltura-player-js/flow-typed/
[options]
esproposal.decorators=ignore
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE.md
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-timeline/issues): **\_\_**
- [ ] Which Plugin [version](https://github.com/kaltura/playkit-js-timeline/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.
```
12 changes: 12 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
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, weather 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
45 changes: 45 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# MacOS
.DS_Store

# Logs
logs
*.log
npm-debug.log*

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules
jspm_packages

# Optional npm cache directory
.npm
.npmrc

# Optional REPL history
.node_repl_history

.idea

dist/
49 changes: 49 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# MacOS
.DS_Store
# Logs
logs
*.log
npm-debug.log*
# Runtime data
pids
*.pid
*.seed
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# node-waf configuration
.lock-wscript
# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules
jspm_packages
# Optional npm cache directory
.npm
# Optional REPL history
.node_repl_history
.idea
.git
.gitattributes
.gitignore
.github
.prettierignore
.prettierrc
.travis.yml
docs/
scripts/
src/
test/
.babelrc
.editorconfig
.eslintignore
.eslintrc.json
.flowconfig
.nmprc
webpack.config.js
karma.conf.js
8 changes: 8 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/dist
/src/index.html
CHANGELOG.md
yarn.lock
yarn-error.log
LICENSE
/samples
coverage
12 changes: 12 additions & 0 deletions .prettierrc
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"
}
89 changes: 89 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
conditions: v1
sudo: required
dist: xenial
language: node_js
node_js:
- 'node'

addons:
chrome: stable

services:
- xvfb
cache:
yarn: true
directories:
- node_modules

before_install:
- export DISPLAY=:99.0
- chmod +x ./scripts/travis.sh

script: ./scripts/travis.sh

stages:
- Tests
- Release canary
- Release

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: $GH_TOKEN
file_glob: true
file: dist/*
prerelease: true
skip_cleanup: true
on:
branch: master
tags: true
- provider: npm
edge: true
api_key: $NPM_TOKEN
email: $NPM_EMAIL
skip_cleanup: true
on:
tags: true
branch: master
after_deploy:
- currentVersion=$(npx -c 'echo "$npm_package_version"')
- chmod +x ./scripts/after_deploy.sh
- ./scripts/after_deploy.sh "timeline" "$currentVersion" "$JENKINS_TAG_TOKEN"
# 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
after_deploy:
- currentVersion=$(npx -c 'echo "$npm_package_version"')
- echo $currentVersion
- chmod +x ./scripts/after_deploy.sh
- ./scripts/after_deploy.sh "timeline" "$currentVersion" "$JENKINS_CANARY_TOKEN"
# 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
Empty file added CHANGELOG.md
Empty file.
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
theme: jekyll-theme-cayman
Binary file added docs/images/custom-cue-point.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/non-sticky-cue-point.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/non-sticky-preview.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/simple-cue-point.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/sticky-preview.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit f27d921

Please sign in to comment.