html5 video: fix wrong behavior in safari(fixes #244)