Skip to content

Commit

Permalink
docs: Include relative width support
Browse files Browse the repository at this point in the history
- Fix: Correct the option usage example.
- Change: Update the descriptions of `height` and `width` options.
- Change: Use relative width in the option usage example.
  • Loading branch information
AnonymouX47 committed Nov 6, 2024
1 parent 78d10e0 commit f3163f9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions docs/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ the video directive supports all the optional attributes from the html tag as su
``:alt:``,``str``,Specify the text to write when the video cannot be displayed
``:autoplay:``,,Specifies that the video will start playing as soon as it is ready
``:nocontrols:``,,Specifies that video controls should not be displayed (such as a play/pause button etc).
``:height:``,``int``,Sets the height of the video player in pixels
``:height:``,``int``,Sets the height of the video player in pixels (ignored if relative width is used)
``:loop:``,,Specifies that the video will start over again, every time it is finished
``:muted:``,,Specifies that the audio output of the video should be muted
``:poster:``,``str``, Specifies an image url to be shown while the video is downloading, or until the user hits the play button
``:preload:``,``str``,"Specifies if and how the author thinks the video should be loaded when the page loads. Can only be values from ``['auto', 'metadata', 'none']``"
``:width:``,``int``, Sets the width of the video player in pixels
``:width:``,``int``\ [``%``\ ], Sets the width of the video player in pixels or relative to the page's width if a percentage
``:class:``,``str``, Set extra class to the video html tag

They can be used as any directive option:
Expand All @@ -64,14 +64,17 @@ They can be used as any directive option:
.. video:: _static/video.mp4
:nocontrols:
:autoplay:
:muted:
:loop:
:poster: _static/image.png
:width: 100%
.. video:: _static/video.mp4
:nocontrols:
:autoplay:
:muted:
:loop:
:width: 100%

And using the ``:class:`` parameter in combination with custom css, you can change the display of the html ``<video>`` tag:

Expand Down

0 comments on commit f3163f9

Please sign in to comment.