Filetype Support

Studio

Filetype Support

Zappar supports a number of audio and video media formats for incorporation into zaps.

Audio

While Zappar is very visual, both sound and music form a very important part of immersive 3D experiences and should be considered throughout the development of a zap.

Format Support

ZapWorks Studio supports audio files in the following formats:

  • WAV - use for short sound effects, such as button taps
  • OGG - use for music or longer audio sequences

Files in these formats can be dragged directly into the Media Library.

Due to the nature of audio hardware and speakers on mobile devices, the following specifications are recommended for audio files in order to minimise download time and resource use:

  • Use 22.05 kHz sample rate
  • Mono
  • 128 kbps

Initializing in the Hierarchy

Once imported into the Media Library, audio files can be dragged into the Hierarchy for use in-scene. It's important to try to minimise the number of initialized audio files as mobile devices have limited resources for mixing and playing sound.

As with other nodes in the Hierarchy, audio nodes have a number of properties that can be changed in the properties view on the left, or modified in a timeline.

Controlling from a Timeline

Three basic actions can be performed on audio nodes:

  • start - play the audio from it's current position
  • pause - pause the audio at it's current position
  • restart - return the audio node to the beginning and start playback

Each of these actions may be triggered from timelines. With a timeline selected and a time chosen, right-click on an audio node in the Hierarchy. Select "Add Timeline Action", then an action of choice.

A marker will be added to the timeline to indicate the point that the action will be triggered. As with keyframes, markers can be dragged to change the trigger time.

Markers have direction - by default an action will only be triggered when the timeline passes it while playing forward. The direction of marker can be changed from its right-click menu. With a direction of "Both" an action will be triggered when a timeline is playing either forwards or backwards.

Controlling from Script

Dragging an audio node into a script provides a variable that can be used to control the node. The node has methods start(), pause() and restart() for controlling playback, in addition to functions for controlling and retreiving volume. See the Z.Audio reference documentation for more information.

Looping

Audio files can be looped by calling the restart() function on them when the finish event is fired.

Video

ZapWorks Studio supports playback of video in three ways:

  • Full-screen streaming video - the 3D experience is paused while a full-screen video is played. The video must be hosted at a globally accessible URL.
  • External video host - e.g. linking to a YouTube or Vimeo video
  • Video texture - video playback is incorporated into the 3D video

Full-screen streaming video

The Zappar platform utilises the operating system's underlying video support to stream full-screen video. The video must be hosted at a globally accessible URL. The following format is recommended for consistent playback across a range of devices and network connections:

  • MP4 at or around 640px by 480px
  • "Web-optimized" with the index at the start of the file
  • Audio 22.05 kHz mono at 128 kbps

Video should not exceed ten minutes in length.

Compatible full-screen video is launched from a script using the following syntax:

Z.device.playFullscreenVideo("http://...");

Linking to an External Video Site

Zappar's functionality for launching a web view can be used for displaying a video at an external video hosting site such as YouTube or Vimeo:

Z.device.launchUrl("http://www.youtube.com/...");

Video in the 3D View

Video can be dragged into the Media Library for use as a material or skin on planes or other objects. For more information see the Video in the 3D View article.

Looping

Video files can be looped by calling the restart() function on them when the finish event is fired.

Open in new window