Skip to content

Commit 6276dc9

Browse files
committed
Fullscreen includes custom controls
1 parent 9f7a9e2 commit 6276dc9

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

demo/src/components/App.css

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,11 @@
1616
color: #2492a8;
1717
}
1818

19-
.video {
20-
width: 634px;
21-
height: 356px;
22-
margin: 0 auto;
23-
}
24-
25-
2619
.videoListItem {
2720
background-color: #efefef;
2821
padding: 20px;
2922
margin-bottom: 20px;
23+
max-width: 634px;
24+
max-height: 356px;
25+
margin: 0 auto;
3026
}

demo/src/components/App.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ class App extends Component {
3030
onPlay={() => {
3131
this.refs.video2.videoEl.pause();
3232
}}
33-
className={styles.video}
3433
poster={sintelTrailerPoster}>
3534
<source src={sintelTrailer} type="video/mp4" />
3635
<track
@@ -53,7 +52,6 @@ class App extends Component {
5352
this.refs.video1.videoEl.pause();
5453
}}
5554
src={bigBuckBunny}
56-
className={styles.video}
5755
poster={bigBuckBunnyPoster}>
5856
</Video>
5957
</li>

src/DefaultPlayer/DefaultPlayer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ export default videoConnect(
123123
}
124124
}),
125125
(videoEl, state) => ({
126-
onFullscreenClick: () => fullscreen(videoEl),
126+
onFullscreenClick: () => fullscreen(videoEl.parentElement),
127127
onVolumeClick: () => toggleMute(videoEl, state),
128128
onCaptionsClick: () => toggleTracks(state),
129129
onPlayPauseClick: () => togglePause(videoEl, state),

0 commit comments

Comments
 (0)