Video shows up behind window unless I add it
When I click my button to open a video, I am opening a window called videoWin via videoWin.open() which points to login.js
var win = Titanium.UI.currentWindow;
var video = win.video;
var activeMovie = Titanium.Media.createVideoPlayer({
contentURL: video,
backgroundColor:'#ff00ff',
fullscreen:true,
movieControlMode:Titanium.Media.VIDEO_CONTROL_FULLSCREEN,
scalingMode:Titanium.Media.VIDEO_SCALING_MODE_FILL
});
activeMovie.addEventListener('complete',function(e)
{
win.orientationModes = [Titanium.UI.PORTRAIT];
win.close();
Ti.App.fireEvent("finishMovie");
});
win.orientationModes = [
Titanium.UI.LANDSCAPE_LEFT,
Titanium.UI.LANDSCAPE_RIGHT
];
activeMovie.play();
The above code makes the movie show up behind my tabGroup. If I insert win.add(activeMovie), the video is on top, but then when I close it (hit the Done button), it just shows a black screen. I tried doing win.remove() but that didn't work. I've also tried setting the zIndex on the window, but no luck
1 Answer
-
can anyone tell me how to get my video on top of the screen without doing an
win.add(activeMovie); ?
According to the kitchen sink demo, the video object itself isn't added to the window anyway.