@@ -16,7 +16,9 @@ class App extends React.Component {
1616 infinite : true ,
1717 showThumbnails : true ,
1818 showFullscreenButton : true ,
19+ showGalleryFullscreenButton : true ,
1920 showPlayButton : true ,
21+ showGalleryPlayButton : true ,
2022 showNav : true ,
2123 slideInterval : 2000 ,
2224 showVideo : { } ,
@@ -73,11 +75,15 @@ class App extends React.Component {
7375 }
7476
7577 _resetVideo ( ) {
76- this . setState ( {
77- showVideo : { } ,
78- showPlayButton : true ,
79- showFullscreenButton : true
80- } ) ;
78+ this . setState ( { showVideo : { } } ) ;
79+
80+ if ( this . state . showPlayButton ) {
81+ this . setState ( { showGalleryPlayButton : true } ) ;
82+ }
83+
84+ if ( this . state . showFullscreenButton ) {
85+ this . setState ( { showGalleryFullscreenButton : true } ) ;
86+ }
8187 }
8288
8389 _toggleShowVideo ( url ) {
@@ -88,11 +94,11 @@ class App extends React.Component {
8894
8995 if ( this . state . showVideo [ url ] ) {
9096 if ( this . state . showPlayButton ) {
91- this . setState ( { showPlayButton : false } ) ;
97+ this . setState ( { showGalleryPlayButton : false } ) ;
9298 }
9399
94100 if ( this . state . showFullscreenButton ) {
95- this . setState ( { showFullscreenButton : false } ) ;
101+ this . setState ( { showGalleryFullscreenButton : false } ) ;
96102 }
97103 }
98104 }
@@ -169,8 +175,8 @@ class App extends React.Component {
169175 onPlay = { this . _onPlay . bind ( this ) }
170176 infinite = { this . state . infinite }
171177 showBullets = { this . state . showBullets }
172- showFullscreenButton = { this . state . showFullscreenButton }
173- showPlayButton = { this . state . showPlayButton }
178+ showFullscreenButton = { this . state . showFullscreenButton && this . state . showGalleryFullscreenButton }
179+ showPlayButton = { this . state . showPlayButton && this . state . showGalleryPlayButton }
174180 showThumbnails = { this . state . showThumbnails }
175181 showIndex = { this . state . showIndex }
176182 showNav = { this . state . showNav }
0 commit comments