Playing a video from a specific start time?

Hi everyone. I try to play a video but starting it not at the beginning but after a specific time. The video plays well, but always starts at the beginning. What am I doing wrong? Thanks a lot for your ideas and suggestions!

Note: the video was downloaded from Youtube but the video flow is well indexed: you can play it into Windows Media Player and jump to a specific time in the player. So the problem is apparently not a corrupted or not indexed video file.

var vid;

function preload(){
 vid = createVideo('videos/LivingInABox.mp4');

function setup() {
  createCanvas(windowWidth, windowHeight, WEBGL);

  vid.size(854, 470);  
  vid.position(0, 0);


A new element: this problem occurs only when launching the sketch from Processing IDE (run button) and the page is called by the browser to the localhost web server ( When I put the sketch on a ‘true’ external web server, the .time(20) works fine in the browser.