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