Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13913] Android video playbackState, seek event non-existant

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2013-11-12T20:10:31.000+0000
Affected Version/sn/a
Fix Version/s2013 Sprint 23 API, Release 3.2.0
ComponentsAndroid
Labelsandroid, module_media, qe-testadded, video, videoplayer
ReporterCarter Lathrop
AssigneeSunila
Created2013-05-17T23:58:33.000+0000
Updated2019-07-24T13:14:31.000+0000

Description

The playbackState for Ti.Media.VIDEO_PLAYBACK_STATE_SEEKING_BACKWARD and Ti.Media.VIDEO_PLAYBACK_STATE_SEEKING_FORWARD never fire when a user presses and drags the scrub bar on the video. I am only able to get the play and pause events to fire. To reproduce this, create a new titanium mobile project and paste the following into app.js and then compile. The video should begin to play on top of a lovely purple/pink background. As you drag the scrub bar, you will see the playbackState never fires anything for seeking
var win = Ti.UI.createWindow({
	backgroundColor:'#ff00ff'
});

var vidPlayer = Ti.Media.createVideoPlayer({
	width:Ti.Platform.displayCaps.platformWidth,
	height:Ti.Platform.displayCaps.platformWidth / 2,
	top:0,
	backgroundColor:'#000',
	autoplay:true,
	mediaControlStyle:Ti.Media.VIDEO_CONTROL_EMBEDDED,
	url:'http://vjs.zencdn.net/v/oceans.mp4'	
});

function playbackStateChange(event)
{
	alert('playbackState: ' + event.playbackState);
}
vidPlayer.addEventListener('playbackState', playbackStateChange);

win.add(vidPlayer);
win.open();
I am testing this directly on my android phone which is a Samsung Galaxy Stellar with android OS 4.1.2

Comments

  1. Carter Lathrop 2013-05-19

    Hello Ronnie, Thanks for bringing this to our attention, I made a slight change to your code and used an alert to display the playback state so as to better see the problem on device without the need of logs. Successfully Reproduced Bug on: Ti SDK 3.2.x Titanium Studio, build: 3.1.0.201303032333 Samsung Galaxy S3 4.1.2
  2. Ronnie Swietek 2013-05-20

    Thanks Carter for the change and confirmation. For the time being, I'm going to have to find a different answer since our app needs to be released soon and I need to be able to listen for the seek event. I may just have to do an interval and check the current time
  3. Carter Lathrop 2013-05-22

    Ronnie, I updated the severity to blocker status to note that this is blocking release for your app in hopes of getting this looked at sooner. Apologies for the inconvenience but thanks for bringing this to our attention regardless as you may have saved some people trouble in the future. Best wishes, Carter
  4. Ronnie Swietek 2013-05-23

    aw, nice! I plan to release our app update at the end of the week so I don't think an update will be ready in time, but as soon as it gets fixed I'll again release an update. Much appreciated Carter. I'll be keeping an eye on this ticket
  5. Sunila 2013-11-10

    Added support for seek events https://github.com/appcelerator/titanium_mobile/pull/4941
  6. Lokesh Choudhary 2013-11-15

    Verified the fix. We see the playBackState fired on seeking the video after we pull down the scrub. Closing. Environment: Appcel Studio : 3.2.0.201311150806 Ti SDK : 3.2.0.v20131115115645 Mac OSX : 10.8.5 Alloy : 1.3.0 CLI - 3.2.0

JSON Source