hexo-tag-dailymotion

1.1.0 • Public • Published

hexo-tag-dailymotion

A tag plugin to embed Dailymotion video player in your Hexo blog

npm npm

Installation

npm install hexo-tag-dailymotion

Usage

{% dailymotion [player:player_id] [video:video_id] [playlist:playlist_id] %}

Parameters

All parameters are optional, but you must add either a video or playlist or the player will remains an empty black rectangle.

See Video player documentation – Dailymotion for Developers for details about how Dailymotion player works.

Example usages

Embed a video

{% dailymotion player:xakn video:x84sh87 %}

will inject the following into hexo rendered page or post

<script src="https://geo.dailymotion.com/player/xakn.js" data-video="x84sh87" ></script>

Embed a playlist

{% dailymotion player:xakn playlist:x79dlo %}

will inject the following into hexo rendered page or post

<script src="https://geo.dailymotion.com/player/xakn.js" data-playlist="x79dlo"></script>

Embed a video and a playlist

{% dailymotion player:xakn video:x84sh87 playlist:x79dlo %}

will inject the following into hexo rendered page or post

<script src="https://geo.dailymotion.com/player/xakn.js" data-video="x84sh87" data-playlist="x79dlo"></script>

Embed a default player

{% dailymotion video:x84sh87 %}

will inject the following into hexo rendered page or post

<script src="https://geo.dailymotion.com/player.js" data-video="x84sh87"></script>

Embed a player with parameters

{% dailymotion player:xakn video:x84sh87 params:startTime=15 %}

will inject the following into hexo rendered page or post

<script src="https://geo.dailymotion.com/player/xakn.js" data-video="x84sh87" data-params="startTime=15"></script>

{% dailymotion player:xakn video:x84sh87 params:startTime=15&mute=true&loop=true %}

will inject the following into hexo rendered page or post

<script src="https://geo.dailymotion.com/player/xakn.js" data-video="x84sh87" data-params="startTime=15&mute=true&loop=true"></script>

Package Sidebar

Install

npm i hexo-tag-dailymotion

Weekly Downloads

2

Version

1.1.0

License

MIT

Unpacked Size

16.6 kB

Total Files

9

Last publish

Collaborators

  • dhar