Skip to content

get_HTML

James Brundage edited this page Oct 23, 2026 · 1 revision

get_HTML

Gets an HTML wave

Gets a waveform as HTML.

By default, renders an <audio> element with the current wave as the source.

Notes

This can be customized by setting the HTML.

View Source
<#
.SYNOPSIS
    Gets an HTML wave
.DESCRIPTION
    Gets a waveform as HTML.  
    
    By default, renders an `<audio>` element with the current wave as the source.
.NOTES
    This can be customized by setting the HTML.
#>
param()
if ($this.'#HTML') {
    @(foreach ($object in $this.'#HTML') {
        if ($object -is [xml]) {
            $object.OuterXml
        }
        elseif ($object.html) {
            $object.html
        } elseif ($object.ToString) {
            $object.ToString()
        }
    }) -join [Environment]::NewLine
    return 
}
return "<audio controls='' src='$($this.DataUrl)'></audio>"

Clone this wiki locally