From a6a641f9c6ead39a5dcab18d7f6bd7e20c3f257d Mon Sep 17 00:00:00 2001 From: AnonymouX47 Date: Thu, 20 Apr 2023 18:09:48 +0100 Subject: [PATCH] docs: Include relative width support - Fix: Correct the option usage example. - Change: Update the descriptions of `height` and `width` options. - Change: Use relative width in the option usage example. --- docs/quickstart.rst | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/quickstart.rst b/docs/quickstart.rst index 4425568..b14e7ca 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -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: @@ -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 ``