{ "id": "61335", "key": "TIMOB-703", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "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": [ { "id": "11223", "name": "Release 1.3.0", "archived": true, "released": true, "releaseDate": "2010-05-05" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2011-04-17T01:53:58.000+0000", "created": "2011-04-15T02:34:49.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "blainhamon", "key": "blainhamon", "displayName": "Blain Hamon", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2011-04-17T01:53:58.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}

see:

\n

// Registers this class as the delegate of the audio session.\n[[AVAudioSession sharedInstance] setDelegate: self];
\n// Allow the app sound to continue to play when the screen is\nlocked. [[AVAudioSession sharedInstance]\nsetCategory:AVAudioSessionCategoryPlayback error:nil];

\n

this came from premium support:

\n

http://helpdesk.appcelerator.net/tickets/1751

\n

need to decide on the property name

{html}", "attachment": [], "flagged": false, "summary": "allow audio to play even when phone is locked/sleeping", "creator": { "name": "nwright", "key": "nwright", "displayName": "Nolan Wright", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "nwright", "key": "nwright", "displayName": "Nolan Wright", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "123852", "author": { "name": "kosso", "key": "kosso", "displayName": "kosso", "active": true, "timeZone": "Europe/London" }, "body": "{html}

As a further note to this (as it might be related), users have\nnoticed that when playing a video using the VideoPlayer, switching\nthe silent switch on the side of the phone on and off that audio\ncontinues to be heard from the speaker (without headphones plugged\nin) : this is expected, I believe.

\n

But when listening to audio playing using the Sound object,\nswitching the silent/mute switch does turn the speaker off and\non.

\n

Is this expected behavior?

\n

I guess using the AudioPlayer would have the same effect as the\nVideoPlayer?

\n

(ps: I use the Sound object for a remote url, since the\nAudioPlayer does not have the ability to provide the 'duration' of\nthe remote audio - but only 'progress')

{html}", "updateAuthor": { "name": "kosso", "key": "kosso", "displayName": "kosso", "active": true, "timeZone": "Europe/London" }, "created": "2011-04-15T02:34:49.000+0000", "updated": "2011-04-15T02:34:49.000+0000" }, { "id": "123853", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

The switch that allows audio to play while locked also allows\naudio to play when silenced/muted. Your issue will be fixed.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:34:50.000+0000", "updated": "2011-04-15T02:34:50.000+0000" }, { "id": "123854", "author": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "body": "{html}

(from [fecb672c56b4a807661607bce1eb4bc326189d69])\nCloses #703: Support for different audio playback\nstyles. See sound_local.js for an example. Descriptions of the\naudio modes will be posted to the lighthouse ticket for this bug.\n\nhttp://github.com/appcelerator/titanium_mobile/commit/fecb672c56b4a...

{html}", "updateAuthor": { "name": "jhaynie", "key": "jhaynie", "displayName": "Jeff Haynie", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:34:50.000+0000", "updated": "2011-04-15T02:34:50.000+0000" }, { "id": "123855", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Here are the new constants defined in Ti.Media that define audio\nmodes:

\n
\nAUDIO_SESSION_MODE_AMBIENT: Audio is mixed with existing audio, does not play on mute/lock.\nAUDIO_SESSION_MODE_SOLO_AMBIENT: The default mode.  Audio is not mixed, does not play on mute/lock.\nAUDIO_SESSION_MODE_PLAYBACK: Audio is not mixed, does play on mute/lock.\nAUDIO_SESSION_MODE_RECORD: Default mode for recording.  Silences all playback audio.\nAUDIO_SESSION_MODE_PLAY_AND_RECORD: Allows for simultaneous playing and recording of audio.\n
\n

Please remember that while recording/playing, the setting for\nthat media audio component is considered GLOBAL (this is how it's\nimplemented natively; no way around it). This means that if you\nstart playing one sound in the middle of another, you may get\nunpredictable results. Make sure that when mixing a window that\nsupports both playing and recording to use the PLAY_AND_RECORD mode\non everything if necessary, and to halt recording on playback (and\npossibly vice-versa) otherwise.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T02:34:50.000+0000", "updated": "2011-04-15T02:34:50.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }