jeffreytse / jekyll-spaceship

🚀 A Jekyll plugin to provide powerful supports for table, mathjax, plantuml, mermaid, emoji, video, audio, youtube, vimeo, dailymotion, soundcloud, spotify, etc.
MIT License
605 stars 63 forks source link

Customize `autoplay` attribute in `video` tag ? #53

Closed honggaruy closed 3 years ago

honggaruy commented 3 years ago

For the media processor, it looks like the autoplay attribute is added with the default configuration. (general video usage) But, I don't want autoplay sometimes.

According to the answers of this quesition , the presence of autoplay attribute is a shorthand for true.

How can i customize the autoplay attribute in video tag ?

jeffreytse commented 3 years ago

Hi @honggaruy ,

Could you provide me your code? Actually, the media-processor will not set autoplay attribute automatically.

Thanks and regards

honggaruy commented 3 years ago

Here is my code.

in Markdown

![ellystand](https://ksr-video.imgix.net/projects/2693324/video-741087-h264_high.mp4)

in Html , I copied this from Chrome Debug Tool

<p>
  <iframe id="media-video-741087-h264_high.mp4" class="media" src="https://ksr-video.imgix.net/projects/2693324/video-741087-h264_high.mp4" title="" width="100%" height="350" style="max-width: 600px;outline: none" allow="encrypted-media; picture-in-picture" frameborder="0" allowfullscreen="">
  #document
    <html>
      <head><meta name="viewport" content="width=device-width"><style id="holderjs-style" type="text/css"></style></head> 
      <body class=" __plain_text_READY__">
        <video controls="" autoplay="" name="media">
          <source src="https://ksr-video.imgix.net/projects/2693324/video-741087-h264_high.mp4" type="video/mp4">
        </video> 
      </body>
    </html>
  </iframe>
</p>
jeffreytse commented 3 years ago

Hi @honggaruy,

This issue has been addressed and fixed. Please update the plugin to the latest version and try again.

Thanks and regards

honggaruy commented 3 years ago

It worked !! I can customize autoplay attribute now. Thanks !!

jeffreytse commented 3 years ago

Hi @honggaruy ,

You're welcome! And If you like my works, welcome to take a consideration to be my sponsor, your sponsorship will help me sustain my open-source projects and make my new ideas come true. Also, you will get a badge on your profile page, I will tweet your sponsorship and add you to my BACKERS.md list. : )

Thanks and regards