ScaleEngine Blog

Pausing a stream after a few seconds with JW player

October 9, 2014

To pause your jw player stream after some time (maybe you don't want people leaving a stream on all night?), add this to your ScaleEngine embed code.

		jwplayer('se_video').onTime(function(event) {
			if (event.position > 900 && event.position < 900.4) {
				this.pause();
		} });
	

You can use this.stop(); also, but it doesn't keep the last frame on screen for you. Adjust the timer number you want, I've shown 15 minutes in this example.

Permalink