Start Page>SiteKiosk Object>CDRecording Object # CDRecording Object The CDRecording object provides CD recording functionality. Members Table The following table lists the members provided by the CDRecording object.
Members
Objects | Description
RootDirectory | Root directory of the CD.
Collections | Description
AudioFiles | List of selected audio files to write to a CD.
RecorderList | List of available CD recorders.
Properties | Description
ActiveRecorder | Active recorder GUID.
FreeBlocks | Number of free blocks.
JobActive | Whether a record job is currently active.
LastTrackNumber | Number of the last track.
LastTrackStart | Start address of the last track of the previous session.
MediaFlags | Flags of the current media.
MediaType | Type of the current media.
NextWriteAddress | The address of where to write next.
RecorderState | If the active recorder is ready.
RecordMode | Current record mode.
SessionCount | Number of sessions.
Title | CD title.
Methods | Description
AddAudioFile | Adds an audio file to the AudioFiles collection.
Cancel | Cancels recording.
ClearAudioFiles | Deletes all audio files from the AudioFiles collection.
DeleteAudioFile | Deletes an audio file from the AudioFiles collection.
Eject | Ejects the recorder's tray.
Erase | Erases CD-RW media, if possible.
GetDirXml | Returns the structure of a directory as an IXMLDOMDocument.
Record | Starts recording.
UpdateMediaInfo | Updates the media information.
UpdateRecorderState | Updates the recorder state.
Events | Description
OnAddProgress | Fires when the progress of adding files changes.
OnBlockProgress | Fires when the progress of writing blocks changes.
OnBurnComplete | Fires when the CD has been completely written.
OnClosingDisc | Fires when the data has been written and the CD is closed.
OnJobComplete | Fires when a job is complete.
OnMediaInserted | Fires when media has been inserted.
OnMediaRemoved | Fires when media has been removed.
OnPreparingBurn | Fires when the CD writer prepares for writing.
OnTrackProgress | Fires when the progress of writing tracks changes.
OnVolumeInserted | Fires when a volume has been inserted.
OnVolumeRemoved | Fires when a volume has been removed.
Remarks This object is available through the main object SiteKiosk. Use the CDRecording object to write files to a CD. Note that the path of a file using SiteKiosk objects must be allowed in the SiteKiosk configuration (Security -> Access -> URL's With Script Permission) if it is not a browser skin file. Examples The following example burns a complete directory to a data CD.
    <SCRIPT TYPE="text/javascript">
    window.external.InitScriptInterface();
    if (SiteKiosk.CDRecording.RecorderState)
    {
       SiteKiosk.CDRecording.RecordMode = 0;
       SiteKiosk.CDRecording.Title = "My new CD";
       SiteKiosk.CDRecording.RootDirectory.Import("c:/dir");
       SiteKiosk.CDRecording.Record(false, true);
    }
    </SCRIPT>
Applies to SiteKiosk v6.0 (and later versions). Back to top