{ "id": "91344", "key": "TIMOB-8992", "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": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" }, { "id": "13406", "description": "Sprint 2012-10 API", "name": "Sprint 2012-10 API", "archived": true, "released": true, "releaseDate": "2012-05-20" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-05-24T15:01:25.000+0000", "created": "2012-05-04T09:33:42.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "api", "module_media", "qe-testadded" ], "versions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" } ], "issuelinks": [ { "id": "17043", "type": { "id": "10011", "name": "Includes", "inward": "is included by", "outward": "includes" }, "outwardIssue": { "id": "61785", "key": "TIMOB-1153", "fields": { "summary": "iOS: add volume control support to createAudioPlayer", "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": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } }, { "id": "22083", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "103100", "key": "TIMOB-11377", "fields": { "summary": "iOS: Media - Volume control for a Videoplayer placed in front of the player.", "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": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2012-10-17T22:06:03.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": "10224", "name": "TiAPI", "description": "This component is used for cross-platform API work. Specifications are most likely to use this component." } ], "description": "Right now only the Sound API has the ability to set volume. There have been numerous requests to provide the same functionality for AudioPlayer, VideoPlayer and Recording.\r\n\r\nh3. Media Player Volume Test Case\r\n\r\n{code}\r\nfunction createVolumeControl(player) {\r\n\tvar slider = Ti.UI.createSlider({\r\n\t\tvalue: player.volume * 100,\r\n\t\tmin: 0,\r\n\t\tmax: 100,\r\n\t\twidth: 500\r\n\t});\r\n\r\n\tslider.addEventListener('change', function(e) {\r\n\t\tplayer.volume = e.value/100;\r\n\t});\r\n\r\n\treturn slider;\r\n}\r\n\r\nfunction createSoundPlayerTab() {\r\n\tvar win = Ti.UI.createWindow({layout: 'vertical'});\r\n\t\r\n\tvar sound = Ti.Media.createSound({url:'sound.wav'});\r\n\r\n\twin.add(createVolumeControl(sound));\r\n\t\r\n\tvar playSoundButton = Ti.UI.createButton({\r\n\t\ttitle: \"Play Sound\",\r\n\t\theight: 100,\r\n\t\twidth: 200\r\n\t});\r\n\tplaySoundButton.addEventListener('click', function() {\r\n\t\tsound.play();\r\n\t});\r\n\twin.add(playSoundButton);\r\n\r\n\treturn Ti.UI.createTab({\r\n\t\ttitle: \"Sound Player\",\r\n\t\twindow: win\r\n\t});\r\n}\r\n\r\nfunction createAudioPlayerTab() {\r\n\tvar win = Ti.UI.createWindow({layout: 'vertical'});\r\n\r\n\tvar audio = Ti.Media.createAudioPlayer({url: 'music.mp3', volume: 0.5});\r\n\r\n\twin.add(createVolumeControl(audio));\r\n\r\n\tvar playAudioButton = Ti.UI.createButton({\r\n\t\ttitle: \"Play Audio\",\r\n\t\theight: 100,\r\n\t\twidth: 200\r\n\t});\r\n\tplayAudioButton.addEventListener('click', function() {\r\n\t\taudio.play();\r\n\t});\r\n\twin.add(playAudioButton);\r\n\r\n\treturn Ti.UI.createTab({\r\n\t\ttitle: \"Audio Player\",\r\n\t\twindow: win\r\n\t});\r\n}\r\n\r\nfunction createVideoPlayerTab() {\r\n\tvar win = Ti.UI.createWindow({layout: 'vertical'});\r\n\r\n\tvar videoPlayer = Titanium.Media.createVideoPlayer({\r\n\t height : 300,\r\n\t width : 300,\r\n\t mediaControlStyle : Titanium.Media.VIDEO_CONTROL_NONE,\r\n\t scalingMode : Titanium.Media.VIDEO_SCALING_ASPECT_FIT,\r\n\t url: 'movie.mp4',\r\n\t volume: 0.0\r\n\t});\r\n\twin.add(videoPlayer);\r\n\r\n\twin.add(createVolumeControl(videoPlayer));\r\n\r\n\treturn Ti.UI.createTab({\r\n\t\ttitle: \"Video Player\",\r\n\t\twindow: win\r\n\t});\r\n}\r\n\r\nvar tabGroup = Ti.UI.createTabGroup();\r\ntabGroup.addTab(createSoundPlayerTab());\r\ntabGroup.addTab(createAudioPlayerTab());\r\ntabGroup.addTab(createVideoPlayerTab());\r\ntabGroup.open();\r\n{code}\r\n\r\n1. Create an application with the above source code.\r\n2. Be sure to place media files in your Resources folder (ex: music.mp4, sound.wav)\r\n3. Go through each tab which includes a test for each media player type.\r\n4. Start the media by clicking the button. Try adjusting the volume. It should change as you move the slider.\r\n5. Repeat for the next tab and so forth.", "attachment": [], "flagged": false, "summary": "Ti API: Create consistent volume properties for all player types.", "creator": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [ { "id": "91345", "key": "TIMOB-8993", "fields": { "summary": "iOS: Create consistent volume properties for all player types.", "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": "High", "id": "2" }, "issuetype": { "id": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true } } }, { "id": "91346", "key": "TIMOB-8994", "fields": { "summary": "Android: Create consistent volume properties for all player types.", "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": "High", "id": "2" }, "issuetype": { "id": "5", "description": "The sub-task of the issue", "name": "Sub-task", "subtask": true } } } ], "reporter": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "197519", "author": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing feature. Was able to verify volume feature works on:\r\n\r\nSDK build: 2.1.0.v20120605190238\r\nTitanium Studio, build: 2.1.0.201206051612\r\nRuntime: v8\r\nxcode: 4.3.2\r\nDevice: iphone 4s verizon (5.0.1), droid 1 (2.2.3)", "updateAuthor": { "name": "wluu", "key": "wluu", "displayName": "Wilson Luu", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2012-06-06T10:05:54.000+0000", "updated": "2012-06-06T10:05:54.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }