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 496496 // Keep track of this Howl group in the global controller.
497497 Howler . _howls . push ( self ) ;
498498
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+
499509 // Load the source file unless otherwise specified.
500510 if ( self . _preload ) {
501511 self . load ( ) ;
19891999 parent . _loadQueue ( ) ;
19902000 }
19912001
1992- if ( parent . _autoplay ) {
1993- parent . play ( ) ;
1994- }
1995-
19962002 // Clear the event listener.
19972003 self . _node . removeEventListener ( Howler . _canPlayEvent , self . _loadFn , false ) ;
19982004 }
21102116 self . _emit ( 'load' ) ;
21112117 self . _loadQueue ( ) ;
21122118 }
2113-
2114- // Begin playback if specified.
2115- if ( self . _autoplay ) {
2116- self . play ( ) ;
2117- }
21182119 } ;
21192120
21202121 /**
You can’t perform that action at this time.
0 commit comments