Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14554] iOS: currentPlaybackTime Property of VideoPlayer API does not work for local movies.

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2014-08-18T10:23:21.000+0000
Affected Version/sRelease 3.0.2, Release 3.1.0, Release 3.1.1
Fix Version/s2013 Sprint 16, 2013 Sprint 16 Core, Release 3.2.0
ComponentsiOS
Labelsios, mobilesdk, module_media, qe-manualtest, titanium
ReporterAshish Nigam
AssigneeBlain Hamon
Created2013-07-15T12:04:35.000+0000
Updated2014-08-18T10:23:21.000+0000

Description

currentPlaybackTime property in iOS video Player APIs does not work for local movie files. test case: 1: Use the below sample code and copy paste it on new sample app.js file. 2: copy paste any movie file of length 3 to 4 minutes. 3: Deploy the code on device or play it over simulator. 4: currentPlaybackTime which is suppose to increase the current Time after 15 seconds does not work.
var tbGroup = Ti.UI.createTabGroup();

var lb1 = Ti.UI.createLabel({
    text : "label1 window1",
    height : 50,
    font : {
        fontSize : 30
    },
    color : 'black'
});

var lbTemp = Ti.UI.createLabel({
    text : "labelTemp windowTemp",
    height : 50,
    font : {
        fontSize : 30
    },
    color : 'black'
});
//var iOSURL = "http://movies.apple.com/media/us/ipad/2010/tours/apple-ipad-video-us-20100127_r848-9cie.mov"; // use it for iOS
var vPlayer = Ti.Media.createVideoPlayer({
	url:"moviefile.mp4",
	initialPlaybackTime:20000,
	mediaControlStyle:Ti.Media.VIDEO_CONTROL_DEFAULT,
	mediaTypes:Titanium.Media.VIDEO_MEDIA_TYPE_VIDEO
});
var lb2 = Ti.UI.createLabel({
    text : "label2 window2",
    height : 50,
    font : {
        fontSize : 30
    },
    color : 'black'
});
var win1 = Ti.UI.createWindow({
    backgroundImage : '/friendship-99a.jpg'
});
win1.add(vPlayer);

var winTemp = Ti.UI.createWindow({
    backgroundImage : '/friendship-99a.jpg'
});
winTemp.add(lbTemp);

var win2 = Ti.UI.createWindow({
    backgroundImage : '/friendship-99a.jpg'
});
win2.add(lb2);

var tb1 = Ti.UI.createTab({
    window : win1
});
var tb2 = Ti.UI.createTab({
    window : win2
});


vPlayer.addEventListener("load", function(e) {
   setTimeout(function(){
   	vPlayer.currentPlaybackTime = 200000
   },15000);

});

lb1.addEventListener("click", function(e) {
    //win1.add(activityIndicator);
  

});

tbGroup.tabs = [tb1, tb2];

tbGroup.open();

Comments

  1. Blain Hamon 2013-08-01

    Pull #4518 pending
  2. Wilson Luu 2013-10-22

    Closing ticket as fixed. Verified VideoPlayer.currentPlaybackTime gets set to 200000 ms (~ 3 minutes and 33 seconds) after 15000 ms (15 seconds). Tested on: Titanium Studio, build: 3.2.0.201310181940 OS: Mac OS X Mountain Lion (10.8.5) SDK build: 3.2.0.v20131021142445 Ti CLI: 3.2.0 (72f7426b4ee6c2d2883c666d5b7e03906a16012f) Devices: iphone 4s (6.0.1), iphone 5 (7.0.2)

JSON Source