Skip to content

Commit

Permalink
Fixed an issue where controller only wasn't working
Browse files Browse the repository at this point in the history
  • Loading branch information
travist committed Oct 13, 2021
1 parent 4c9c1b8 commit 0f2261d
Show file tree
Hide file tree
Showing 13 changed files with 34 additions and 26 deletions.
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-13T14:32:42-06:00 using the <a
on 2014-12-13T14:44:21-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-13T14:32:42-06:00 using the <a
on 2014-12-13T14:44:21-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-13T14:32:42-06:00 using the <a
on 2014-12-13T14:44:21-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-13T14:32:42-06:00 using the <a
on 2014-12-13T14:44:21-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-13T14:32:42-06:00 using the <a
on 2014-12-13T14:44:21-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-13T14:32:43-06:00 using the <a
on 2014-12-13T14:44:21-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-13T14:32:43-06:00 using the <a
on 2014-12-13T14:44:21-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-13T14:32:42-06:00 using the <a
on 2014-12-13T14:44:21-06:00 using the <a
href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
Expand Down
4 changes: 4 additions & 0 deletions templates/default/css/osmplayer_default.css
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,10 @@
-webkit-box-shadow:0px 5px 10px #333;/*no-important chrome*/
}

.player-ui.controller-only.osmplayer-default {
overflow: inherit;
}

.minplayer-default {
position: absolute;
top: 0px;
Expand Down
19 changes: 11 additions & 8 deletions templates/default/js/osmplayer.controller.default.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,13 @@
}, this.options);

minplayer.controller.prototype.construct.call(this);
var self = this;

// Don't execute if we want to hide the controller.
if (!this.options.showController) {
this.display.removeClass('with-controller');
this.get('player', function(player) {
player.display.removeClass('with-controller');
});
return;
}

Expand All @@ -52,11 +55,11 @@
this.display.removeClass('minplayer-controls-volume-horizontal');
}

if (this.options.controllerOnly) {
this.display.addClass('controller-only');
}
else {
this.get('player', function(player) {
this.get('player', function(player) {
if (self.options.controllerOnly) {
player.display.addClass('controller-only');
}
else {
this.get('media', function(media) {
if (!media.hasController()) {
this.showThenHide(5000, function(shown) {
Expand All @@ -68,8 +71,8 @@
player.display.addClass('with-controller');
}
});
});
}
}
});
};

/**
Expand Down
2 changes: 1 addition & 1 deletion templates/default/osmplayer.default.js

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions templates/simpleblack/js/osmplayer.controller.simpleblack.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
}, this.options);

minplayer.controller.prototype.construct.call(this);

if (this.options.controllerOnly) {
this.display.addClass('controller-only');
}
else {
this.get('player', function(player) {
var self = this;
this.get('player', function(player) {
if (self.options.controllerOnly) {
player.display.addClass('controller-only');
}
else {
this.get('media', function(media) {
if (!media.hasController()) {
this.showThenHide(5000, function(shown) {
Expand All @@ -48,8 +48,8 @@
player.display.addClass('with-controller');
}
});
});
}
}
});
}

/**
Expand Down
3 changes: 2 additions & 1 deletion templates/stretchy/js/osmplayer.controller.stretchy.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
}, this.options);

minplayer.controller.prototype.construct.call(this);
var self = this;

// Don't execute if we want to hide the controller.
if (!this.options.showController) {
Expand All @@ -50,7 +51,7 @@
}

this.get('player', function(player) {
if (this.options.controllerOnly) {
if (self.options.controllerOnly) {
this.display.addClass('controller-only');
player.display.css('overflow', 'visible');
}
Expand Down

0 comments on commit 0f2261d

Please sign in to comment.