From 7a98ee6092c8b030b748dbb2696dde127ec2a0bc Mon Sep 17 00:00:00 2001 From: Egor Date: Sat, 31 Dec 2016 13:05:06 -0800 Subject: [PATCH] [Android 7.0+] Support playing music in split screen mode --- README.md | 17 +++++++++++++++++ .../app/pods/components/music-tab/component.js | 2 +- mobile/ember-cordova/cordova/config.xml | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e4f561d..84c41a1 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,23 @@ storePassword=... keytool -genkey -v -keystore huegasm.keystore -alias huegasm -keyalg RSA -keysize 2048 -validity 10000 +## LE MONKEY PATCHES +- webView.setVerticalScrollBarEnabled(true); +- @Override + public void handleStop() { + if (!isInitialized()) { + return; + } + + sendJavascriptEvent("stop"); + + pluginManager.onStop(); + } +- channel.onStop = cordova.addDocumentEventHandler('stop'); +- case 'stop': + +Just search for 'pause' and add the same type of event stuff for 'stop'. This is needed for properly split screening Huegasm with other apps. + ## POSSIBLE FUTURE FEATURES - decode the hue color better - better visualizations diff --git a/mobile/app/pods/components/music-tab/component.js b/mobile/app/pods/components/music-tab/component.js index 0ca029b..99264b1 100644 --- a/mobile/app/pods/components/music-tab/component.js +++ b/mobile/app/pods/components/music-tab/component.js @@ -216,7 +216,7 @@ export default Component.extend(helperMixin, visualizerMixin, { this.set('oldPlayQueueLength', this.get('playQueue.length')); - document.addEventListener('pause', () => { + document.addEventListener('stop', () => { if(this.get('playing')){ this.send('play'); } diff --git a/mobile/ember-cordova/cordova/config.xml b/mobile/ember-cordova/cordova/config.xml index 0b68324..18b8c93 100644 --- a/mobile/ember-cordova/cordova/config.xml +++ b/mobile/ember-cordova/cordova/config.xml @@ -1,5 +1,5 @@ - + Huegasm