@scarlett-player/embed 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1606,7 +1606,10 @@ function createPlaylistPlugin(config) {
1606
1606
  const mergedConfig = { ...DEFAULT_CONFIG$1, ...config };
1607
1607
  let api = null;
1608
1608
  let tracks = mergedConfig.tracks || [];
1609
- let currentIndex = -1;
1609
+ let currentIndex = mergedConfig.initialIndex ?? -1;
1610
+ if (currentIndex < -1 || currentIndex >= tracks.length) {
1611
+ currentIndex = -1;
1612
+ }
1610
1613
  let shuffle = mergedConfig.shuffle || false;
1611
1614
  let repeat = mergedConfig.repeat || "none";
1612
1615
  let shuffleOrder = [];