Closed eldruin closed 5 years ago
@eldruin You may try https://hexo.io/docs/tag-plugins#Raw
Thank you for your answer. Adding HTML5 tags <video>...</video>
works just fine and the video plays correctly so I did not need {% raw %}
so far. However, the video then does not integrate into the lightgallery so you cannot go to the next picture, or display a video caption, for example.
@eldruin could you please add gallery-item
class to the video element and see if it works?
Adding gallery-item
does not seem to change anything. I tried this:
<video class="lg-video lg-object lg-html5 gallery-item" controls poster="...">
<source src="..." type="video/mp4">
</video>
@eldruin You can add your video like this
<div style="display:none;" id="video1">
<video class="lg-video-object lg-html5" controls preload="none">
<source src="https://sample-videos.com/video123/mp4/720/big_buck_bunny_720p_1mb.mp4" type="video/mp4">
</video>
</div>
<a class="gallery-item" data-sub-html="video caption1" data-html="#video1">
<img src="https://sachinchoolur.github.io/lightGallery/static/img/thumb-v-v-1.jpg"/>
</a>
That worked, thank you!
Hi, Are HTML5 videos (MP4/mov/webm,...) supported in the gallery? The lightgallery plugin seems to support them but I cannot get them to work. Would it be necessary to add videojs? Adding raw HTML to the markdown files would be fine for me. Thank you for this great theme!