Flatland

Tutorial

15 | Streaming Media

Rover uses Windows Media Player to play streaming audio or video. So visitors to your spot will need to have this software package installed in addition to Rover in order to see or hear the audio or video in your spot. MP3 files are recommended for audio and video files should be those which can be played by WMP.

Adding a stream to your spot involves naming the stream in the < head> section of your 3MDL file in the < stream> tag, and then calling out the name of that < stream> in the < part> tag of the block on which you want to place the media. The < stream> tag looks like this:

< stream name="name of stream" href="URL of stream"/>

The full URL should be used, not the local one.

If you would like the stream to begin as soon as the spot opens, this tag would be added in the < head> section:

< play_stream name="video (or audio)"/>

Otherwise the < play_stream> tag can be applied to any part of a block just like a texture.

Streaming Sounds
You can also use streaming media to provide the ambient sound in your spot. If you define an audio-only stream in the < stream> tag, then Rover will play that sound back as if it were the ambient sound. You do not need to call the stream out anywhere in the body of the file. Just include the audio-only stream in the < stream> tag in the < head>.

Let’s look at an example of a very simple spot with streaming video on a largetv block from the Interior Blockset. We’ve added into the TV < create> tag an < action trigger> for “start” on the screen part of the TV, and an < action trigger> for “stop” on the controlpanel part of the TV.

< create symbol="a" block="largetv">
< part name="screen" stream="video"/>
< action trigger="click on" partname="screen">
< play_stream name="video"/>
< /action>
< action trigger="click on" partname="controlpanel">
< stop_stream />
< /action>

Click on the screen to begin the video. Wait a moment for the video to load. It’s a 900k file. Click on the control panel to stop it. Streaming media is not recommended for anything less than broadband connections.

show me the code show me the spot next lesson

Welcome | Starting | Head Tag | Body Tag | Multilevels | Navigation | Textures | Orientation | Linking | Sound | Lighting | Popups | Sprites | Actions | Streaming 1 | Streaming 2 | More Blocks | Tips & Tricks | Orientation Guide | Texture Styles