Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27276] [iOS]Unable to get playback state alert/logs when seeking a video

GitHub Issuen/a
TypeBug
PriorityNone
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 8.0.1, Release 8.1.0
Fix Version/sn/a
ComponentsiOS
Labelsn/a
ReporterSamir Mohammed
AssigneeUnknown
Created2019-07-24T13:14:31.000+0000
Updated2019-07-26T18:05:28.000+0000

Description

When scrubbing through a video no playback state alerts are fired (this works fine in android).
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();
*Test Steps:*

Create a Titanium application with the test case above

Run the app

Wait for the video to load

Seek through the video

*Expected result:* You should get alert " playbackstate : "a number here" " e.g. playbackstate:5, when you seek the video forward or backward. Also you get logs in the console. *Actual result:* No alerts are shown and nothing is logged in the console.

Comments

  1. Vijay Singh 2019-07-26

    [~smohammed] Event name is 'playbackstate' ('s' in small letter). See document [here](https://docs.appcelerator.com/platform/latest/#!/api/Titanium.Media.VideoPlayer-event-playbackstate).

JSON Source