{ "id": "150128", "key": "TIMOB-20035", "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": [], "resolution": { "id": "10100", "description": "This issue won't be actioned.", "name": "Won't Do" }, "resolutiondate": "2020-06-30T14:48:35.000+0000", "created": "2015-08-04T09:42:59.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "allowbackground", "audioPlayerAPIs", "win" ], "versions": [ { "id": "14826", "description": "Release 5.1.0-remaining iOS9 features, Android M features", "name": "Release 5.1.0", "archived": false, "released": true, "releaseDate": "2015-11-20" } ], "issuelinks": [ { "id": "50205", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "154084", "key": "TIMOB-20185", "fields": { "summary": "Windows: Documention on custom capabilities", "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" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } }, { "id": "50006", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "153531", "key": "TIMOB-20080", "fields": { "summary": "Windows: Ti.Media.AudioPlayer background audio for Windows 10", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false } } } }, { "id": "56424", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "171362", "key": "TIMOB-25891", "fields": { "summary": "Windows: Use of deprecated methods in Ti.Media", "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" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } } ], "assignee": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "updated": "2020-06-30T14:48:35.000+0000", "status": { "description": "A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.", "name": "Resolved", "id": "5", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "12642", "name": "Windows", "description": "Windows authoring support" } ], "description": "the stream starts and plays, but if the app goes to background (tap on windows-button) or device goes into looked-mode the stream stops. the stream starts to play again if the app returns to the foreground. the \"allowBackground\" feature is set in the doc as available for windows from version 4.1.0.", "attachment": [], "flagged": false, "summary": "Windows:Ti.Media.AudioPlayer => allowBackground has no effect", "creator": { "name": "endomedia", "key": "endomedia", "displayName": "Uwe Endesfelder", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "endomedia", "key": "endomedia", "displayName": "Uwe Endesfelder", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "tested on simulators and on device (NOKIA Lumia 630 DualSIM with Win 8.1 Update)\r\nalso tested with the latest continuous build", "closedSprints": [ { "id": 536, "state": "closed", "name": "2015 Sprint 25 SDK", "startDate": "2015-12-05T01:30:40.415Z", "endDate": "2015-12-19T01:30:00.000Z", "completeDate": "2015-12-29T03:19:42.127Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "359260", "author": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "body": "[~endomedia] please attach a test case and steps to reproduce this issue\r\n\r\n", "updateAuthor": { "name": "rtlechuga", "key": "rtlechuga", "displayName": "Radamantis Torres-Lechuga", "active": false, "timeZone": "Asia/Dubai" }, "created": "2015-08-07T02:55:27.000+0000", "updated": "2015-08-07T02:55:27.000+0000" }, { "id": "359431", "author": { "name": "endomedia", "key": "endomedia", "displayName": "Uwe Endesfelder", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "*Sample Code:*\r\n{code}\r\nvar audioPlayer = Ti.Media.createAudioPlayer({\r\n\turl:\t\t\t\t'http://streams.rsa-sachsen.de/rsa-live/mp3-192/mediaplayerrsa',\r\n\tallowBackground:\ttrue,\r\n});\r\naudioPlayer.setAllowBackground(true);\r\nvar win = Titanium.UI.createWindow({\r\n title:\t\t\t\t'winstream',\r\n backgroundColor:\t'#ccc',\r\n});\r\nvar button = Titanium.UI.createButton({\r\n title:\t\t\t\t'play',\r\n});\r\nbutton.addEventListener('click',function() {\r\n\taudioPlayer.start();\r\n});\r\nwin.add(button);\r\nwin.open();\r\n{code}\r\nAnd here is a short videoclip from the behaviour on a real windowsphone-device:\r\n\r\nhttp://www.endomedia.de/appc/winstream.mp4", "updateAuthor": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2015-08-10T12:12:56.000+0000", "updated": "2015-11-14T02:49:03.000+0000" }, { "id": "372543", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR: https://github.com/appcelerator/titanium_mobile_windows/pull/497", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2015-12-09T19:48:19.000+0000", "updated": "2015-12-10T02:45:14.000+0000" }, { "id": "382630", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "body": "[~gmathews] tested on both windows 8.1 & 10.0 phones and allowBackground does not seem to work, Included the extension in the tiapp.xml and used your sample code, am I missing anything else? on the windows 10 phone I receive the following error when trying to play the stream with allowBackground set to {{true}} : \r\n{code:java}\r\n// Some comments here\r\npublic String getFoo()\r\n[ERROR] Application Error: \"Runtime Error during click event: unknown exception\"\r\n{code}\r\n\r\nTested on: \r\nWindows 10 Pro \r\nWindows Phone 10.0 & 8.1 (Microsoft Lumia 640 LTE) \r\nAppc Studio: 4.6.0.201604081249 \r\nTi SDK: 5.3.0.v20160413061223 \r\nAppc NPM: 4.2.5-1 \r\nAppc Core: 5.3.0-12 \r\nNode: v4.4.2", "updateAuthor": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2016-04-13T18:15:43.000+0000", "updated": "2016-04-13T18:15:43.000+0000" }, { "id": "384400", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~htbryant] Try this in your {{tiapp.xml}}, it includes {{Executable=\"$targetnametoken$.exe\"}}\r\n\r\n{code}\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n{code}", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-04-30T02:40:57.000+0000", "updated": "2016-04-30T02:40:57.000+0000" }, { "id": "384888", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "body": "[~gmathews] I've included the revised tiapp.xml, and allowBackground still has no effect on a Windows 10 device. The build fails completely when attempting to deploy to a Windows 8.1\r\n{code:java}\r\n[ERROR] : C:\\Users\\test\\.titanium\\vsbuild\\ThursdayTest2\\phone.ARM\\Package.appxmanifest(55,8): error APPX1668: App manifest contains a background task contract which uses executable 'ThursdayTest2.exe', but does not specify task type 'Control Channel' or 'Push Notification'. Leave the field blank instead. [C:\\Users\\test\\.titanium\\vsbuild\\ThursdayTest2\\phone.ARM\\ThursdayTest2.vcxproj]\r\n[TRACE] : Done Building Project \"C:\\Users\\test\\.titanium\\vsbuild\\ThursdayTest2\\phone.ARM\\ThursdayTest2.vcxproj\" (default targets) -- FAILED.\r\n[TRACE] : Done Building Project \"C:\\Users\\test\\.titanium\\vsbuild\\ThursdayTest2\\phone.ARM\\ThursdayTest2.vcxproj.metaproj\" (default targets) -- FAILED.\r\n[TRACE] : Done Building Project \"C:\\Users\\test\\.titanium\\vsbuild\\ThursdayTest2\\phone.ARM\\ThursdayTest2.sln\" (default targets) -- FAILED.\r\n[DEBUG] : Build FAILED.\r\n[DEBUG] : \r\n[ERROR] : \"C:\\Users\\test\\.titanium\\vsbuild\\ThursdayTest2\\phone.ARM\\ThursdayTest2.sln\" (default target) (1) ->\r\n\"C:\\Users\\test\\.titanium\\vsbuild\\ThursdayTest2\\phone.ARM\\ThursdayTest2.vcxproj.metaproj\" (default target) (2) ->\r\n\"C:\\Users\\test\\.titanium\\vsbuild\\ThursdayTest2\\phone.ARM\\ThursdayTest2.vcxproj\" (default target) (6) ->\r\n(_ValidateAppxManifest target) -> \r\n C:\\Users\\test\\.titanium\\vsbuild\\ThursdayTest2\\phone.ARM\\Package.appxmanifest(55,8): error APPX1668: App manifest contains a background task contract which uses executable 'ThursdayTest2.exe', but does not specify task type 'Control Channel' or 'Push Notification'. Leave the field blank instead. [C:\\Users\\test\\.titanium\\vsbuild\\ThursdayTest2\\phone.ARM\\ThursdayTest2.vcxproj]\r\n 0 Warning(s)\r\n 1 Error(s)\r\nTime Elapsed 00:00:27.50\r\n{code}\r\n\r\nTested on: \r\nWindows 10 Pro \r\nWindows Phone 10.0 & 8.1 (Microsoft Lumia 640 LTE) \r\nAppc Studio: 4.6.0.201605030516\r\nTi SDK: 5.3.0.v20160503133640\r\nAppc NPM: 4.2.5-5\r\nAppc Core: 5.3.0-43\r\nNode: v4.4.2\r\n", "updateAuthor": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2016-05-05T18:10:26.000+0000", "updated": "2016-05-05T18:14:18.000+0000" }, { "id": "385015", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-05-06T18:12:22.000+0000", "updated": "2016-05-06T18:12:22.000+0000" }, { "id": "385579", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "body": "[~gmathews] that issue has been addressed but including {{Executable=\"$targetnametoken$.exe\"}} still causes that error on 8.1. Additionally, allowBackground remains to have any effect whatsoever on windows 10 phones, here is the following test case performed:\r\n\r\n1. Launch App.\r\n2. Press \"Play\" to start stream.\r\n3. Press Windows Home button.\r\n4. Stream cuts out after a few seconds.\r\n5. Return the backgrounded app to the foreground.\r\n6. Stream continues. \r\n\r\nAccording to the documentation, allowBackground should allow the audio stream to continue playing even when the app is backgrounded.\r\n\r\nTested on: \r\nWindows 10 Pro \r\nWindows Phone 10.0 & 8.1 (Microsoft Lumia 640 LTE) \r\nAppc Studio: 4.6.0.201605030516\r\nTi SDK: 5.3.0.v20160509143032\r\nAppc NPM: 4.2.5-5\r\nAppc Core: 5.3.0-44\r\nNode: v4.4.4", "updateAuthor": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2016-05-12T20:59:51.000+0000", "updated": "2016-05-12T21:00:08.000+0000" }, { "id": "385927", "author": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "body": "*Reopening ticket* as {{allowBackground}} has no effect on Windows 10 phone.", "updateAuthor": { "name": "htbryant", "key": "htbryant", "displayName": "Harry Bryant", "active": true, "timeZone": "Europe/London" }, "created": "2016-05-17T18:14:18.000+0000", "updated": "2016-05-17T18:14:18.000+0000" }, { "id": "386016", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Note: From my observation it seems Windows 10 mobile always immediately \"suspends\" the app when app goes background, and that behavior is different from Windows Phone 8.1. On WP8.1 app is not always suspended even when it goes background. And when app is explicitly suspended audio will be stopped (from what I saw). FYI you can suspends the app explicitly if you connect it from Visual Studio.\r\n\r\nMaybe related: [Suspending app from VS with BackgroundMediaPlayer stops audio|https://social.msdn.microsoft.com/Forums/en-US/fd45b867-1413-4544-adf2-84e5dc78fe95/suspending-app-from-vs-with-backgroundmediaplayer-stops-audio?forum=winappswithcsharp]\r\n", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-05-18T06:57:00.000+0000", "updated": "2016-05-18T06:57:00.000+0000" }, { "id": "386103", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The background task seems to be cancelled by a system policy (the {{BackgroundTaskCancellationReason}} is {{SystemPolicy}})\r\n\r\nThere are two reasons this could happen:\r\n- The number of background audio tasks can be at most 1, at any given time\r\n- Due to resource constraints, the system may terminate the background task\r\n\r\nhttps://msdn.microsoft.com/en-us/windows/uwp/audio-video-camera/background-audio#system-policies-for-background-audio-task-lifetime", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-05-18T21:08:22.000+0000", "updated": "2016-05-18T21:08:22.000+0000" }, { "id": "386129", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Removed 5.3.0 target, seems like it's not a trivial fix because it's due to system policy changes on Windows 10. Further investigation will be needed on how to workaround termination of it.", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-05-19T00:09:10.000+0000", "updated": "2016-05-19T00:09:10.000+0000" }, { "id": "389689", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Removed 6.0.0 target. We could close this ticket as \"Won't fix\" because this is system resource policy changes on Windows 10, but I think it's better to just remove the target for now for further investigation. I will update the API docs to address this limitation soon.", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2016-07-01T00:01:31.000+0000", "updated": "2016-07-01T00:01:31.000+0000" } ], "maxResults": 14, "total": 14, "startAt": 0 } } }