Play the same media in multiple rooms simultaneously

From LinuxMCE
Jump to: navigation, search


How to set it up

You need to upload a floorplan of the house in LinuxMCE Admin on the Wizard, Devices, Floorplans page. Use drag and drop to position all the entertainment areas (ie rooms with media) on the map.

How to use it

Start playing the media in one room as explained in Watch/Listen to media stored on the Core. Then from any Orbiter choose the media map. In the default UI it's the leftmost media button with the picture on it. On the map, or floorplan, you'll see all the media playing in the house and all the entertainment areas color coded with the media playing in there. Touch all the entertainment areas to indicate which ones you want to play the same thing. They should all have a square around them as shown below. *** Then touch the media you want them all the play.

Programmer's guide

The Orbiter will send the Media_Plugin a MH Move Media command telling it what stream to move and into which entertainment areas. Media Plugin has to then figure out how to get it to all those rooms based on the information that the media handlers (like Xine_Plugin) provided when they registered with Media_Plugin. Media_Plugin will first try to find one media handler that has m_bMultipleDestinations true (ie can play the same thing in multiple places synchronized). If there is no appropriate media handler, it tries to find one that is at least able to support devices in all the entertainment areas. If there is none, then Media_Plugin will split the stream into multiple streams and pass it off to different media handlers. For example, the user started the media in one room on a media director with Xine, and is moving it to three rooms. In one room there is a Squeeze Box, and in another a Linux media director with Xine and VLC, and in the last room a media director with some other media player that cannot play streaming audio. In this case Media_Plugin may switch from using the Xine_Plugin media handler to the VideoLan_Plugin since that can handle playing the media in the first two rooms. Then for the third room it will make a copy of the stream and send that off to another media handler for playback. Once the stream is split like that the user will see two streams on the media map, and the two streams will no longer stay in sync.

LinuxMCE uses a text string to define media position, such as "TITLE:2 CHAPTER:4 POS:19282" to indicate the 2nd title, 4th chapter, 19,282 seconds into the block. We encourage developers of media players to translate internal position information to/from this simple text string using LinuxMCE's format so that the user can move media between media players and each will resume where the other left off.