createVideoPlayer
My structure goes:
app.js
\__main.js
\___video.js
This is my video.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();
When I open video.js, it appears as if my movie is playing behind everything as I can hear it and also, I can see it playing where the status bar is. How do I bring the video object to the foreground?
2 Answers
-
Looks like you forgot to add it to the current window: win.add(activeMovie);
-
Hey John. You are right. That was a retarded mistake. I am running into another issue now. When I hit the 'Done' button. The screen goes black and I get this in the console:
[ERROR] Trying to constraint a view without a proxy's layout. [ERROR] Trying to constraint a view without a proxy's layout.