hacks-guide-minimal-mistake.../_includes/video
sunete 9280de7075
Update video (#2512)
* Update video

support bilibili video

* Update video

drop the duplicated <div> wrapper

* Update video

update video
2020-05-01 10:16:59 -04:00

15 lines
979 B
Text

{% capture video_id %}{{ include.id }}{% endcapture %}
{% capture video_provider %}{{ include.provider }}{% endcapture %}
<!-- Courtesy of embedresponsively.com //-->
<div class="responsive-video-container">
{% if video_provider == "vimeo" %}
<iframe src="https://player.vimeo.com/video/{{ video_id }}?dnt=true" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
{% elsif video_provider == "youtube" %}
<iframe src="https://www.youtube-nocookie.com/embed/{{ video_id }}" frameborder="0" allowfullscreen></iframe>
{% elsif video_provider == "google-drive" %}
<iframe src="https://drive.google.com/file/d/{{ video_id }}/preview" frameborder="0" allowfullscreen></iframe>
{% elsif video_provider == "bilibili" %}
<iframe src="https://player.bilibili.com/player.html?bvid={{ video_id }}&page=1&as_wide=1&high_quality=1&danmaku=0" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"></iframe>
{% endif %}
</div>