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

displaydescription


I have several movies. the first move shows the title and description and you push the play button to start. it will automatically continue to the next move and so on. is there a way to have the discretion for each movie show for 5 seconds when it starts and then stop the description. and then show for 5 seconds on the next ovie when it starts, and so on.

3 Community Answers

Todd

JW Player Support Agent  
0 rated :

We do not have built-in functionality to automatically show the title and description when playback starts, but you could probably do this by using our Javascript API to change the CSS on the player to display the titles for the desired time.

I haven’t tested it yet, but my first try would be to use .on(‘playlistItem’) as this fires each time a new playlist video starts and then change display on the CSS class that contains the title and description. I would also start a Javascript timer with setTimeout to change the CSS display back to none after five seconds.

j...

User  
0 rated :

Well ok, thanks, I have not got into any of the Javascript API yet, so untill I learn about doing that it will have to wait.

Thanks,
John

Todd

JW Player Support Agent  
0 rated :

I just wrote a test page and the following code displays the title and description for five seconds and then hides it again:

<div id="player"></div>
<script>
	jwplayer('player').setup({
		playlist: [{
			file: 'bunny.m3u8',
			title: 'Big Buck Bunny',
			description: 'Movie trailer'
		},{
			file: 'tears.m3u8',
			title: 'Tears of Steel',
			description: 'Another movie trailer'
		},{
			file: 'sintel.m3u8',
			title: 'Sintel',
			description: 'Third movie trailer'
		}],
		height:'360',
		width: '640'
	});
	jwplayer().on('playlistItem',function(){
		console.log('Starting new video -- displaying title');
		document.getElementsByClassName('jw-title')[0].style.display = 'block';
		setTimeout(function(){
			console.log("Time's up -- hiding title");
			document.getElementsByClassName('jw-title')[0].style.display = 'none';
		}, 5000);
	});
</script>

This question has received the maximum number of answers.