Skip to content

Commit

Permalink
[update] add stopLoad and startLoad relate to #70
Browse files Browse the repository at this point in the history
  • Loading branch information
toxic-johann committed May 31, 2019
1 parent cf4ff80 commit 6386d5b
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 17 deletions.
5 changes: 4 additions & 1 deletion packages/chimee/__tests__/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,11 @@ describe('Chimee', () => {
});

test('kernel method', () => {
expect(player.play()).resolves.toBe();
expect(() => player.play()).not.toThrow();
expect(() => player.pause()).not.toThrow();
expect(() => player.seek(1)).not.toThrow();
expect(() => player.stopLoad()).not.toThrow();
expect(() => player.startLoad()).not.toThrow();
});

describe('video attr', () => {
Expand Down
16 changes: 10 additions & 6 deletions packages/chimee/build/rollup.config.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,18 +127,22 @@ export default function(mode) {
plugins: [
babel(babelConfig[mode]),
flow(),
resolve({
customResolveOptions: {
moduleDirectory: [ 'src', 'node_modules' ],
},
}),
commonjs(),
replace({
'process.env.PLAYER_VERSION': `'${version}'`,
}),
visualizer({
filename: `bundle-size/${mode}.html`,
}),
],
].concat(/min|umd|iife/.test(mode)
? [
resolve({
customResolveOptions: {
moduleDirectory: [ 'src', 'node_modules' ],
},
}),
]
: []
),
};
}
20 changes: 10 additions & 10 deletions packages/chimee/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,13 @@
"dependencies": {
"babel-runtime": "^6.26.0",
"chimee-helper": "^0.2.10",
"es-fullscreen": "^0.2.4",
"chimee-kernel": "^1.4.0",
"es-fullscreen": "^0.2.5",
"toxic-decorators": "^0.3.8"
},
"devDependencies": {
"babel-eslint": "^8.2.1",
"babel-jest": "^22.0.4",
"babel-jest": "^22.1.0",
"babel-plugin-external-helpers": "^6.22.0",
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-plugin-transform-runtime": "^6.23.0",
Expand All @@ -60,27 +61,26 @@
"babel-preset-es2015-rollup": "^3.0.0",
"babel-preset-flow": "^6.23.0",
"babel-preset-stage-0": "^6.24.1",
"chimee-kernel": "^1.3.2",
"chimee-kernel-flv": "^1.3.0",
"chimee-kernel-hls": "^1.0.7",
"chimee-kernel-flv": "^1.4.7",
"chimee-kernel-hls": "^1.2.0",
"chimee-plugin-center-state": "0.0.8",
"chimee-plugin-controlbar": "^0.4.0",
"chimee-plugin-danmu": "0.0.9",
"eslint": "^4.15.0",
"eslint": "^4.16.0",
"eslint-config-egg": "^6.0.0",
"eslint-plugin-flowtype": "^2.41.0",
"eslint-plugin-jest": "^21.6.1",
"eslint-plugin-jest": "^21.7.0",
"flow-bin": "^0.63.1",
"husky": "^0.14.3",
"jest": "^22.0.5",
"jest": "^22.1.4",
"npm-check-updates": "^2.13.0",
"pkg-ok": "^1.1.0",
"rollup": "^0.53.2",
"rollup": "^0.54.1",
"rollup-plugin-babel": "^3.0.2",
"rollup-plugin-commonjs": "^8.2.6",
"rollup-plugin-flow-no-whitespace": "^1.0.0",
"rollup-plugin-livereload": "^0.6.0",
"rollup-plugin-node-resolve": "^3.0.0",
"rollup-plugin-node-resolve": "^3.0.2",
"rollup-plugin-replace": "^2.0.0",
"rollup-plugin-serve": "^0.4.2",
"rollup-plugin-uglify": "^2.0.1",
Expand Down
1 change: 1 addition & 0 deletions packages/chimee/src/config/video.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ function accessorVideoAttribute(attribute: string | {set: string, get: string, i
? value
? ''
: undefined
/* istanbul ignore next */
: value === null
? undefined
: value;
Expand Down
2 changes: 2 additions & 0 deletions packages/chimee/src/helper/const.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ export const kernelMethods = [
'play',
'pause',
'seek',
'startLoad',
'stopLoad',
];
export const dispatcherMethods = [
'load',
Expand Down

0 comments on commit 6386d5b

Please sign in to comment.