代码改变世界

gitbook插入视频

2021-06-03 15:58  Tanwheey  阅读(815)  评论(0编辑  收藏  举报

Video Player for GitBook要求:

gitbook >=2.0.0

安装

book.json中添加,具体位置:/yourPath/.gitbook/versions/yourVersion/

添加:

{
    "plugins": ['video-player']
}

然后执行

gitbook install

就可以安装完插件

使用方法

{% videoplayerscripts %}{% endvideoplayerscripts %}

例如

{% videoplayer id="docker-myvideo" width="640" height="480" posterExt="png" %}https://s3.amazonaws.com/gitbooks/myvideo{% endvideoplayer %}

插件自动加载myvideo.mp4,默认使用WebM编码的视频