File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change 496
496
// Keep track of this Howl group in the global controller.
497
497
Howler . _howls . push ( self ) ;
498
498
499
+ // If they selected autoplay, add a play event to the load queue.
500
+ if ( self . _autoplay ) {
501
+ self . _queue . push ( {
502
+ event : 'play' ,
503
+ action : function ( ) {
504
+ self . play ( ) ;
505
+ }
506
+ } ) ;
507
+ }
508
+
499
509
// Load the source file unless otherwise specified.
500
510
if ( self . _preload ) {
501
511
self . load ( ) ;
1989
1999
parent . _loadQueue ( ) ;
1990
2000
}
1991
2001
1992
- if ( parent . _autoplay ) {
1993
- parent . play ( ) ;
1994
- }
1995
-
1996
2002
// Clear the event listener.
1997
2003
self . _node . removeEventListener ( Howler . _canPlayEvent , self . _loadFn , false ) ;
1998
2004
}
2110
2116
self . _emit ( 'load' ) ;
2111
2117
self . _loadQueue ( ) ;
2112
2118
}
2113
-
2114
- // Begin playback if specified.
2115
- if ( self . _autoplay ) {
2116
- self . play ( ) ;
2117
- }
2118
2119
} ;
2119
2120
2120
2121
/**
You can’t perform that action at this time.
0 commit comments