Custom Video Player Inside a webview
Hello
I want to be able to open a video player inside a webview.
//Create a web view
var webView = Titanium.UI.createWebView({
    url:'content/index.html'
});
// create a window
var appWin = Titanium.UI.createWindow({
    fullscreen: true
});
appWin.add(webView);
appWin.open();
My video must be a half size of the webview so I could insert a custom panel above it,the panel will contain some buttons that will listen to events.
I tried different ways to achieve this,but still no success.
Any ideas ?
1 Answer
- 
				
					
I've tried to create a HTML5 video tags inside web Page,but when I click them on iPhone it opens a build in player in full screen,and this is not what I need.On Android HTML5
embedded video doesn't worked for me at all.I've tried to use Titanium "createVideoPlayer" object
this.activeMovie = Titanium.Media.createVideoPlayer({ url: "",//initialized to nothing by default backgroundColor:'#111', scalingMode:Titanium.Media.VIDEO_SCALING_ASPECT_FIT, sourceType:Titanium.Media.VIDEO_SOURCE_TYPE_FILE, movieControlMode : Titanium.Media.VIDEO_CONTROL_HIDDEN, movieControlMode : Titanium.Media.VIDEO_CONTROL_FULLSCREEN, });and I tried to nest inside some buttons,and It's the only thing that works for me right now,but it's very inconvenient because I need to fire events back from the webview to
titaniums listeners.Here I used these techniques
"CAPTURING EVENTS FROM WEBVIEW TO APP CODE"I can't believe Titanium Developers didn't provide some legal ways of creating a custom video player inside a webview.