Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10073] Android: Can't see video inside a modal window

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionCannot Reproduce
Resolution Date2013-10-11T08:46:47.000+0000
Affected Version/sRelease 2.1.0, Release 3.1.0
Fix Version/s2013 Sprint 21, 2013 Sprint 21 API
ComponentsAndroid
Labelscore
ReporterRonnie Swietek
AssigneeBiju pm
Created2012-07-12T12:57:50.000+0000
Updated2017-03-21T22:34:40.000+0000

Description

Problem description

When opening a video in a modal window, the video is not visible, but you can hear the audio.

Steps to reproduce

1. Create a new Ti Mobile project. 2. Add the following code to app.js
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');

var tabGroup = Titanium.UI.createTabGroup();

var win1 = Titanium.UI.createWindow({  
    title:'Tab 1',
    backgroundColor:'#fff'
});
var tab1 = Titanium.UI.createTab({  
    icon:'KS_nav_views.png',
    title:'Tab 1',
    window:win1
});

var btn = Ti.UI.createButton({
	title:'open modal'
});
win1.add(btn);

btn.addEventListener('click',function()
{
	var modalWin = Ti.UI.createWindow({
		modal:true,
		navBarHidden:true,
		fullscreen:true
	});
	var vidPlayer = Ti.Media.createVideoPlayer({
		backgroundColor:'#ff00ff'
	});
	modalWin.add(vidPlayer);
	
	modalWin.open();
	
	var videoPath 	= 'http://digitalout.vo.llnwd.net/o35/u/test/holland-android.mp4';
	vidPlayer.url 	= videoPath;
	vidPlayer.play();	
});

tabGroup.addTab(tab1);  
tabGroup.open();
3. Run the code and click the open modal button. You will hear audio but you wont see any video. 4. Next go back to app.js and comment out line 24 (modal:true) 5. Recompile and now you can see the video and hear the audio.

Additional information

The whole issue was posted in the Q&A Section here: [http://developer.appcelerator.com/question/139593/video-is-black-but-i-hear-audio---android]

Comments

  1. Davide Cassenti 2012-07-23

    The code seems to work well on Android 4.1 (Emulator)
  2. Shameer Jan 2013-03-08

    The problem reproduces with release 3.0.2 and master release 3.1.0 tested on Titanium Studio, build: 3.0.2.201302191606 Titanium SDK version: 3.1.0 Titanium SDK version: 3.0.2 Device: Samsung galaxy s duos Android version: 4.0.4 Android Emulator: Android SDK version: 2.2 iOS iPhone Simulator: iOS SDK version: 6.0 But it works fine on ios emulator
  3. Biju pm 2013-10-11

    The issue cannot reproduce with the release master 3.2.0 Tested with: Titanium Studio, build: 2.1.2.201208301612 Titanium SDK version: 3.2.0 Tested on Device: Samsung galaxy s duos Android version: 4.0.4
  4. Lee Morris 2017-03-21

    Closing ticket as the issue cannot be reproduced and due to the above comments.

JSON Source