Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-4331] Android: removing a label from an activeMovie/videoPlayer does not work

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionCannot Reproduce
Resolution Date2013-03-21T16:43:05.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelsexalture
ReporterJon Alter
AssigneeSunila
Created2011-06-06T13:29:32.000+0000
Updated2017-03-21T21:29:31.000+0000

Description

You can add a label to a videoPlayer, but removing it does not work. See the example below. Step 1: Run the code below Step 2: notice that the red 'Loading...' text does not get removed. Step 3: if you set visible false on the label, it will disappear.
var win = Titanium.UI.createWindow();
var activeMovie = Titanium.Media.createVideoPlayer({
    contentURL: 'http://theatercrew.com/sample.mp4',
	autoplay: true
});
loadingLabel = Titanium.UI.createLabel({
  text:"Loading...",
  color: "#f00",
  width: "auto",
  height: "auto"
});
activeMovie.add(loadingLabel);
win.open();
activeMovie.play();

activeMovie.addEventListener('load',function(){
    Ti.API.info('activeMovie.addEventListener(\'load\',function(){');
    // ---- remove does not work on android ------
    activeMovie.remove(loadingLabel);
    // loadingLabel.visible = false;
});

Workaround

loadingLabel.visible = false;

Tested With

TiSDK 1.7.0.RC1 Android 2.3

Associated Helpdesk Ticket

http://appc.me/c/APP-888114

Comments

  1. Anirudh Nagesh 2012-11-16

    Resolved in 2.1.3GA
  2. Sunila 2013-03-21

    Works fine, the label is gone after load. SDK 3.1.0
  3. Lee Morris 2017-03-21

    Closing ticket as the issue cannot be reproduced.

JSON Source