{ "id": "118707", "key": "AC-2491", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2014-07-14T21:05:20.000+0000", "created": "2013-08-17T03:25:18.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "updated": "2016-03-08T07:41:32.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": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "When playing a video (mp4) fullscreen using the code below:\r\n\r\n{code}\r\nvar videoPlayer = Titanium.Media.createVideoPlayer({\r\n url:Alloy.CFG.introVideo, \r\n autoplay:true,\r\n fullscreen:true,\r\n mediaControlStyle: Titanium.Media.VIDEO_CONTROL_DEFAULT,\r\n scalingMode : Titanium.Media.VIDEO_SCALING_ASPECT_FIT\r\n});\r\n{code} \r\n\r\nthe video starts playing in portrait mode, but when you rotate the device the video playback restarts and the video replayed from the beginning.", "attachment": [], "flagged": false, "summary": "Android: Fullscreen video playback restarts when screen is rotated (orientation changes)", "creator": { "name": "jawaite123@yahoo.com", "key": "jawaite123@yahoo.com", "displayName": "Jeremy Waite", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "jawaite123@yahoo.com", "key": "jawaite123@yahoo.com", "displayName": "Jeremy Waite", "active": true, "timeZone": "America/New_York" }, "environment": "Mac OS 10.8.4\r\nStudio/SDK 3.1.2.GA", "comment": { "comments": [ { "id": "271452", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "Hello Jeremy Waite,\r\n\r\nIs it for Alloy or Titanium? I tested this for Both Alloy and Titanium. I can't reproduce this.\r\n\r\n\r\nTest Environment:\r\n\r\nTitanium SDK version: 3.1.2 (08/14/13 12:45 5ceaff8)\r\nOS: OS X 10.8.4\r\nIOS Simulator Version 6.0 (369.2)\r\nAndroid SDK: 2.3.3\r\n\r\nThanks \r\n \r\n", "updateAuthor": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "created": "2013-09-17T10:50:13.000+0000", "updated": "2013-09-17T11:29:26.000+0000" }, { "id": "282458", "author": { "name": "bradleycorn", "key": "bradleycorn", "displayName": "Brad Ball", "active": true, "timeZone": "America/New_York" }, "body": "I have the same issue on Android, using the code below. Note, tested on ios device running ios 7.0.4 and do NOT have the issue, video continues playing seamlessly when devices is rotated.\n\nvar Video = Ti.Media.createVideoPlayer({\n url: VideoURL, //This is a URL to a streaming mp4 video file (or http live streaming video file on ios)\n fullscreen: true,\n autoplay: true,\n backgroundColor: '#000',\n mediaControlStyle: Ti.Media.VIDEO_CONTROL_DEFAULT,\n scalingMode: Ti.Media.VIDEO_SCALING_ASPECT_FIT\n});\n\nEnvironment:\nApplication: Titanium (NOT alloy)\nTitanium SDK Version: 3.1.3\nOS: OSX 10.8.5\nAndroid SDK: 4.0 (API 14)", "updateAuthor": { "name": "bradleycorn", "key": "bradleycorn", "displayName": "Brad Ball", "active": true, "timeZone": "America/New_York" }, "created": "2013-12-04T20:09:37.000+0000", "updated": "2013-12-04T20:09:37.000+0000" }, { "id": "284007", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "[~jawaite123@yahoo.com] [~bradleycorn] We tested this issue with the test code below. We were not able to reproduce this issue in Ti SDK 3.1.3.GA. Please test this issue using the latest release and let us know your feedback.\r\n\r\nH5. Testing Environment:\r\nTi CLI 3.1.2\r\nTitanium SDK: 3.1.3 and later \r\nAndroid Device \r\n\r\nh5. Test Case\r\n \r\n{code}\r\nvar win = Ti.UI.createWindow();\r\n\r\nVideoURL = '/etc/Mat.mp4';\r\n\r\n\r\nvar Video = Ti.Media.createVideoPlayer({\r\n\turl : VideoURL, //This is a URL to a streaming mp4 video file (or http live streaming video file on ios)\r\n\tfullscreen : true,\r\n\tautoplay : true,\r\n\tbackgroundColor : '#000',\r\n\tmediaControlStyle : Ti.Media.VIDEO_CONTROL_DEFAULT,\r\n\tscalingMode : Ti.Media.VIDEO_SCALING_ASPECT_FIT\r\n});\r\n\r\nwin.add(Video);\r\n\r\nwin.open();\r\n\r\n{code}\r\nh5. Steps to Reproduce:\r\n\r\n# Create a simple project.\r\n# Update this code in app.js\r\n# Run this with testing environment\r\n# Rotate android device randomly \r\n# Video will be play continues without any restart \r\n\r\n \r\nThanks", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-12T18:16:02.000+0000", "updated": "2013-12-13T05:25:38.000+0000" }, { "id": "284270", "author": { "name": "bradleycorn", "key": "bradleycorn", "displayName": "Brad Ball", "active": true, "timeZone": "America/New_York" }, "body": "I have some additional feedback on this issue. I created an empty test project following the instructions above and put the following in the app.js:\n\n{code:javascript}\nvar win = Ti.UI.createWindow();\n \nVideoURL = '/etc/Mat.mp4';\n \n \nvar Video = Ti.Media.createVideoPlayer({\n url : VideoURL, //This is a URL to a streaming mp4 video file (or http live streaming video file on ios)\n fullscreen : true,\n autoplay : true,\n backgroundColor : '#000',\n mediaControlStyle : Ti.Media.VIDEO_CONTROL_DEFAULT,\n scalingMode : Ti.Media.VIDEO_SCALING_ASPECT_FIT\n});\n \nwin.add(Video);\n \nwin.open();\n{code}\n\nthe video plays back perfectly on my devices. When I rotate the device, the video continues to play seamlessly. \n\nI then updated the node in the tiapp.xml to the following:\n\n{code:xml}\n \n 14\n \n \n \n \n{code} \n\nNow when I run the app on my devices, the error appears. Rotating the device causes the video to restart from the beginning. ", "updateAuthor": { "name": "bradleycorn", "key": "bradleycorn", "displayName": "Brad Ball", "active": true, "timeZone": "America/New_York" }, "created": "2013-12-13T20:57:15.000+0000", "updated": "2013-12-13T20:57:15.000+0000" }, { "id": "285774", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "This issue can be reproduced with Android SDK version 2.2 (API level 8). But the minimum Android version supported by Titanium SDK is 2.3.3 (API level 10) and the provided test case works fine with Android SDK 2.3.3. Resolving this ticket invalid as API level 8 is unsupported. Please refer to the compatibility matrix in the documentation for more information:\n\nhttp://docs.appcelerator.com/titanium/latest/#!/guide/Titanium_Compatibility_Matrix\n", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-25T02:14:56.000+0000", "updated": "2013-12-25T02:14:56.000+0000" }, { "id": "286364", "author": { "name": "bradleycorn", "key": "bradleycorn", "displayName": "Brad Ball", "active": true, "timeZone": "America/New_York" }, "body": "I am still seeing this issue, despite udpating the API level in the android manifest. Using the same code as my previous comment above, but changing the android manifest to only support a minimum api level of 11, the bug is still there, the video restarts when rotated. Here is my new manifest entry:\n\n{code:xml}\n \n 18\n \n \n \n \n{code}\n", "updateAuthor": { "name": "bradleycorn", "key": "bradleycorn", "displayName": "Brad Ball", "active": true, "timeZone": "America/New_York" }, "created": "2013-12-31T15:39:39.000+0000", "updated": "2013-12-31T15:39:39.000+0000" }, { "id": "296177", "author": { "name": "rondog", "key": "rondog", "displayName": "Ronnie Swietek", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I had this problem a long time ago when I was developing for android natively. Try this solution in your tiapp.xml rather than android manifest: http://stackoverflow.com/questions/5983583/rotating-phone-restarts-video-on-android", "updateAuthor": { "name": "rondog", "key": "rondog", "displayName": "Ronnie Swietek", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-03-07T20:35:38.000+0000", "updated": "2014-03-07T20:35:38.000+0000" } ], "maxResults": 10, "total": 10, "startAt": 0 } } }