Skip to content

Instantly share code, notes, and snippets.

@rmcauley
Created February 1, 2017 12:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rmcauley/b4dae3754abf26c886b05b0b4a3abcd4 to your computer and use it in GitHub Desktop.
Save rmcauley/b4dae3754abf26c886b05b0b4a3abcd4 to your computer and use it in GitHub Desktop.
var iOSAppMode = window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.rainwavePlay;
if (iOSAppMode) {
self.play = function () {
window.webkit.messageHandlers.rainwavePlay.postMessage();
};
self.stop = function () {
window.webkit.messageHandlers.rainwaveStop.postMessage();
};
self.useStreamURLs = function (streamURLs) {
window.webkit.messageHandlers.rainwaveUseStreamURLs.postMessage(streamURLs);
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment