Skip to content

Commit

Permalink
fix: export controller component (#117)
Browse files Browse the repository at this point in the history
* fix: export controller component

* v1.5.1
  • Loading branch information
xiaoyuhen authored Mar 23, 2020
1 parent 29355aa commit a99512b
Show file tree
Hide file tree
Showing 14 changed files with 83 additions and 20 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
8 changes: 8 additions & 0 deletions example/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
4 changes: 2 additions & 2 deletions example/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "example",
"version": "1.5.0",
"version": "1.5.1",
"private": true,
"scripts": {
"build": "NODE_ENV=production webpack --env production",
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"packages": [
"packages/*"
],
"version": "1.5.0",
"version": "1.5.1",
"conventionalCommits": true,
"npmClient": "yarn",
"useWorkspaces": true
Expand Down
8 changes: 8 additions & 0 deletions packages/griffith-mp4/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
2 changes: 1 addition & 1 deletion packages/griffith-mp4/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
8 changes: 8 additions & 0 deletions packages/griffith-standalone/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
4 changes: 2 additions & 2 deletions packages/griffith-standalone/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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"
}
Expand Down
11 changes: 11 additions & 0 deletions packages/griffith/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down
4 changes: 2 additions & 2 deletions packages/griffith/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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",
Expand Down
30 changes: 19 additions & 11 deletions packages/griffith/src/components/Controller/Controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -42,6 +44,8 @@ class Controller extends Component {
volume: 0.5,
buffered: 0,
isFullScreen: false,
hiddenVolumeItem: false,
hiddenQualityMenu: false,
}

state = {
Expand Down Expand Up @@ -256,6 +260,8 @@ class Controller extends Component {
onDragStart,
onDragEnd,
onToggleFullScreen,
hiddenVolumeItem,
hiddenQualityMenu,
} = this.props
const {
isVolumeHovered,
Expand Down Expand Up @@ -285,17 +291,19 @@ class Controller extends Component {
currentTime={displayedCurrentTime}
duration={duration}
/>
<QualityMenuItem />
<VolumeItem
volume={volume}
menuShown={isVolumeHovered || isVolumeDragging || isVolumeKeyboard}
onMouseEnter={this.handleVolumePointerEnter}
onMouseLeave={this.handleVolumePointerLeave}
onToggleMuted={this.handleToggleMuted}
onDragStart={this.handleVolumeDragStart}
onDragEnd={this.handleVolumeDragEnd}
onChange={this.handleVolumeChange}
/>
{!hiddenQualityMenu && <QualityMenuItem />}
{!hiddenVolumeItem && (
<VolumeItem
volume={volume}
menuShown={isVolumeHovered || isVolumeDragging || isVolumeKeyboard}
onMouseEnter={this.handleVolumePointerEnter}
onMouseLeave={this.handleVolumePointerLeave}
onToggleMuted={this.handleToggleMuted}
onDragStart={this.handleVolumeDragStart}
onDragEnd={this.handleVolumeDragEnd}
onChange={this.handleVolumeChange}
/>
)}
<FullScreenButtonItem
isFullScreen={isFullScreen}
onClick={onToggleFullScreen}
Expand Down
1 change: 1 addition & 0 deletions packages/griffith/src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export {default} from './components/PlayerContainer'
export {ExternalContext as MessageContext} from './contexts/Message'
export {VideoSourceContext} from './contexts/VideoSource'
export {default as Controller} from './components/Controller'
export {default as Layer} from './components/Layer'
8 changes: 8 additions & 0 deletions website/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 website





# [1.5.0](https://github.com/zhihu/griffith/compare/v1.4.5...v1.5.0) (2019-05-13)


Expand Down
2 changes: 1 addition & 1 deletion website/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "website",
"version": "1.5.0",
"version": "1.5.1",
"private": true,
"scripts": {
"build": "gatsby build",
Expand Down

0 comments on commit a99512b

Please sign in to comment.