[TIMOB-3065] Android: Orientation events not firing with an open video player
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Trivial |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2012-08-14T04:55:43.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | Release 2.0.1 |
| Components | Android |
| Labels | module_orientation, qe-review, qe-testadded |
| Reporter | Rick Blalock |
| Assignee | Neeraj Gupta |
| Created | 2011-04-15T03:35:51.000+0000 |
| Updated | 2012-08-14T04:55:43.000+0000 |
Description
Problem reported here: http://developer.appcelerator.com/helpdesk/view/70751">http://developer.appcelerator.com/helpdesk/view/70751
Orientation events aren't getting picked up when a video player
is playing.
Code to reproduce:
var win = Ti.UI.currentWindow;
win.orientationModes =
[
Ti.UI.PORTRAIT,
Ti.UI.UPSIDE_PORTRAIT,
Ti.UI.LANDSCAPE_LEFT,
Ti.UI.LANDSCAPE_RIGHT
];
var activeMovie = Titanium.Media.createVideoPlayer({
url: 'http://195.238.27.196/VOD/android/0006676NLP00.3gp'
});
activeMovie.play();
Ti.Gesture.addEventListener('orientationchange', function(e) {
Ti.API.info('Orientation changed: ' + e.orientation);
});
Original video doesn't work, so I used the following code:
Tested using 2.0.1GA2 on a Samsung Galaxy S2. Unable to reproduce the issue. I can see the events being fired on ddms. Ticket closed.var vidWin = Titanium.UI.createWindow({ title : 'Video View Demo', backgroundColor : '#fff' }); vidWin.orientationModes = [ Ti.UI.PORTRAIT, Ti.UI.LANDSCAPE_LEFT, Ti.UI.LANDSCAPE_RIGHT ]; var videoPlayer = Titanium.Media.createVideoPlayer({ top : 2, autoplay : true, backgroundColor : 'blue', height : 300, width : 300, mediaControlStyle : Titanium.Media.VIDEO_CONTROL_DEFAULT, scalingMode : Titanium.Media.VIDEO_SCALING_ASPECT_FIT }); videoPlayer.url = 'http://dl.dropbox.com/u/11919792/VID_20120501_141527.mp4'; vidWin.add(videoPlayer); vidWin.open(); Ti.Gesture.addEventListener('orientationchange', function(e) { Ti.API.info('Orientation changed: ' + e.orientation); }); vidWin.open();Reopening to update labels