Place JW Player 5.4 SUBEQ Plugin above the player

Third-party modifications and add-ons, Apps and Clients

Moderator: moderators

Place JW Player 5.4 SUBEQ Plugin above the player

Postby dba61 » Thu Jan 13, 2011 11:43 pm

Building on the great work of stozher http://forum.subsonic.org/forum/viewtop ... 9779#19779 the below modifications will put the SubEq plugin on top of the JW Player. Since the player will go from 24 px to 48 px high the padding must also be changed so the first track isn't hidden. For those of you who are color deficient like me this modification will help. I also set it to use a blue basecolor which allows us to see a seperation of colors. The items in Bold are the changes I made. The basecolors can be any HEX value http://htmlcolorcodes.org/ which are HTML safe colors.


The file we need to change is playlist.jsp. It can be opened with any Text editor. On a Linux system the easiest way is to open a Terminal session and type:

sudo gedit "/var/subsonic/jetty/XXXX/webapp/WEB-INF/jsp/playlist.jsp" replace xxxx with your version number.

1) Change the following from:

function createPlayer() {
var flashvars = {
backcolor:"<spring:theme code="backgroundColor"/>",
frontcolor:"<spring:theme code="textColor"/>",
plugins:"backstroke-1,subeq-1&subeq.gain=2&subeq.displaymode=decay&subeq.barbasecolor=00D61B",
id:"player1"
}
var params = {
allowfullscreen:"true",
allowscriptaccess:"always"
}
var attributes = {
id:"player1",
name:"player1"
}
swfobject.embedSWF("<c:url value="/flash/jw-player-5.4.swf"/>", "placeholder", "340", "24", "9.0.115", "false", flashvars, params, attributes);
}



to this.

}

function createPlayer() {
var flashvars = {
backcolor:"<spring:theme code="backgroundColor"/>",
frontcolor:"<spring:theme code="textColor"/>",
plugins:"backstroke-1,subeq-1&subeq.gain=2&subeq.displaymode=decay&subeq.barbasecolor=0000CC",
id:"player1"
};
var params = {
allowfullscreen:"true",
allowscriptaccess:"always"
};
var attributes = {
id:"player1",
name:"player1"
};
swfobject.embedSWF("<c:url value="/flash/jw-player-5.4.swf"/>", "placeholder", "340", "48", "9.0.115", false, flashvars, params, attributes);
}


2) Now we need to adjust the padding so that no tracks are hidden change this:

</script>

<div class="bgcolor2" style="position:fixed; top:0; width:100%;padding-top:0.5em">
<table style="white-space:nowrap;">
<tr style="white-space:nowrap;">
<c:if test="${model.user.settingsRole}">
<td><select name="player" onchange="location='playlist.view?player=' + options[selectedIndex].value;">
<c:forEach items="${model.players}" var="player">
<option ${player.id eq model.player.id ? "selected" : ""} value="${player.id}">${player.shortDescription}</option>
</c:forEach>
</select></td>
</c:if>
<c:if test="${model.player.web}">
<td style="width:340px; height:24px;padding-left:10px;padding-right:10px"><div id="placeholder">
<a href="http://www.adobe.com/go/getflashplayer" target="_blank"><fmt:message key="playlist.getflash"/></a>
</div></td>
</c:if>

<c:if test="${model.user.streamRole and not model.player.web}">
<td style="white-space:nowrap;" id="stop"><b><a href="javascript:noop()" onclick="onStop()"><fmt:message key="playlist.stop"/></a></b> | </td>
<td style="white-space:nowrap;" id="start"><b><a href="javascript:noop()" onclick="onStart()"><fmt:message key="playlist.start"/></a></b> | </td>

to this:

</script>

<div class="bgcolor2" style="position:fixed; top:0; width:100%;padding-top:-0.10em">
<table style="white-space:nowrap;">
<tr style="white-space:nowrap;">
<c:if test="${model.user.settingsRole}">
<td><select name="player" onchange="location='playlist.view?player=' + options[selectedIndex].value;">
<c:forEach items="${model.players}" var="player">
<option ${player.id eq model.player.id ? "selected" : ""} value="${player.id}">${player.shortDescription}</option>
</c:forEach>
</select></td>
</c:if>
<c:if test="${model.player.web}">
<td style="width:340px; height:24px;padding-left:10px;padding-right:10px"><div id="placeholder">
<a href="http://www.adobe.com/go/getflashplayer" target="_blank"><fmt:message key="playlist.getflash"/></a>
</div></td>
</c:if>

<c:if test="${model.user.streamRole and not model.player.web}">
<td style="white-space:nowrap;" id="stop"><b><a href="javascript:noop()" onclick="onStop()"><fmt:message key="playlist.stop"/></a></b> | </td>
<td style="white-space:nowrap;" id="start"><b><a href="javascript:noop()" onclick="onStart()"><fmt:message key="playlist.start"/></a></b> | </td>
dba61
 
Posts: 27
Joined: Sat Jul 11, 2009 11:48 pm

Re: Place JW Player 5.4 SUBEQ Plugin above the player

Postby trickydick » Tue Aug 30, 2011 2:12 pm

do you know how i can add this to a different part of the player? Like i currently have it inside the player which i'm ok with, but i want it moved to the right slightly so it doesn't cover the play/pause button. My current mod won;t support the above option, but it would be nice....if i were to hide/show the equilizer.
Tricky
User avatar
trickydick
 
Posts: 147
Joined: Wed Mar 30, 2011 12:43 am
Location: Sanford, North Carolina


Return to Mods, Apps and Clients

Who is online

Users browsing this forum: No registered users and 3 guests