Problem Description
Create an iPad SplitView.
Listen to the 'visible' event on the SplitView, to handle the leftNavButton (TiUIiPadSplitWindowButton)
Add a video in the detailView.
Now open the app in portrait mode (button appears)
Open the video in full screen.
Change orientation to landscape
Button is still there - 'visible' event didn't fire.
Change orientation to portrait then back to landscape
Button is now gone - 'visible' event fired.
Open the video in full screen.
Change orientation to portrait
Button is not there - 'visible' event didn't fire.
I'm trying to find a workaround but I can only get to the TiUIiPadSplitWindowButton via the SplitView 'visible' event (e.button).
Steps to reproduce
1. Create a new project
2. Paste test case in app.js
3. Change orientation to landscape -'visible' event will fired
4. Change orientation to portrait - 'visible' event will fired
5. Now change this video in fullscreen mode
6. Change orientation to landscape -'visible' event will not fired
7. Change orientation to portrait - 'visible' event will not fired
Test case
var win = Ti.UI.createWindow({
backgroundColor : '#fff',
});
var nav = Ti.UI.iPhone.createNavigationGroup({
window : win
});
var master = Ti.UI.createWindow({
backgroundColor : '#fff',
});
var masterView = Ti.UI.iPhone.createNavigationGroup({
window : master
});
var splitwin = Ti.UI.iPad.createSplitWindow({
detailView : nav,
masterView : masterView
});
var videoPlayer = Titanium.Media.createVideoPlayer({
backgroundColor : 'blue',
mediaControlStyle : Titanium.Media.VIDEO_CONTROL_EMBEDDED,
scalingMode : Titanium.Media.VIDEO_SCALING_ASPECT_FILL,
fullscreen : false,
autoplay : false
});
videoPlayer.url = 'etc/movie.mp4';
win.add(videoPlayer);
splitwin.addEventListener('visible', function(e) {
if (e.view == 'detail') {
e.button.title = "Master";
win.leftNavButton = e.button;
} else if (e.view == 'master') {
win.leftNavButton = null;
}
alert('event fired');
});
splitwin.open();
Please attach a sample test case that reproduces the issue.
Hello Osian, please include a test case so we can move this bug to platform. TIA! Best, Mauro
changing orientation when the video is in fullscreen mode will not fire a
visible
event, as at this point the splitwindow not event the top most window. The video player takes over the entire screen. You can only expect to receive the events only when you exit out of the videoplayer fullscreen mode. Marking ticket as invalid. Tested on iOS 7 sim with SDK 3.2.X using the following code.Closing ticket as invalid with reference to the above comments.