Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3065] Android: Orientation events not firing with an open video player

GitHub Issuen/a
TypeBug
PriorityTrivial
StatusClosed
ResolutionFixed
Resolution Date2012-08-14T04:55:43.000+0000
Affected Version/sn/a
Fix Version/sRelease 2.0.1
ComponentsAndroid
Labelsmodule_orientation, qe-review, qe-testadded
ReporterRick Blalock
AssigneeNeeraj Gupta
Created2011-04-15T03:35:51.000+0000
Updated2012-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);
});

Comments

  1. Junaid Younus 2012-05-15

    Original video doesn't work, so I used the following code:
       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();
       
    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.
  2. Anshu Mittal 2012-08-14

    Reopening to update labels

JSON Source