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 a6a641f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 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,18 @@ 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 a6a641f

Please sign in to comment.