File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 1465
1465
if ( loop ) {
1466
1466
sound . _node . bufferSource . loopStart = sound . _start || 0 ;
1467
1467
sound . _node . bufferSource . loopEnd = sound . _stop ;
1468
+
1469
+ if ( self . playing ( ids [ i ] ) ) {
1470
+ // Buffer needs to be refreshed if an active audio is playing as some browsers, like Firefox, will not loop otherwise
1471
+ if ( typeof sound . _node . bufferSource . stop === 'undefined' ) {
1472
+ sound . _node . bufferSource . noteOff ( 0 ) ;
1473
+ } else {
1474
+ sound . _node . bufferSource . stop ( 0 ) ;
1475
+ }
1476
+
1477
+ self . _refreshBuffer ( sound ) ;
1478
+
1479
+ if ( typeof sound . _node . bufferSource . start === 'undefined' ) {
1480
+ sound . _node . bufferSource . noteGrainOn ( 0 , self . seek ( ids [ i ] ) , 86400 ) ;
1481
+ } else {
1482
+ sound . _node . bufferSource . start ( 0 , self . seek ( ids [ i ] ) , 86400 ) ;
1483
+ }
1484
+ }
1468
1485
}
1469
1486
}
1470
1487
}
You can’t perform that action at this time.
0 commit comments