@@ -508,6 +508,7 @@ var ReactDriveIn = (function (React) { 'use strict';
508
508
_this . loop = true ;
509
509
_this . loopPlaylistItems = false ;
510
510
_this . slideshow = false ;
511
+ _this . startPaused = false ;
511
512
512
513
_this . playlistLength = 0 ;
513
514
_this . currentItem = 0 ;
@@ -870,7 +871,11 @@ var ReactDriveIn = (function (React) { 'use strict';
870
871
871
872
var onCanPlay = function onCanPlay ( ) {
872
873
_this2 . emit ( "media.canplay" ) ;
873
- mediaEl . play ( ) ;
874
+
875
+ if ( ! _this2 . startPaused ) {
876
+ mediaEl . play ( ) ;
877
+ }
878
+
874
879
if ( _this2 . _seeking ) {
875
880
_this2 . _seeking = false ;
876
881
}
@@ -917,6 +922,10 @@ var ReactDriveIn = (function (React) { 'use strict';
917
922
918
923
_this3 . _slideshowTimer = new Timer ( ended , _this3 . slideshowItemDuration * 1000 ) ;
919
924
925
+ if ( _this3 . startPaused ) {
926
+ _this3 . _slideshowTimer . pause ( ) ;
927
+ }
928
+
920
929
_this3 . _slideshowTimer . on ( "pause" , onPause ) ;
921
930
}
922
931
} ;
@@ -1086,6 +1095,8 @@ var ReactDriveIn = (function (React) { 'use strict';
1086
1095
1087
1096
this . slideshow = options . slideshow ;
1088
1097
1098
+ this . startPaused = options . startPaused ;
1099
+
1089
1100
this . parentEl = this . _setParent ( options . el ) ;
1090
1101
1091
1102
var mediaEl = this . _createMediaEl ( ) ;
@@ -1259,6 +1270,7 @@ var ReactDriveIn = (function (React) { 'use strict';
1259
1270
className : props . className ,
1260
1271
mute : props . mute ,
1261
1272
loop : props . loop ,
1273
+ playing : ! props . paused ,
1262
1274
loopPaylistItems : props . loopPlaylistItems ,
1263
1275
slideshow : props . slideshow ,
1264
1276
volume : props . volume ,
@@ -1329,7 +1341,8 @@ var ReactDriveIn = (function (React) { 'use strict';
1329
1341
1330
1342
this . DI . init ( {
1331
1343
el : this . getMedia ( ) ,
1332
- slideshow : this . props . slideshow
1344
+ slideshow : this . props . slideshow ,
1345
+ startPaused : this . props . paused
1333
1346
} ) ;
1334
1347
1335
1348
var options = {
@@ -1429,6 +1442,7 @@ var ReactDriveIn = (function (React) { 'use strict';
1429
1442
showPlaylist : React . PropTypes . oneOfType ( [ React . PropTypes . array ] ) ,
1430
1443
poster : React . PropTypes . string ,
1431
1444
mute : React . PropTypes . bool ,
1445
+ paused : React . PropTypes . bool ,
1432
1446
loop : React . PropTypes . bool ,
1433
1447
loopPlaylistItems : React . PropTypes . bool ,
1434
1448
playbackRate : React . PropTypes . number ,
0 commit comments