Skip to content

Commit f89cec1

Browse files
committed
update plugins.md
1 parent eab8f9e commit f89cec1

File tree

3 files changed

+16
-49
lines changed

3 files changed

+16
-49
lines changed

README.md

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -8,45 +8,5 @@
88
* [GitBook Documentation](http://help.gitbook.com/)
99

1010
---
11-
12-
1. [安装](installation.md)
13-
2. [命令](commands.md)
14-
3. [配置](#配置)
15-
4. [插件](#插件)
16-
17-
### [配置](settings.md)
18-
* [title - 标题](settings.md#title)
19-
* [author - 作者信息](settings.md#author)
20-
* [description - 书本描述](settings.md#description)
21-
* [language - 使用的语言](settings.md#language)
22-
* [links - 在侧边栏添加链接](settings.md#links)
23-
* [styles - 自定义样式](settings.md#styles)
24-
* [plugins - 插件](settings.md#plugins)
25-
* [pluginsConfig - 插件配置](settings.md#pluginsconfig)
26-
* [gitbook - 指定gitbook版本](settings.md#gitbook)
27-
28-
### [插件](plugins.md)
29-
* [Disqus - Disqus评论](plugins.md#disqus)
30-
* [duoshuo - 多说](plugins.md#duoshuo)
31-
* [Search Pro - 支持中文搜索](plugins.md#search-pro)
32-
* [Advanced Emoji - 支持emoji表情](plugins.md#advanced-emoji)
33-
* [Github - 添加github图标](plugins.md#github)
34-
* [Ace Plugin - 支持ace](plugins.md#ace-plugin)
35-
* [Emphasize - 强调文字(为文字加上底色)](plugins.md#ace-plugin)
36-
* [KaTex - 支持数学公式](plugins.md#katex)
37-
* [Include Codeblock - 使用代码块显示指定文件的内容](plugins.md#include-codeblock)
38-
* [Splitter - 自由调节侧边栏宽度](plugins.md#splitter)
39-
* [Mermaid -支持渲染Mermaid图表](plugins.md#mermaid)
40-
* [sharing - 分享](plugins.md#sharing)
41-
* [Tbfed-pagefooter - 为页面添加页脚](plugins.md#tbfedpagefooter)
42-
* [Toggle Chapters - 折叠章节](plugins.md#toggle-chapters)
43-
* [Sectionx - 将页面分块显示](plugins.md#sectionx)
44-
* [Codeblock-filename - 为代码块添加文件名称](plugins.md#codeblockfilename)
45-
* [ga - google 统计](plugins.md#ga)
46-
* [baidu - 百度统计](plugins.md#baidu)
47-
* [donate - 打赏](plugins.md#donate)
48-
* [Local Video - 使用Video.js播放视频](plugins.md#local-video)
49-
* [toc - 自动生成目录](plugins.md#toc)
50-
* [Edit Link - 链接到当前页源文件上](plugins.md#edit-link)
51-
* [sitemap - 生成sitemap](plugins.md#sitemap)
11+
> 如若转载请标明出处.
5212

plugins.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -339,16 +339,16 @@ google 统计
339339
```
340340

341341
### Local Video
342-
使用Video.js 播放本地视频
343-
342+
使用Video.js 播放本地视频
343+
[插件地址](https://plugins.gitbook.com/plugin/local-video)
344344
```json
345345
"plugins": [ "local-video" ]
346346
```
347-
使用示例:为了使视频可以自适应,我们指定视频的`width`为100%,并设置宽高比为`16:9`
347+
使用示例:为了使视频可以自适应,我们指定视频的`width`为100%,并设置宽高比为`16:9`,如下面所示
348348
```
349349
{% raw %}
350350
<video id="my-video" class="video-js" controls preload="auto" width="100%"
351-
data-setup='{"aspectRatio":"16:9"}'>
351+
poster="http://zhangjikai.com/resource/poster.jpg" data-setup='{"aspectRatio":"16:9"}'>
352352
<source src="http://zhangjikai.com/resource/demo.mp4" type='video/mp4' >
353353
<p class="vjs-no-js">
354354
To view this video please enable JavaScript, and consider upgrading to a web browser that
@@ -357,10 +357,16 @@ data-setup='{"aspectRatio":"16:9"}'>
357357
</video>
358358
{% endraw %}
359359
```
360-
360+
另外我们还要再配置下css,即在website.css中加入
361+
```css
362+
.video-js {
363+
width:100%;
364+
height: 100%;
365+
}
366+
```
361367
<br />
362368
{% raw %}
363-
<video id="my-video" class="video-js" controls preload="auto" width="100%" data-setup='{"aspectRatio":"16:9"}'>
369+
<video id="my-video" class="video-js" controls preload="auto" width="100%" poster="http://zhangjikai.com/resource/poster.jpg" data-setup='{"aspectRatio":"16:9"}'>
364370
<source src="http://zhangjikai.com/resource/demo.mp4" type='video/mp4' >
365371
<p class="vjs-no-js">
366372
To view this video please enable JavaScript, and consider upgrading to a web browser that

styles/website.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ h1 , h2{
1919
border-bottom: 1px dotted #e7e7e7;
2020
}
2121

22-
.videocontent{
23-
width: 80%;
22+
.video-js {
23+
width:100%;
24+
height: 100%;
2425
}

0 commit comments

Comments
 (0)