0

我在浏览器中有一个嵌入式媒体播放器,由 javascript 控制以处理所有 mediaChange 事件。代码看起来像

mediaChangeHandler: function(media) {
    if (media && this.offset && !this.offsetJumpPerformed) {
        if (parseFloat(media.duration) > this.offset) {
            pos = parseInt(pos);
            this.getPlayer().controls.currentPosition = pos;
            alert("jump to position: " + this.getPlayer().controls.currentPosition);
            this.play();
            this.offsetJumpPerformed = true;
            alert("currentPosition:" + this.getPlayer().controls.currentPosition);
        }
    }
}

第一个警报表明 currentPosition 是我想要的位置。但是,第二个警报会得到比我设置的值少几秒钟的 currentPosition。

有谁知道为什么?我试过用谷歌搜索,但没有发现任何有用的东西。谢谢!

4

1 回答 1

1

这是 WMP10 中引入的错误,也存在于 WMP11 中,而 Windows Media Player 9 运行良好。我没有找到任何解决方法来纠正这种行为......

于 2011-05-27T15:08:15.180 回答