Class Audio
Generate a standard HTML5 <audio> tag
Implements
Inherited Members
Namespace: ToSic.Razor.Html5
Assembly: ToSic.Razor.dll
Syntax
public class Audio : Tag<Audio>, IRawHtmlString, IHtmlString, IHtmlTag, ITag, IEnumerable<ITag>, IEnumerable
Methods
| Improve this Doc View SourceAutoplay()
Activate the autoplay attribute on the <audio> tag
Declaration
public Audio Autoplay()
Returns
Type | Description |
---|---|
Audio | a Audio object to enable fluid command chaining |
Autoplay(String)
Set the autoplay attribute on the <audio> tag
Declaration
public Audio Autoplay(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | what should be in autoplay='...'. If called multiple times, later values replace the previous value. |
Returns
Type | Description |
---|---|
Audio | a Audio object to enable fluid command chaining |
Controls()
Activate the controls attribute on the <audio> tag
Declaration
public Audio Controls()
Returns
Type | Description |
---|---|
Audio | a Audio object to enable fluid command chaining |
Controls(String)
Set the controls attribute on the <audio> tag
Declaration
public Audio Controls(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | what should be in controls='...'. If called multiple times, later values replace the previous value. |
Returns
Type | Description |
---|---|
Audio | a Audio object to enable fluid command chaining |
Loop()
Activate the loop attribute on the <audio> tag
Declaration
public Audio Loop()
Returns
Type | Description |
---|---|
Audio | a Audio object to enable fluid command chaining |
Loop(String)
Set the loop attribute on the <audio> tag
Declaration
public Audio Loop(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | what should be in loop='...'. If called multiple times, later values replace the previous value. |
Returns
Type | Description |
---|---|
Audio | a Audio object to enable fluid command chaining |
Muted()
Activate the muted attribute on the <audio> tag
Declaration
public Audio Muted()
Returns
Type | Description |
---|---|
Audio | a Audio object to enable fluid command chaining |
Muted(String)
Set the muted attribute on the <audio> tag
Declaration
public Audio Muted(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | what should be in muted='...'. If called multiple times, later values replace the previous value. |
Returns
Type | Description |
---|---|
Audio | a Audio object to enable fluid command chaining |
Preload(String)
Set the preload attribute on the <audio> tag
Declaration
public Audio Preload(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | what should be in preload='...'. If called multiple times, later values replace the previous value. |
Returns
Type | Description |
---|---|
Audio | a Audio object to enable fluid command chaining |
Src(String)
Set the src attribute on the <audio> tag Automatically url-encode it if contains spaces, umlauts or other unexpected chars
Declaration
public Audio Src(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | what should be in src='...'. If called multiple times, later values replace the previous value. |
Returns
Type | Description |
---|---|
Audio | a Audio object to enable fluid command chaining |