mirror of
https://github.com/videojs/video.js.git
synced 2025-02-04 11:43:27 +02:00
Updated docs
This commit is contained in:
parent
f96f63acca
commit
79cec32401
@ -42,21 +42,21 @@ Individual Options
|
|||||||
|
|
||||||
> ### Note on Video Tag Attributes ###
|
> ### Note on Video Tag Attributes ###
|
||||||
> With HTML5 video tag attributes that can only be true or false (boolean), you simply include the attribute (no equals sign) to turn it on, or exclude it to turn it off. For example, to turn controls on:
|
> With HTML5 video tag attributes that can only be true or false (boolean), you simply include the attribute (no equals sign) to turn it on, or exclude it to turn it off. For example, to turn controls on:
|
||||||
>
|
|
||||||
> WRONG
|
WRONG
|
||||||
> <code type="html">
|
<code type="html">
|
||||||
>
|
|
||||||
> <video controls="true" ...>
|
<video controls="true" ...>
|
||||||
>
|
|
||||||
> </code>
|
</code>
|
||||||
>
|
|
||||||
> RIGHT
|
RIGHT
|
||||||
> <code type="html">
|
<code type="html">
|
||||||
>
|
|
||||||
> <video controls ...>
|
<video controls ...>
|
||||||
>
|
|
||||||
> </code>
|
</code>
|
||||||
>
|
|
||||||
> The biggest issue people run into is trying to set these values to false using false as the value (e.g. controls="false") which actually does the opposite and sets the value to true because the attribute is still included. If you need the attribute to include an equals sign for XHTML validation, you can set the attribute's value to the same as its name (e.g. controls="controls").
|
> The biggest issue people run into is trying to set these values to false using false as the value (e.g. controls="false") which actually does the opposite and sets the value to true because the attribute is still included. If you need the attribute to include an equals sign for XHTML validation, you can set the attribute's value to the same as its name (e.g. controls="controls").
|
||||||
|
|
||||||
|
|
||||||
|
@ -29,16 +29,16 @@ Once you have your WebVTT file created, you can add it to Video.js using the tra
|
|||||||
|
|
||||||
<code type="html">
|
<code type="html">
|
||||||
|
|
||||||
<video id="example_video_1" class="video-js vjs-default-skin"
|
<video id="example_video_1" class="video-js vjs-default-skin"
|
||||||
controls preload="auto" width="640" height="264"
|
controls preload="auto" width="640" height="264"
|
||||||
data-setup='{"example_option":true}'>
|
data-setup='{"example_option":true}'>
|
||||||
<source src="http://video-js.zencoder.com/oceans-clip.mp4" type='video/mp4' />
|
<source src="http://video-js.zencoder.com/oceans-clip.mp4" type='video/mp4' />
|
||||||
<source src="http://video-js.zencoder.com/oceans-clip.webm" type='video/webm' />
|
<source src="http://video-js.zencoder.com/oceans-clip.webm" type='video/webm' />
|
||||||
<source src="http://video-js.zencoder.com/oceans-clip.ogv" type='video/ogg' />
|
<source src="http://video-js.zencoder.com/oceans-clip.ogv" type='video/ogg' />
|
||||||
|
|
||||||
<track kind="captions" src="http://example.com/path/to/captions.vtt" srclang="en" label="English" default>
|
<track kind="captions" src="http://example.com/path/to/captions.vtt" srclang="en" label="English" default>
|
||||||
|
|
||||||
</video>
|
</video>
|
||||||
|
|
||||||
</code>
|
</code>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user