{ "id": "107393", "key": "TIMOB-12210", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": null, "resolutiondate": null, "created": "2013-01-04T19:27:05.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:04:16.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h1. Feature\r\nAdd support for \"ducking\" and \"unducking\" the iOS audio session. The SDK doesn't expose this right now, but it can very easily.\r\n\r\nAn example of ducking is when the GPS lowers other sounds to say something, then raises them after it is done speaking.\r\n\r\nh2. Proposed Solution\r\nExpose \"Ti.Media.ducking = true /* or false */;\". Something like the following:\r\n\r\nIn TiMediaAudioSession.m:\r\n{code}\r\n-(void)setDucking:(UInt32)mode\r\n{\r\n\tif ([self isActive]) {\r\n\t\tDebugLog(@\"[WARN] Setting ducking while playing audio... changes will not take effect until audio is restarted.\");\r\n\t}\r\n\tAudioSessionSetProperty(kAudioSessionProperty_OtherMixableAudioShouldDuck,sizeof(mode),&mode);\r\n}\r\n{code}\r\n\r\nAnd in MediaModule.m:\r\n{code}\r\n-(void)setDucking:(NSNumber*)mode\r\n{\r\n [[TiMediaAudioSession sharedSession] setDucking:[mode unsignedIntValue]];\r\n}\r\n{code}\r\n\r\nh2. Apple Documentation\r\nApple talks about this feature in the last paragraph on this page: http://developer.apple.com/library/ios/#documentation/Audio/Conceptual/AudioSessionProgrammingGuide/Configuration/Configuration.html", "attachment": [], "flagged": false, "summary": "iOS: Audio Ducking Support", "creator": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "dtoth", "key": "dtoth", "displayName": "Dawson Toth", "active": true, "timeZone": "America/New_York" }, "environment": null, "comment": { "comments": [ { "id": "341516", "author": { "name": "trevor_chong", "key": "trevor_chong", "displayName": "Trevor Chong", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Yes,\r\nPlease allow more flexibility with regards to iOS audio session options like AVAudioSessionCategoryOptionMixWithOthers and AVAudioSessionCategoryOptionDuckOthers.", "updateAuthor": { "name": "trevor_chong", "key": "trevor_chong", "displayName": "Trevor Chong", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-01-30T22:18:25.000+0000", "updated": "2015-01-30T22:18:25.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }