{"action":"created","issue":{"url":"https://api.github.com/repos/swiftcodex/Swift-Radio-Pro/issues/60","repository_url":"https://api.github.com/repos/swiftcodex/Swift-Radio-Pro","labels_url":"https://api.github.com/repos/swiftcodex/Swift-Radio-Pro/issues/60/labels{/name}","comments_url":"https://api.github.com/repos/swiftcodex/Swift-Radio-Pro/issues/60/comments","events_url":"https://api.github.com/repos/swiftcodex/Swift-Radio-Pro/issues/60/events","html_url":"https://github.com/swiftcodex/Swift-Radio-Pro/pull/60","id":241240202,"number":60,"title":"Automatically update Volume Slider by using the device volume buttons","user":{"login":"jmtaverne","id":26202418,"avatar_url":"https://avatars7.githubusercontent.com/u/26202418?v=4","gravatar_id":"","url":"https://api.github.com/users/jmtaverne","html_url":"https://github.com/jmtaverne","followers_url":"https://api.github.com/users/jmtaverne/followers","following_url":"https://api.github.com/users/jmtaverne/following{/other_user}","gists_url":"https://api.github.com/users/jmtaverne/gists{/gist_id}","starred_url":"https://api.github.com/users/jmtaverne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmtaverne/subscriptions","organizations_url":"https://api.github.com/users/jmtaverne/orgs","repos_url":"https://api.github.com/users/jmtaverne/repos","events_url":"https://api.github.com/users/jmtaverne/events{/privacy}","received_events_url":"https://api.github.com/users/jmtaverne/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-07-07T11:46:49Z","updated_at":"2017-07-14T17:08:40Z","closed_at":"2017-07-11T19:03:28Z","pull_request":{"url":"https://api.github.com/repos/swiftcodex/Swift-Radio-Pro/pulls/60","html_url":"https://github.com/swiftcodex/Swift-Radio-Pro/pull/60","diff_url":"https://github.com/swiftcodex/Swift-Radio-Pro/pull/60.diff","patch_url":"https://github.com/swiftcodex/Swift-Radio-Pro/pull/60.patch"},"body":"You can add following code in the NowPlayingViewController.swift file for automatically changing the Volume Slider by pressing the Volume-keys on your device. It doesn't worked for me before. This code is working in Swift 3.\r\n\r\nAdd in ViewDidLoad:\r\n\r\n`listenVolumeButton()`\r\n\r\nAdd following functions:\r\n\r\n```\r\nfunc listenVolumeButton(){\r\n       let audioSession = AVAudioSession.sharedInstance()\r\n       do{\r\n           try audioSession.setActive(true)\r\n           let vol = audioSession.outputVolume\r\n           print(vol.description) //gets initial volume\r\n       }\r\n       catch{\r\n           print(\"Error info: \\(error)\")\r\n       } \r\n       audioSession.addObserver(self, forKeyPath: \"outputVolume\", options:\r\n           NSKeyValueObservingOptions.new, context: nil)    \r\n   }\r\n   \r\n   override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) {\r\n       if keyPath == \"outputVolume\"{\r\n           let volume = (change?[NSKeyValueChangeKey.newKey] as!\r\n               NSNumber).floatValue\r\n           print(\"volume \" + volume.description)\r\n           slider?.value = volume\r\n       }\r\n   }\r\n   \r\n   override func viewWillDisappear(_ animated: Bool) {\r\n       let audioSession = AVAudioSession.sharedInstance()\r\n       audioSession.removeObserver(self, forKeyPath: \"outputVolume\")    \r\n   }\r\n```"},"comment":{"url":"https://api.github.com/repos/swiftcodex/Swift-Radio-Pro/issues/comments/315413382","html_url":"https://github.com/swiftcodex/Swift-Radio-Pro/pull/60#issuecomment-315413382","issue_url":"https://api.github.com/repos/swiftcodex/Swift-Radio-Pro/issues/60","id":315413382,"user":{"login":"Javame","id":391375,"avatar_url":"https://avatars4.githubusercontent.com/u/391375?v=4","gravatar_id":"","url":"https://api.github.com/users/Javame","html_url":"https://github.com/Javame","followers_url":"https://api.github.com/users/Javame/followers","following_url":"https://api.github.com/users/Javame/following{/other_user}","gists_url":"https://api.github.com/users/Javame/gists{/gist_id}","starred_url":"https://api.github.com/users/Javame/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Javame/subscriptions","organizations_url":"https://api.github.com/users/Javame/orgs","repos_url":"https://api.github.com/users/Javame/repos","events_url":"https://api.github.com/users/Javame/events{/privacy}","received_events_url":"https://api.github.com/users/Javame/received_events","type":"User","site_admin":false},"created_at":"2017-07-14T17:08:39Z","updated_at":"2017-07-14T17:08:39Z","body":"Hello all and happy Friday.\n\n\nI don't if know I'm the only using Radionomy stream links , apparently\n they have shutdown the stream URL.  Does anyone know how  to update the\nstation lists remotely without re-submitting a new build to the App Store?\n\n\nThank you,\nChar\n\nOn Fri, Jul 14, 2017 at 11:55 AM, Kris <notifications@github.com> wrote:\n\n> Mmm, I'm not as smart as i thought - every time i add the code my app it\n> breaks - i downloaded a new master but i don't see this new code in the\n> code...\n>\n> —\n> You are receiving this because you are subscribed to this thread.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/swiftcodex/Swift-Radio-Pro/pull/60#issuecomment-315410443>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/AAX4z5UBb2WRVSNcDi4mEoDNP1qq96sKks5sN52VgaJpZM4OQ1yc>\n> .\n>\n"}}
{"actor":{"display_login":"Javame"}}