WWW.audioClip Manual     Reference     Scripting  
Scripting > Runtime Classes > WWW
WWW.audioClip

var audioClip : AudioClip

Description

Returns a AudioClip generated from the downloaded data (Read Only).

The data must be an audio clip in Ogg Vorbis format.

Even if the audio is not yet completely downloaded, this returns immediately, allowing you to start playing the partial music as it downloads.

var url : String;
function Start ()
{
www=new WWW(url);
audio.clip=www.audioClip;
}

function Update ()
{
if(!audio.isPlaying && audio.clip.isReadyToPlay)
audio.Play();
}