开发者

JW Player How to take out the screen area above the control bar?

开发者 https://www.devze.com 2023-02-28 01:40 出处:网络
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 contr

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.

JW Player How to take out the screen area above the control bar?

Playlist Become like this when I change the height of the JW player

JW Player How to take out the screen area above the control bar?


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:

  1. The height of the player. This should be 24px, because 24px is the height of the control bar.

  2. The playlist.position and controlbar properties. These should both be set to the same thing. I have set them both to top; this will position the playlist above the player just like your example.

  3. The playlist.size property. Each playlist item has a height of 60px, therefore to avoid scrollbars and playlist item stretching this property should only be in multiples of 60, beginning at 60. 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:

JW Player How to take out the screen area above the control bar?

0

精彩评论

暂无评论...
验证码 换一张
取 消