Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!-- Include the Pusher JavaScript library -->
<script src="http://js.pusher.com/2.2/pusher.min.js"></script>
 
// Enable Pusher logging - don't include this in production
Pusher.log = function(message) {
  if (window.console && window.console.log) {
    window.console.log(message);
  }
};
// Open a Pusher connection to the Realtime TfL Traffic Camera API
var pusher = new Pusher("f1b8177ecbc7a66de0c7");
var channel = pusher.subscribe("cameras");
var tflURL = "http://tfl.gov.uk/tfl/livetravelnews/trafficcams/cctv/";
// Listen for new updates
channel.bind("cameras-update", function(cameras) {
  var camerasArr = cameras.split("|");
  console.log(tflURL + camerasArr[0] + ".jpg");
});
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
robhawkespro
0viewers