Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-4340] Android: playing and playbackstate properties of VideoPlayer are always undefined

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionCannot Reproduce
Resolution Date2012-02-13T09:37:33.000+0000
Affected Version/sRelease 1.7.0
Fix Version/sn/a
ComponentsAndroid
Labelstbs-1.9.0
ReporterJon Alter
AssigneeNeeraj Gupta
Created2011-06-06T15:52:01.000+0000
Updated2017-03-30T22:10:18.000+0000

Description

The "playing" and "playbackstate" properties of VideoPlayer are always undefined. Step 1: run the code below Step 2: look at the log Step 3: notice that "playing" and "playbackstate" are always undefined no matter what the video player's state is.
var win = Titanium.UI.createWindow();
var activeMovie = Titanium.Media.createVideoPlayer({
    contentURL: 'http://theatercrew.com/sample.mp4',
	autoplay: true
});

win.open();
activeMovie.play();

activeMovie.addEventListener('load',function(){
    Ti.API.info("Load event fired...");
    playingInterval = setInterval( function(){
		var msg = ">>";
		  // returns undefined on android
		  msg += "playing: " + activeMovie.playing;
		  // returns undefined on android
		  msg += " | playbackState: " + activeMovie.playbackState;
		  Ti.API.info(msg);
	}, 5000);  
});

Tested With

TiSDK 1.7.0.RC1 Android 2.3

Associated Helpdesk Ticket

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

Comments

  1. Kent Nguyen 2011-10-19

  2. Seth Benjamin 2011-11-07

    Curious to see if there has been any updates to this; it's been quite a awhile without any updates for a relatively large issue.
  3. Arthur Evans 2012-02-13

    This appears to be working correctly in 1.8.0.1 and in master.
  4. Lee Morris 2017-03-30

    Closing ticket as I am unable to reproduce the issue using the following environment; Pixel (7.1) MacOS 10.11.6 (15G31) Studio 4.8.1.201612050850 Ti SDK 6.0.3 GA Appc NPM 4.2.8 Appc CLI 6.1.0 Ti CLI 5.0.11 Alloy 1.9.5 Arrow 1.10.1 Xcode 8.2 (8C38) Node v4.6.0 Java 1.7.0_80

JSON Source