Skip to content

Commit

Permalink
Fixed an issue where the loadqueue would get messed up by continually…
Browse files Browse the repository at this point in the history
… adding new items to the queue.
  • Loading branch information
travist committed Oct 15, 2021
1 parent 01339c5 commit 297a929
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion bin/osmplayer.compressed.js

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions bin/osmplayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2975,6 +2975,14 @@ minplayer.players.base.prototype.onLoaded = function() {
// See if we are loaded.
var isLoaded = this.loaded;

// If we should autoplay, then just play now.
if (!this.loaded && this.options.autoplay) {
this.play();
}

// We are now loaded.
this.loaded = true;

// Iterate through our ready queue.
for (var i in this.loadedQueue) {
if(this.loadedQueue.hasOwnProperty(i)) {
Expand All @@ -2986,14 +2994,6 @@ minplayer.players.base.prototype.onLoaded = function() {
this.loadedQueue.length = 0;
this.loadedQueue = [];

// If we should autoplay, then just play now.
if (!this.loaded && this.options.autoplay) {
this.play();
}

// We are now loaded.
this.loaded = true;

// Trigger this event.
this.trigger('loadeddata');
};
Expand Down
2 changes: 1 addition & 1 deletion bin/osmplayer.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion doc/classes.list.html
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ <h3 class="subsection-title">Classes</h3>

<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a>
on 2014-12-14T22:17:21-06:00 using the <a
on 2014-12-14T23:05:01-06:00 using the <a
href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
Expand Down
2 changes: 1 addition & 1 deletion doc/global.html
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ <h4><span class="type-signature"></span>osmplayer<span class="type-signature"></

<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a>
on 2014-12-14T22:17:21-06:00 using the <a
on 2014-12-14T23:05:01-06:00 using the <a
href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
Expand Down
2 changes: 1 addition & 1 deletion doc/global.html#osmplayer
Original file line number Diff line number Diff line change
Expand Up @@ -1857,7 +1857,7 @@

<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a>
on 2014-12-14T22:17:21-06:00 using the <a
on 2014-12-14T23:05:01-06:00 using the <a
href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
Expand Down
2 changes: 1 addition & 1 deletion doc/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@

<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a>
on 2014-12-14T22:17:21-06:00 using the <a
on 2014-12-14T23:05:01-06:00 using the <a
href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
Expand Down
2 changes: 1 addition & 1 deletion doc/osmplayer.pager.html
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ <h4 class="name" id="construct"><span class="type-signature"></span>construct<sp

<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a>
on 2014-12-14T22:17:21-06:00 using the <a
on 2014-12-14T23:05:01-06:00 using the <a
href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
Expand Down
2 changes: 1 addition & 1 deletion doc/osmplayer.playlist.html
Original file line number Diff line number Diff line change
Expand Up @@ -1896,7 +1896,7 @@ <h4 class="name" id="setQueue"><span class="type-signature"></span>setQueue<span

<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a>
on 2014-12-14T22:17:21-06:00 using the <a
on 2014-12-14T23:05:01-06:00 using the <a
href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
Expand Down
2 changes: 1 addition & 1 deletion doc/osmplayer.teaser.html
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ <h5>Parameters:</h5>

<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a>
on 2014-12-14T22:17:21-06:00 using the <a
on 2014-12-14T23:05:01-06:00 using the <a
href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
Expand Down
2 changes: 1 addition & 1 deletion doc/prototype..html
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ <h5>Returns:</h5>

<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a>
on 2014-12-14T22:17:21-06:00 using the <a
on 2014-12-14T23:05:01-06:00 using the <a
href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
Expand Down

0 comments on commit 297a929

Please sign in to comment.