As I previously noted in #1556490: Creating an audio player, the Controller Only setting is not being respected by OSM Player.
In this bit of code from osmplayer.module, it appears the problem is caused by the wrong parameter list being passed to drupal_add_js():
$player_params = module_invoke_all('osmplayer_params', $params);
$params = array_merge($params, $player_params);
// Add the osmplayer js.
drupal_add_js('
jQuery(document).ready(function() {
jQuery("#' . $params['id'] . '").osmplayer(' . drupal_json_encode($player_params) . ');
});
', 'inline');
Instead of the full, merged parameter array ($params), this passes the (override?) $player_params array, which is missing a few options:
theme (String, 11 characters ) ui-darkness
showWhenEmpty (Integer) 0
showController (Integer) 1
controllerOnly (Integer) 1
admin (Boolean) TRUE
player (String, 9 characters ) osmplayer
preset (String, 5 characters ) audio
Passing $params hides the viewer as I expect, although there are some additional issues: the controller is hidden as well and the viewer's screen real estate is not reclaimed.
Comments
Comment #1
travist commentedThere is a little bit more to this than passing the settings to the player. Currently, the new player probably doens't handle this setting as it should. But this is a blocker for 2.0, so I will look into it.
Thanks,
Travis.
Comment #2
mrtoner commentedAs far as reclaiming the real estate goes, I was mistaken. Since the playlist was on the right -- and I had specified a height of 450px for the player -- that area simply did what the CSS told it to do.
Comment #3
travist commentedI just committed a fix for this. Please try the latest DEV version tomorrow and let me know if it works for you.
Thanks,
Travis.
Comment #4
mrtoner commentedThe viewer is now hidden when Controller Only is selected. Not auto-hiding the controller in this instance is a nice touch. However, there are some problems introduced now, as I've detailed in #1559698: Playlist anomalies with Controller Only.