Play Audio and Video in Hexo
Maybe they are the best plugins to insert embedded audio and video in Hexo, which is based on HTML5 online media player APlayer and DPlayer designed by DIYgod. They are hexo-tag-aplayer
and hexo-tag-dplayer
.
Installation
The GitHub project of hexo-tag-aplayer
and hexo-tag-dplayer
are:
hexo-tag-aplayer
: https://github.com/grzhan/hexo-tag-aplayerhexo-tag-dplayer
: https://github.com/MoePlayer/hexo-tag-dplayer
Just type the following command to install:1
2npm install hexo-tag-dplayer --save
npm install hexo-tag-aplayer --save
Usage
Audio Player
The hexo-tag-aplayer
is maintained by @grzhan1
{% aplayer name singer mp3 cover %}
Here is a demo:
In HTML5, there are 3 supported audio formats: MP3, Wav, and Ogg. Not all the audio types are supported by the browser, here is the supported list from W3School:
Browser | MP3 | Wav | Ogg |
---|---|---|---|
Internet Explorer | YES | NO | NO |
Chrome | YES | YES | YES |
Firefox | YES | YES | YES |
Safari | YES | YES | NO |
Opera | YES | YES | YES |
Video Player
The hexo-tag-dplayer
is maintained by @Myer921, @dixyes1
{% dplayer "url=" "pic=" "api=https://api.prprpr.me/dplayer/" "loop=no" "theme=#FADFA3" "autoplay=false" %}
Here is a demo:
In HTML5, there are 3 supported video formats: MP4, WebM, and Ogg. Not all the video types are supported by the browser, here is the supported list from W3School:
Browser | MP4 | WebM | Ogg |
---|---|---|---|
Internet Explorer | YES | NO | NO |
Chrome | YES | YES | YES |
Firefox | YES | YES | YES |
Safari | YES | NO | NO |
Opera | YES (from Opera 25) | YES | YES |
Reference
- DiyGod This is the author.
- Insert Online Media in Hexo
- Aplayer and Dplayer in Hexo