Media

From DeltaWiki
Jump to navigation Jump to search
Media
Build

N/A

Version

3.6

Preparing to view media inside DeltaWorlds
Clicking on one of the buttons to the right initiates the Alphaworld Exploration Demo Video on the screen in-world

The media command allows the playback or interaction of a Windows Media Player compatiable media file. Audio and video can be played on any object but video and the OSD is only visible on surfaces tagged as 100 (sign) or 200 (picture). Playlists can be played since version 6.0 browser build 1356, when Microsoft's WMP and DirectShow were replaced by VideoLan's VLC.

Usage

media [url=]url [text] [name=name] [set OR pause OR stop] [color=color]
[bcolor=bcolor] [res=res] [fx=fx] [radius=radius] [radoff=radoff]
[vol=vol] [loop=loop] [osd=osd] [ext=ext] [nostop]  [nocache]

url

The required url parameter is a web address or local path to the media file. If the url is empty and a name is specified, it will stop running media on all objects with the given name. The url's prefix defaults to "http://" if no other protocol is specified.

The url= parameter identifier is only required if a text value is given.

text

text is a string to display whilst playing media. If omitted, the text defaults to the contents of the object's description field.

name

name specifies the name of the same owner's object to place the media on. 5.0 If specified as "aw_3d", the media will play in a centered overlay on the viewport, with controls to set the opacity, minimize and close the overlay.

set

set changes the attributes of an already playing media on the fly, without pausing or stopping the stream. Resolution cannot be changed on the fly.

pause

pause is used to pause running media. Triggering a subsequent pause causes the media to continue playing where it was paused before. Live feeds continue streaming in the background but rendering and audio is paused.

stop

stop stops an object's playing media.

color

color specifies the color to use for the OSD text.

bcolor

bcolor specifies the color to use for the background of the OSD.

res

res specifies resolution used to the displayed video frames in pixel, if the media contains a video. Valid values are 64, 128, 256 (default) and 512 pixels. The proportions of the video (height and width) only depends on the sign's proportions and not on the used resolution.

fx

fx specifies a sound effect to apply to the media. The only option is 3d; this causes the sound to pan according to the avatar's position.

radius

radius specifies the maximum radius in meters the media can be heard. The default radius is 30 meters.

radoff

radoff specifies the maximum radius in meters the media stream will play. The default radoff is 30 meters. radoff cannot be smaller than radius. Going beyond this radius stops the media.

vol

vol specifies the relative volume of the played sound in percent. Valid values are in the range from 0 to 100, where 0% is muted and 100% is full volume. Default is 100%.

loop

loop specifies the count of loops to play the specified media file. Valid values are in the range from 1 to 2147483647. Default is 1.

osd

osd, also known as on-screen display, is a boolean parameter that specifies if a TV-like on-screen-display should be displayed on top of the video frames.

ext

ext is a boolean parameter which forces the video to play in an external window. If the media only contains audio, no external window is displayed.

nostop

nostop prevents mouse clicks from stopping media. Objects using the bump trigger always have this option set, to avoid subsequent on/off triggering of the media command. In conjunction with the activate trigger, this disables the toggle-switch-function, which is applied on media signs by default. When used with the create trigger the nostop argument has no effect.

nocache

nocache prevents files with an extension .mp3 or .wav from been cached. This will allow, eg. special configured icecast streams that use a file name and an extension in an url, to be streamed instead of downloaded to cache. Use this option only, if you are certain the server is media streaming server. Note, if the nocache option is not given, ie forgotten, caching of a .mp3 or .wav can not be interrupted until a stream error or an end of file condition has been reached, and the cached version will be replayed on any later access. The option was added to version 6.4 build 1512.

Examples

create media umpd.umd.edu/sirens/video/Windows/EWdownload.wmv

This creates and plays the given media stream as soon the used sign object comes within your avatar's view range.

Object #1:
create sign color=orange, name foo
Object #2:
activate media name=foo umpd.umd.edu/sirens/video/Windows/EWdownload.wmv

This creates an empty sign object at first. As soon the activate command on the other object is triggered, the given media stream is displayed on the sign object named foo.

create sign bcolor=red; activate media 212.109.3.19:8000 

This creates an object that when clicked on, starts the media, and when clicked on the second time it switches it off again.

Object #1:
create sign, name foo, solid off; bump media 212.109.3.19:8000
Object #2:
create sign, name foo; bump media stop name=foo

If your avatar collides with the first object, it will start the media. When colliding with the other object it stops the running media.

Object #1:
create sign, name foo; activate media 212.109.3.19:8000
Object #2:
activate media pause name=foo

This creates and plays the given media stream which can be paused by clicking the other object.

Object #1:
create sign, name foo; activate media url=212.109.3.19:8000
Object #2:
activate media set vol=50 osd=off name=foo activate media set vol=100 osd=on name=foo

This will change the parameters of an already playing media.


Notes

  • Playback of some files is subject to the codecs installed on the user's system. The safest formats to use are .wmv and .wma for video and audio, respectively.
  • Media playback may be disabled in the browser's Settings, within the Downloads tab.
  • On a world level, media playback may be prevented from being triggered by create in the Options section of the World's features.

External links

Object Scripting

Building2.jpg

Triggers: CreateBumpActivateAdoneAtCollideSdoneEnter ZoneExit Zone

Commands: AddforceAddtorqueAlpharefAnimateAstartAstopCameraColliderColltagColorCoronaEnviExamineFrameGroupLightLinkLockMatfxMediaMidiMoveNameNoiseOpacityPictureRotateSayScale SeqShadowShearSignSkewSkyboxSolidSoundTagTeleport / TeleportxTextureTimerURLVelocityVisibleWarpWeb nl:Commando:Media