Add volume slider for soundcloud because their widget is crap
This commit is contained in:
parent
84e9bcde06
commit
04cbdfb631
|
@ -331,3 +331,11 @@ html, body {
|
|||
#customembed_code {
|
||||
font-family: Monospace;
|
||||
}
|
||||
|
||||
#sc_volume .ui-slider-range {
|
||||
background: rgb(255, 195, 0);
|
||||
}
|
||||
|
||||
#sc_volume .ui-slider-handle {
|
||||
border-color: rgb(255, 195, 0);
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|||
var VIMEO_FLASH = false;
|
||||
|
||||
function removeOld(replace) {
|
||||
$("#sc_volume").remove();
|
||||
replace = replace || $("<div/>");
|
||||
var old = $("#ytapiplayer");
|
||||
replace.insertBefore(old);
|
||||
|
@ -349,6 +350,17 @@ var SoundcloudPlayer = function (data) {
|
|||
iframe.css("width", "100%").attr("height", "166");
|
||||
iframe.css("border", "none");
|
||||
|
||||
var volslider = $("<div/>").attr("id", "sc_volume")
|
||||
.insertAfter(iframe);
|
||||
|
||||
volslider.slider({
|
||||
range: "min",
|
||||
value: 100,
|
||||
stop: function (event, ui) {
|
||||
self.player.setVolume(ui.value);
|
||||
}
|
||||
});
|
||||
|
||||
self.player = SC.Widget("ytapiplayer");
|
||||
|
||||
self.player.bind(SC.Widget.Events.READY, function () {
|
||||
|
|
Loading…
Reference in a new issue