[whatwg] A slightly different use-case for shared workers
Jonas Sicking
jonas at sicking.cc
Thu Aug 28 15:11:55 PDT 2008
Aaron Boodman 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.
I think that example could be solved simpler actually. An <audio>
element can be moved between two documents without requiring any
interference in its functionality. So if pandora used an <audio> to play
music they could easily transfer the playing to another window.
Ideally this would also work with plugins, However for various reasons
this is very hard without modifying NPAPI.
/ Jonas
More information about the whatwg
mailing list