Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: refactor youbora implementation #6

Merged
merged 33 commits into from
Aug 22, 2017
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
f7c7e10
chore(init project): init youbora plugin repo
May 7, 2017
39d6291
fix(.gitignore): fix gitignore
May 7, 2017
9228084
new branch, init youbora
May 7, 2017
89bdff5
Delete dan_ziv.xml
May 7, 2017
9f183f2
Delete vcs.xml
May 7, 2017
17f4ac3
feat(youbora plugin): init youbora plugin implementation (#1)
May 7, 2017
171ae6e
chore(add samples): add samples folder for testing
May 8, 2017
1f4096e
chore(move to constants): move the player events and states to consta…
May 8, 2017
3827f61
docs: complete js-docs (#4)
May 8, 2017
042144d
chore: remove redundant semicolons
May 10, 2017
5ca5baf
chore: update env (#5)
Jun 5, 2017
b6fcf7a
youbora analytics
yairans Jul 20, 2017
76e680b
remove window.player
yairans Jul 20, 2017
8d0daf9
remove get title method
yairans Jul 20, 2017
ff9b37c
remove import
yairans Jul 20, 2017
729232d
update env
Jul 20, 2017
9bc3815
tests
yairans Jul 20, 2017
9e40ef2
Merge branch 'youbora-analytics' of https://github.com/kaltura/playki…
yairans Jul 20, 2017
86b887e
player name
yairans Jul 20, 2017
2938bfd
chore: update dist
yairans Jul 21, 2017
923a085
username
yairans Jul 23, 2017
2578388
chore: update dist
yairans Jul 23, 2017
842f7f2
fix test
yairans Jul 23, 2017
04fb64f
youbora lib 5.3.10
yairans Jul 23, 2017
3825070
chore: update dist
yairans Jul 23, 2017
edfef5d
fix test
yairans Jul 23, 2017
9a3c1ec
Update webpack.config.js
Jul 23, 2017
b0ec742
update env
Aug 9, 2017
5f8ff95
Merge branch 'master' of https://github.com/kaltura/playkit-js-youbor…
yairans Aug 16, 2017
194a780
CR fixes
yairans Aug 16, 2017
3efa365
Merge branch 'youbora-analytics' of https://github.com/kaltura/playki…
yairans Aug 16, 2017
e14ed5c
add player metadata in the constructor
yairans Aug 16, 2017
3830f0b
CR fixes
yairans Aug 22, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"presets": [
"es2015"
],
"plugins": [
"transform-flow-strip-types",
"transform-class-properties"
],
"env": {
"test": {
"plugins": [
"istanbul"
]
}
}
}
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
6 changes: 6 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/src/youbora.lib.min.js
/flow-typed/
/coverage
/dist
karma.conf.js
webpack.config.js
32 changes: 32 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"parser": "babel-eslint",
"extends": [
"eslint:recommended",
"plugin:flowtype/recommended"
],
"plugins": [
"import",
"flowtype",
"mocha-no-only"
],
"env": {
"browser": true,
"es6": true,
"mocha": true,
"amd": true,
"commonjs": true
},
"globals": {
"should": true,
"sinon": true
},
"rules": {
"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/conventional-changelog-core/test/fixtures/_malformation.json
.*/node_modules/playkit-js/src/
[include]
[libs]
node_modules/playkit-js/flow-typed/
[options]
unsafe.enable_getters_and_setters=true
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,10 @@ jspm_packages

# Optional REPL history
.node_repl_history

#VSCode configuration
.vscode

.idea/

/dist/
24 changes: 24 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
sudo: required
dist: trusty
language: node_js
node_js:
- "node"

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

script:
- npm run eslint
- npm run flow
- npm run test
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# playkit-js-youbora
# playkit-js-youbora
79 changes: 79 additions & 0 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
const isWindows = /^win/.test(process.platform);
const isMacOS = /^darwin/.test(process.platform);
// Create custom launcher in case running with Travis
const customLaunchers = {
Chrome_travis_ci: {
base: 'Chrome',
flags: ['--no-sandbox']
}
};

module.exports = function (config) {
let karmaConf = {
logLevel: config.LOG_INFO,
browsers: [
'Chrome',
'Firefox'
],
concurrency: 1,
singleRun: true,
colors: true,
frameworks: [
'mocha'
],
files: [
'test/setup/karma.js'
],
preprocessors: {
'src/**/*.js': [
'webpack',
'sourcemap'
],
'test/setup/karma.js': [
'webpack',
'sourcemap'
]
},
reporters: [
'progress',
'coverage'
],
webpack: {
devtool: 'inline-source-map',
module: {
rules: [{
test: /\.js$/,
use: [{
loader: "babel-loader"
}],
exclude: [
/node_modules/
]
}]
}
},
webpackServer: {
noInfo: true
},
client: {
mocha: {
reporter: 'html'
}
}
};

if (process.env.TRAVIS) {
karmaConf.customLaunchers = customLaunchers;
karmaConf.browsers = [
'Chrome_travis_ci'
];
} else {
if (isWindows) {
karmaConf.browsers.push('IE');
} else if (isMacOS) {
karmaConf.browsers.push('Safari');
}
}

config.set(karmaConf);
};
86 changes: 86 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"name": "playkit-js-youbora",
"version": "0.0.1",
"main": "dist/playkit-youbora.js",
"scripts": {
"clean": "rm -rf ./dist",
"prebuild": "npm run clean",
"build:prod": "NODE_ENV=production webpack",
"build": "webpack",
"dev": "webpack --progress --colors --watch",
"test": "NODE_ENV=test karma start --color",
"test:chrome": "NODE_ENV=test karma start --color --browsers Chrome",
"test:chrome:dots": "NODE_ENV=test karma start --color --browsers Chrome --reporters dots",
"test:firefox": "NODE_ENV=test karma start --color --browsers Firefox",
"test:safari": "NODE_ENV=test karma start --color --browsers Safari",
"test:watch": "NODE_ENV=test karma start --color --auto-watch",
"start": "webpack-dev-server",
"release": "standard-version",
"publish": "git push --follow-tags --no-verify origin master",
"eslint": "eslint . --color",
"flow": "flow check",
"eslint:flow:test": "npm run eslint && npm run flow && npm run test",
"commit:dist": "git add --force --all dist && (git commit -m 'chore: update dist' || exit 0)"
},
"standard-version": {
"scripts": {
"postbump": "yarn run build && yarn run build:prod && npm run commit:dist"
}
},
"devDependencies": {
"babel-cli": "^6.18.0",
"babel-core": "^6.18.2",
"babel-eslint": "^7.1.1",
"babel-loader": "^6.2.7",
"babel-plugin-istanbul": "^4.0.0",
"babel-plugin-transform-class-properties": "^6.22.0",
"babel-plugin-transform-flow-strip-types": "^6.22.0",
"babel-preset-es2015": "^6.18.0",
"babel-register": "^6.23.0",
"chai": "^3.5.0",
"cross-env": "^3.1.4",
"css-loader": "^0.28.4",
"eslint": "^3.10.0",
"eslint-loader": "^1.6.1",
"eslint-plugin-flowtype": "^2.30.0",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-mocha-no-only": "^0.0.5",
"flow-bin": "latest",
"istanbul": "^0.4.5",
"karma": "^1.5.0",
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "^2.0.0",
"karma-cli": "^1.0.1",
"karma-coverage": "^1.1.1",
"karma-firefox-launcher": "^1.0.1",
"karma-ie-launcher": "^1.0.0",
"karma-mocha": "^1.3.0",
"karma-safari-launcher": "^1.0.0",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^2.0.2",
"mocha": "^3.2.0",
"mocha-cli": "^1.0.1",
"playkit-js": "https://github.com/kaltura/playkit-js.git#develop",
"pre-push": "^0.1.1",
"sinon": "^2.0.0",
"sinon-chai": "^2.8.0",
"standard-version": "^4.0.0",
"style-loader": "^0.18.2",
"uglifyjs-webpack-plugin": "^0.4.3",
"webpack": "latest",
"webpack-dev-server": "latest"
},
"peerDependencies": {
"playkit-js": "https://github.com/kaltura/playkit-js.git#develop"
},
"keywords": [],
"license": "AGPL-3.0",
"repository": {
"type": "git",
"url": "git+https://github.com/kaltura/playkit-js-youbora.git"
},
"bugs": {
"url": "https://github.com/kaltura/playkit-js-youbora/issues"
},
"homepage": "https://github.com/kaltura/playkit-js-youbora#readme"
}
34 changes: 34 additions & 0 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script src="./playkit-youbora.js"></script>
</head>
<body>
<div id="player-placeholder"></div>
<script>
window.p = Playkit.loadPlayer('player-placeholder', {
sources: {
"progressive": [
{
"url": "http://deslasexta.antena3.com/mp_series1/2012/09/10/00001.mp4",
"mimetype": "video/mp4",
"id": "id1",
"width": 200,
"height": 100,
"bandwidth": 100000,
"label": "label1"
}
]
},
plugins: {
youbora: {
'accountCode': 'powerdev'
}
}
});
window.p.play();
</script>
</body>
</html>
Loading