Random Photo Control is the phone-friendly companion to the random-photo viewer. It lets one or more phones cycle through the current Unsplash slideshow, pause and resume auto-advance, and see richer details for the photo currently on the display.
The viewer owns all slideshow state. The control sends commands to the viewer:
rc.sendFunctionCall("random-photo", "randomPhoto.prev");
rc.sendFunctionCall("random-photo", "randomPhoto.next");
rc.sendFunctionCall("random-photo", "randomPhoto.toggle");
rc.sendFunctionCall("random-photo", "randomPhoto.requestState", rc.client);
The viewer sends snapshots back to controls through the global callback:
randomPhotoControl.receiveState(snapshot);
Written in ES5 with XMLHttpRequest-compatible state handling, simple flexbox controls, and conservative CSS for older mobile browsers.
/random-photo-c/?r=<room>