Live Thumbnail API

From Livestream » User Guide

Jump to: navigation, search

Livestream provides a thumbnail API which gives you the ability to periodically retrieve screenshots of the currently running video stream for any channel.

The API provides JPEG thumbnails in 240x180 format and is accessible here:

http://thumbnail.api.livestream.com/thumbnail?name=mogulusbackstage

In order to avoid caching from interfering, you should add a random parameter at the end of that URL to make sure you always get the latest thumbnail.

Here is an example of how to implement an updating thumbnail:

<img id="thumbnail" src="http://thumbnail.api.livestream.com/thumbnail?name=chan" 
	style="width:240px; height:180px">
 
<script language="JavaScript" type="text/javascript">
	function updateThumb() {
		thumbnail = document.getElementById('thumbnail');
		thumbnail.src = "http://thumbnail.api.livestream.com/thumbnail?name=chan&t=" 
			+ new Date().valueOf();
	}
 
	setInterval("updateThumb()", 10000);
</script>