Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7607] iOS: Status Bar disappears when video is closed in landscape/portrait mode

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-07-06T04:45:56.000+0000
Affected Version/sRelease 1.8.0.1
Fix Version/sSprint 2012-05, Release 2.0.0, Release 1.8.3
ComponentsiOS
Labelsmodule_media, qe-testadded
ReporterDevang Gandhi
AssigneeMax Stepanov
Created2012-02-09T17:25:32.000+0000
Updated2012-07-06T17:11:26.000+0000

Description

Expected

When the video is closed in landscape/portrait mode, Status bar should be visible.

Actual

Currently its not visible. Below is attached the sample app.js, and screen shots to explain the issue.

Test Code

var win = Ti.UI.createWindow({
  backgroundColor:'#fff',
  top: 0,
  left: 0,
  width: '100%',
  height: '100%',
  zIndex: 10,
});

var bTSOStream = Ti.UI.createButton({
	width: 150,
	height: 30,
	color: 'blue',
	title: 'Live-Stream',
	font: {fontSize:14,fontFamily:'Helvetica Neue'},
	left: 0,
	top: 0,
});
bTSOStream.addEventListener('click', function(e){
	var wStream = Ti.UI.createWindow({
		fullscreen: true,
		orientationModes: [Titanium.UI.PORTRAIT, Titanium.UI.LANDSCAPE_RIGHT, Titanium.UI.LANDSCAPE_LEFT],
		backgroundColor: '#000',
	});
	wStream.open();
	
	var vpStream = Ti.Media.createVideoPlayer({
		contentURL: 'http://movies.apple.com/media/us/ipad/2010/tours/apple-ipad-video-us-20100127_r848-9cie.mov',
		backgroundColor: '#111',
	 	movieControlMode: Titanium.Media.VIDEO_CONTROL_DEFAULT,
		//scalingMode: Titanium.Media.VIDEO_SCALING_MODE_FILL ,
		scalingMode: Titanium.Media.VIDEO_SCALING_ASPECT_FIT,
		fullscreen: true,
	});
	var ignoreFullscreenEvent = false;
	vpStream.addEventListener('naturalSizeAvailable', function(e){
		ignoreFullscreenEvent = true;
	});
	vpStream.addEventListener('fullscreen', function(e){
		if(!ignoreFullscreenEvent){
			wStream.close();
		}
		ignoreFullscreenEvent = false;
	});
	wStream.add(vpStream);
	
	
});
win.add(bTSOStream);

win.open();

Attachments

FileDateSize
app (1).js2012-02-09T17:25:32.000+00001107
Screen Shot 2012-02-09 at 5.24.26 PM.png2012-02-09T17:25:32.000+000092775
Screen Shot 2012-02-09 at 5.24.42 PM.png2012-02-09T17:25:32.000+0000182902
Screen Shot 2012-02-09 at 5.24.57 PM.png2012-02-09T17:25:32.000+000090630

Comments

  1. Max Stepanov 2012-03-06

    The problem here is that both Titanium Window and VideoPlayer are trying to control status bar visibility. In general, if the VideoPlayer is in fullscreen mode, no need to set its parent Window to fullscreen too. Possible solutions: 1. Remove fullscreen mode from parent window.
       	var wStream = Ti.UI.createWindow({
       		fullscreen: false,
       		orientationModes: [Titanium.UI.PORTRAIT, Titanium.UI.LANDSCAPE_RIGHT, Titanium.UI.LANDSCAPE_LEFT],
       		backgroundColor: '#000',
       	});
       
    2. Hide VideoPlayer before closing a Window.
       	vpStream.addEventListener('fullscreen', function(e){
       		if(vpStream.getPlaybackState() == 2){
       			vpStream.hide();
       			vpStream.release();
       			wStream.close();
       		}
       	});
       
  2. Wilson Luu 2012-03-15

    Closing bug. Verified fix on: SDK build: 2.0.0.v20120315140247 Titanium Studio, build: 2.0.0.201203142055 xcode: 4.2 Device: iphone 4s (5.0.1)
  3. Stephen Tramer 2012-03-29

    Fix labels
  4. Anshu Mittal 2012-07-06

    Reopening to update labels

JSON Source