- From: Michael A. Puls II <shadow2531@gmail.com>
- Date: Tue, 23 Jun 2009 06:43:23 -0400
- To: "Robin Berjon" <robin@berjon.com>
- Cc: "public-html@w3.org WG" <public-html@w3.org>
On Tue, 23 Jun 2009 06:27:22 -0400, Robin Berjon <robin@berjon.com> wrote:
> On Jun 23, 2009, at 11:40 , Michael A. Puls II wrote:
>>> or use <audio>, and then the browser can optimize away the video
>>> decoding.
>>
>> Yes, I see that this works. But, that seems more complicated to switch
>> between <video> and <audio> to get the effect.
>
> It's not that complicated really, and semantically it does make more
> sense. What's more with the toggled off <video> you'd have to specify
> what to do if it's passed to drawImage() or createPattern(), and neither
> option (decoding offscreen to be ready when asked even though nothing is
> shown, or returning nothing) is all that elegant. The same applies to
> controls, what width and height would be, etc.
O.K., I see. Have <audio> and <video> play the same src file with <video>
set to autoplay for example and <audio> not.
Then, do like this:
function toggleVideoOutput() {
if (video.paused === true) {
audio.pause();
video.currentTime = audio.currentTime;
video.play();
} else {
video.pause();
audio.currentTime = video.currentTime;
audio.play();
}
}
or something.
--
Michael
Received on Tuesday, 23 June 2009 10:44:02 UTC