aiddev
aiddev

Reputation: 1429

when playing video show pause button in the middle of video jwplayer7

I am using jwplayer7, I hide controlbar cause my video is like background video and don't need any controls at the bottom of video, but when playing need to show pause button in the middle of video like play/replay button shows at the beggining/at the end. How can I do this?

Upvotes: 1

Views: 1930

Answers (3)

funrob
funrob

Reputation: 619

The center icon is hidden in the seven skin by default. You can target it and display it when the player is paused like so:

.jwplayer.jw-state-paused .jw-display-icon-container {
    display: table;
}

This is also the default on mobile browsers and smaller than ~400px setups since jwplayer 7.1. The .jw-flag-compact-player CSS class is added to the player container to enable this mode.

Upvotes: 2

Todd
Todd

Reputation: 249

My suggestion would be to create a div and use CSS to position it exactly where you want. Then make sure to call our Javascript API's pause event in the onclick.

It would look something like this:

<div style="your_CSS_here" onclick="jwplayer().pause();"></div>

By the way, we love Stack Overflow, but we spend more time answering questions submitted directly to our Support page at http://support.jwplayer.com. You might get a faster response from us over there...

Upvotes: 1

DannyZB
DannyZB

Reputation: 543

Since it's HTML5 you can use simple CSS to hide the controlbar - that way you preserve the rest of the functionality.

I just looked into jwPlayer7 documentation and apparently skinning for JWP7 also uses CSS on flash.

Can't really find the online doc for jw7 skinning on their site -> but what you do is you copy the skin folder you want and use "display:none" on the entire control bar, and load that skin during initialization.

Edit:

http://support.jwplayer.com/customer/portal/articles/1412123-building-jw-player-skins http://support.jwplayer.com/customer/portal/articles/2067702-skin-css

Upvotes: 2

Related Questions