When the video is closed in landscape/portrait mode, Status bar should be visible.
Currently its not visible.
Below is attached the sample app.js, and screen shots to explain the issue.
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();
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.
2. Hide VideoPlayer before closing a Window.
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)
Fix labels
Reopening to update labels