Sorry if it is wrong section to post this. I want use JW player as an audio player.开发者_如何学C So I want to take it out the area above control bar which display thumbnails because I only want control bar to display. If that's only one song, i can just change the height of the JW player but now what I want is with playlist. So If i change the height of the JW player, the bottom playlist is screwed up. I attached the image to make it clear.
Playlist Become like this when I change the height of the JW player
Here is a solution I have put together using examples from JWPlayer's site:
jwplayer('video').setup({
width: '480',
height: '24',
'playlist': [{
'file': '/Nebraska.mp3',
'title': 'Nebraska - Bruce Springsteen'
}, {
'file': '/Atlantic_City.mp3',
'title': 'Atlantic City - Bruce Springsteen'
}],
modes: [
{ type: "html5" },
{ type: "flash", src: "/mediaplayer/player.swf" },
{ type: "download" }
],
'playlist.position': 'top',
'playlist.size': '120',
'controlbar': 'top'
});
The important things to note in my example are:
The height of the player. This should be
24px
, because24px
is the height of the control bar.The
playlist.position
andcontrolbar
properties. These should both be set to the same thing. I have set them both totop
; this will position the playlist above the player just like your example.The
playlist.size
property. Each playlist item has a height of60px
, therefore to avoid scrollbars and playlist item stretching this property should only be in multiples of60
, beginning at60
. You could probably calculate this to show only the number of playlist items required, and then have the user scroll to see the rest.
The final result I got looks like this:
精彩评论