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

Problems with buffering upon stopping/playing videos


Steps to reproduce
1. Put player on local video A and B
2. Assign script on both players to _stop_ each other on 'play' event
3. Click with mouse on one player and then on another
Error ==> After several playing stopping second video stucks at buffering

4 Community Answers

George

JW Player Support Agent  
0 rated :

Please send us a test page replicating the issue as described in the document below:
https://support.jwplayer.com/customer/portal/articles/2186238-troubleshooting-%E2%80%94-creating-a-test-page

Todd

JW Player Support Agent  
0 rated :

We are not familiar with MS Visual Studio, so we will not be able to help out with troubleshooting that code, but I have created a code example using Javascript. I am using MP4 videos here. What kind of videos are you using?

Here is my code example to automatically pause all other videos but play the video the user has clicked on:

<div id="videoA"></div><br><br>
<div id="videoB"></div><br><br>
<div id="videoC"></div><br><br>
<div id="log"></div>
<script>
	jwplayer('videoA').setup({
		file: 'bunny.mp4'
	}).on('play',function(){
		pauseOthers(this.getContainer().id);	
	});
	
	jwplayer('videoB').setup({
		file: 'tears.mp4'
	}).on('play',function(){
		pauseOthers(this.getContainer().id);
	});

	jwplayer('videoC').setup({
		file: 'sintel.mp4'
	}).on('play',function(){
		pauseOthers(this.getContainer().id);
	});
	
	function pauseOthers(id) {
		console.log('Playback just started for: '+id);
		var videos = document.getElementsByTagName('video');
		for (i=0;i<videos.length;i++) {
			if (id != videos[i].parentNode.parentNode.id) {
				jwplayer(videos[i].parentNode.parentNode.id).pause(true);
				console.log('Pausing: '+videos[i].parentNode.parentNode.id);
			}
		}
	}
</script>

Siarhei

User  
0 rated :

Hello Todd and George

Thank you very much for the sample you provided.
After usage of pause(true) instead of stop() issue is not reproducible anymore.

Thanks again.

Todd

JW Player Support Agent  
0 rated :

You’re welcome. I will mark this support case as Resolved, but certainly contact us again if you have any other support questions or concerns.

This question has received the maximum number of answers.