Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18294] iOS: initialPlaybackTime property for video player does not work consistently for local video

GitHub Issuen/a
TypeBug
PriorityNone
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 3.5.0
Fix Version/sn/a
ComponentsiOS
Labelsqe-3.5.0
ReporterSatyam Sekhri
AssigneeUnknown
Created2014-12-29T06:49:04.000+0000
Updated2018-02-28T19:55:42.000+0000

Description

This is not a regression as the issue happens with older SDK as well (tested as far back as 3.3.0.GA) The initialPlaybackTime property of video player does not work consistently. The issue seems intermittent but for me the scenario created through the code below reproduced the issue almost every time. The issue seems to occur only for local video but does work for remote video. The issue does not occur on Android. Steps to Reproduce: 1. Create a project with code below and install it on iOS device 2. In the app click on any row in the tableview 3. The video should play in the new window. Check the video time. Note: When the app did not had a tableview and the video was on the starting window then the issue was intermittent. Actual Result: The video plays from the very start despite of initialPlaybackTime defined as 20 seconds. Expected Result: The video should start to play from 20 seconds.
var win=Ti.UI.createWindow({
	backgroundColor:'white'
});

var tableData = [ {title: 'Row 1'}, {title: 'Row 2'} ];
var table=Ti.UI.createTableView({
	data: tableData
});

win.add(table);

table.addEventListener("click", function(e) {
	var win1=Ti.UI.createWindow({
		backgroundColor:'white'
	});
	
	var vPlayer = Ti.Media.createVideoPlayer({
	        url: "AppcDemo.mp4",
	        initialPlaybackTime: 20000,
	        mediaControlStyle: Ti.Media.VIDEO_CONTROL_DEFAULT,
	        mediaTypes: Titanium.Media.VIDEO_MEDIA_TYPE_VIDEO
	    });
	vPlayer.addEventListener("load", function(e) {
	        setTimeout(function() {
	            vPlayer.currentPlaybackTime = 193000;
	        }, 15000);
    });
    win1.add(vPlayer);
    win1.open();
});
win.open();

Attachments

FileDateSize
AppcDemo.mp42014-12-30T19:44:07.000+00009076420

Comments

  1. Eric Wieber 2014-12-30

    I am able to reproduce the issue as described, using: Titanium SDK 3.5.0.v20141222103320 Studio 3.4.1.201410281743 Xcode 6.1.1 On: iPad mini, iOS 8.1 iPhone 6, iOS 8.2b3
  2. Eric Wieber 2014-12-30

    Attaching video used in sample. Import it into the project to reproduce the issue.

JSON Source