From a99512b9c3a9d015b53c61a0393fe91fa308af63 Mon Sep 17 00:00:00 2001 From: Tianxiao Wang Date: Mon, 23 Mar 2020 13:35:16 +0800 Subject: [PATCH] fix: export controller component (#117) * fix: export controller component * v1.5.1 --- CHANGELOG.md | 11 +++++++ example/CHANGELOG.md | 8 +++++ example/package.json | 4 +-- lerna.json | 2 +- packages/griffith-mp4/CHANGELOG.md | 8 +++++ packages/griffith-mp4/package.json | 2 +- packages/griffith-standalone/CHANGELOG.md | 8 +++++ packages/griffith-standalone/package.json | 4 +-- packages/griffith/CHANGELOG.md | 11 +++++++ packages/griffith/package.json | 4 +-- .../src/components/Controller/Controller.js | 30 ++++++++++++------- packages/griffith/src/index.js | 1 + website/CHANGELOG.md | 8 +++++ website/package.json | 2 +- 14 files changed, 83 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e4fa5c40..c6597ca0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.5.1](https://github.com/zhihu/griffith/compare/v1.5.0...v1.5.1) (2020-03-23) + + +### Bug Fixes + +* export controller component ([4918a95](https://github.com/zhihu/griffith/commit/4918a95)) + + + + + # [1.5.0](https://github.com/zhihu/griffith/compare/v1.4.5...v1.5.0) (2019-05-13) diff --git a/example/CHANGELOG.md b/example/CHANGELOG.md index f07c228b..289773a7 100644 --- a/example/CHANGELOG.md +++ b/example/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.5.1](https://github.com/xiaoyuhen/griffith/compare/v1.5.0...v1.5.1) (2020-03-23) + +**Note:** Version bump only for package example + + + + + # [1.5.0](https://github.com/zhihu/griffith/compare/v1.4.5...v1.5.0) (2019-05-13) diff --git a/example/package.json b/example/package.json index 3f19c4f8..40b65b4a 100644 --- a/example/package.json +++ b/example/package.json @@ -1,6 +1,6 @@ { "name": "example", - "version": "1.5.0", + "version": "1.5.1", "private": true, "scripts": { "build": "NODE_ENV=production webpack --env production", @@ -9,7 +9,7 @@ "dependencies": { "@babel/polyfill": "^7.0.0", "@hot-loader/react-dom": "^16.8.6", - "griffith": "^1.5.0", + "griffith": "^1.5.1", "query-string": "^6.3.0", "raf": "^3.4.1", "react": "16.4.2", diff --git a/lerna.json b/lerna.json index 0257fe73..00abcdc3 100644 --- a/lerna.json +++ b/lerna.json @@ -2,7 +2,7 @@ "packages": [ "packages/*" ], - "version": "1.5.0", + "version": "1.5.1", "conventionalCommits": true, "npmClient": "yarn", "useWorkspaces": true diff --git a/packages/griffith-mp4/CHANGELOG.md b/packages/griffith-mp4/CHANGELOG.md index e23483f5..0cda3ef5 100644 --- a/packages/griffith-mp4/CHANGELOG.md +++ b/packages/griffith-mp4/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.5.1](https://github.com/xiaoyuhen/griffith/compare/v1.5.0...v1.5.1) (2020-03-23) + +**Note:** Version bump only for package griffith-mp4 + + + + + # [1.5.0](https://github.com/zhihu/griffith/compare/v1.4.5...v1.5.0) (2019-05-13) diff --git a/packages/griffith-mp4/package.json b/packages/griffith-mp4/package.json index 521983df..9de3380d 100644 --- a/packages/griffith-mp4/package.json +++ b/packages/griffith-mp4/package.json @@ -1,6 +1,6 @@ { "name": "griffith-mp4", - "version": "1.5.0", + "version": "1.5.1", "description": "griffith mp4 plugin", "homepage": "https://github.com/zhihu/griffith/tree/master/packages/griffith-mp4", "license": "MIT", diff --git a/packages/griffith-standalone/CHANGELOG.md b/packages/griffith-standalone/CHANGELOG.md index 7f0cf32b..caabb2cd 100644 --- a/packages/griffith-standalone/CHANGELOG.md +++ b/packages/griffith-standalone/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.5.1](https://github.com/xiaoyuhen/griffith/compare/v1.5.0...v1.5.1) (2020-03-23) + +**Note:** Version bump only for package griffith-standalone + + + + + # [1.5.0](https://github.com/zhihu/griffith/compare/v1.4.5...v1.5.0) (2019-05-13) diff --git a/packages/griffith-standalone/package.json b/packages/griffith-standalone/package.json index 1af47c28..4abcd37a 100644 --- a/packages/griffith-standalone/package.json +++ b/packages/griffith-standalone/package.json @@ -1,6 +1,6 @@ { "name": "griffith-standalone", - "version": "1.5.0", + "version": "1.5.1", "description": "Zhihu Video Player", "homepage": "https://github.com/zhihu/griffith/tree/master/packages/griffith-standalone", "license": "MIT", @@ -15,7 +15,7 @@ }, "devDependencies": { "babel-loader": "^8.0.5", - "griffith": "^1.5.0", + "griffith": "^1.5.1", "react": "16.4.2", "react-dom": "16.4.2" } diff --git a/packages/griffith/CHANGELOG.md b/packages/griffith/CHANGELOG.md index 29ff071d..fb0765b5 100644 --- a/packages/griffith/CHANGELOG.md +++ b/packages/griffith/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.5.1](https://github.com/xiaoyuhen/griffith/compare/v1.5.0...v1.5.1) (2020-03-23) + + +### Bug Fixes + +* export controller component ([4918a95](https://github.com/xiaoyuhen/griffith/commit/4918a95)) + + + + + # [1.5.0](https://github.com/zhihu/griffith/compare/v1.4.5...v1.5.0) (2019-05-13) diff --git a/packages/griffith/package.json b/packages/griffith/package.json index e924683f..84bba1a9 100644 --- a/packages/griffith/package.json +++ b/packages/griffith/package.json @@ -1,6 +1,6 @@ { "name": "griffith", - "version": "1.5.0", + "version": "1.5.1", "description": "Zhihu Video Player", "homepage": "https://github.com/zhihu/griffith/tree/master/packages/griffith", "license": "MIT", @@ -28,7 +28,7 @@ "eventemitter3": "^3.1.0", "griffith-hls": "^1.4.4", "griffith-message": "^1.4.4", - "griffith-mp4": "^1.5.0", + "griffith-mp4": "^1.5.1", "griffith-utils": "^1.4.4", "isomorphic-bigscreen": "2.0.5", "lodash": "4.17.13", diff --git a/packages/griffith/src/components/Controller/Controller.js b/packages/griffith/src/components/Controller/Controller.js index 38ece5e4..36628657 100644 --- a/packages/griffith/src/components/Controller/Controller.js +++ b/packages/griffith/src/components/Controller/Controller.js @@ -32,6 +32,8 @@ class Controller extends Component { onVolumeChange: PropTypes.func, onToggleFullScreen: PropTypes.func, show: PropTypes.bool, + hiddenQualityMenu: PropTypes.bool, + hiddenVolumeItem: PropTypes.bool, } static defaultProps = { @@ -42,6 +44,8 @@ class Controller extends Component { volume: 0.5, buffered: 0, isFullScreen: false, + hiddenVolumeItem: false, + hiddenQualityMenu: false, } state = { @@ -256,6 +260,8 @@ class Controller extends Component { onDragStart, onDragEnd, onToggleFullScreen, + hiddenVolumeItem, + hiddenQualityMenu, } = this.props const { isVolumeHovered, @@ -285,17 +291,19 @@ class Controller extends Component { currentTime={displayedCurrentTime} duration={duration} /> - - + {!hiddenQualityMenu && } + {!hiddenVolumeItem && ( + + )}