Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Adding Fast Forward and Rewind controls?


I am new to JW 7 and not sure how to display the Fast Forward and Rewind buttons on the controls. I found this page, but not sure how I would add the controls using it https://developer.jwplayer.com/jw-player/docs/developer-guide/customization/css-skinning/skins_reference/

Any sample code to demonstrate how it's done?

1 Community Answers

Todd

JW Player Support Agent  
0 rated :

We do not have built-in functionality to add Fast Forward and Rewind buttons, but you could potentially use that skins reference doc to help add buttons via Javascript and CSS.

Here’s some sample code that would add both a rewind and fast forward button (set to seek the player back or ahead five seconds) to the control bar:

jwplayer().onReady(function(){
	var myRewButton = document.createElement("div");
	myRewButton.id = "myRewButton";
	myRewButton.setAttribute('style',"margin-left: 10px; margin-top: 14px; background-image: url('http://yoursite.com/rewind.png');background-repeat: no-repeat;");
	myRewButton.setAttribute('class','jw-icon jw-icon-inline jw-button-color jw-reset');
	myRewButton.setAttribute('onclick','jwplayer().seek(jwplayer().getPosition()-5)');
	var leftGroup = document.getElementsByClassName('jw-controlbar-left-group')[0];
	leftGroup.insertBefore(myRewButton, leftGroup.childNodes[0]);

	var myFFButton = document.createElement("div");
	myFFButton.id = "myFFButton";
	myFFButton.setAttribute('style',"margin-left: 10px; margin-top: 14px; background-image: url('http://yoursite.com/ff.png');background-repeat: no-repeat;");
	myFFButton.setAttribute('class','jw-icon jw-icon-inline jw-button-color jw-reset');
	myFFButton.setAttribute('onclick','jwplayer().seek(jwplayer().getPosition()+5)');
	leftGroup.insertBefore(myFFButton, leftGroup.childNodes[2]);
});

I didn’t grow up in Seattle, but I’ve always been a fan of KEXP. Guess I’ll have to go listen to an old Blue Scholars album now…

This question has received the maximum number of answers.