johndyer/mediaelement — Issue #328: Chrome / Safari, setSrc -> play.
Author: virgils
Created: 2011-12-14 10:36:19+00:00
State: open

Seems chrome and safari are trying to play when setSrc isn't finished yet. This results in not playing the video.

player.setSrc([{src:'media/echo-hereweare.mp4',type:'video/mp4'},{src:'media/echo-hereweare.webm',type:'video/webm'}]);
player.play();

A simple delay of 100ms seems to solve it, but it's not to my liking.

setTimeout("player.play()",100);