W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2008

[whatwg] A slightly different use-case for shared workers

From: Aaron Boodman <aa@google.com>
Date: Wed, 27 Aug 2008 17:30:52 -0700
Message-ID: <278fd46c0808271730g3151c6es6620879d0f3d9994@mail.gmail.com>
On Wed, Aug 27, 2008 at 5:23 PM, Robert O'Callahan <robert at ocallahan.org> wrote:
> On Thu, Aug 28, 2008 at 9:59 AM, Aaron Boodman <aa at google.com> wrote:
>> I encounter sites frequently that want to "pop out" part of their
>> application free of the page, into a smaller window. For example,
>> Pandora radio (http://pandora.com) does this. The player starts out
>> embedded in the normal content area, but users have the option to pop
>> it out into a smaller, separate window.
>> One problem with these apps is that they have to shutdown and restart
>> in the popup window. So if I'm playing a song in Pandora, it loses
>> tracks of where I am and restarts in the pop out player.
>> It seems like shared workers could help with this problem. If some
>> future version of workers had access to the Audio API, the base
>> pandora.com page would start a shared worker, which would be used to
>> play the audio. If the user opted to open the "player" in a popup, the
>> popup would simply obtain a reference to the existing worker. The
>> music wouldn't have to restart. If the user navigated away from
>> pandora.com, the popup would keep the worker alive until it was
>> closed.
> Why not just open new window and move the playing <audio> element from the
> old window into the new window? You might need to call play() on it again in
> the new window, but you shouldn't lose your place in the stream.

Hm, that is a good point. I didn't consider the the audio object would
keep playing smoothly when moved between documents. That seems
unlikely to be reliable across implementations, but I'll keep my
fingers crossed :).

- a
Received on Wednesday, 27 August 2008 17:30:52 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:04 UTC