Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

kn007/DPlayerHandle

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
10 Commits
 
 
 
 
 
 

Repository files navigation

Description

Easy handle DPlayer Lite or DPlayer on WordPress. A shortcode for WordPress to using DPlayer.

Support [video] tag, compatible with AMP.

Requirement

How To Using

Put class.dplayer.php into your theme folder, then put this following code to your theme functions.php:

class_exists('DPlayerHandle') or require(get_template_directory() . '/class.dplayer.php');
$dplayer = new DPlayerHandle;
$dplayer->init();

Shortcode example:

[dplayer autoplay="false" theme="#b7daff" loop="false" preload="auto" src="http://devtest.qiniudn.com/若能绽放光芒.mp4" poster="http://devtest.qiniudn.com/若能绽放光芒.png" type="auto" mutex="true" iconsColor="#ffffff"]

Video tag shortcode example:

[video dplayer="true" src="http://devtest.qiniudn.com/若能绽放光芒.mp4" poster="http://devtest.qiniudn.com/若能绽放光芒.png"]

More information: https://kn007.net/topics/wordpress-blog-use-new-html5-video-player-dplayer-lite/

Thank you list

DIYgod, the author of DPlayer. Github repo

About

kn007's blog


中文说明

轻松的在WordPress使用上DPlayer和DPlayer Lite,短代码形式调用。

支持原生[video]标签,不影响AMP模式。

依赖组件

如何使用

class.dplayer.php放在你主题的根目录下,然后将下面代码放在functions.php里即可。

class_exists('DPlayerHandle') or require(get_template_directory() . '/class.dplayer.php');
$dplayer = new DPlayerHandle;
$dplayer->init();

短代码调用方式举例:

[dplayer autoplay="false" theme="#b7daff" loop="false" preload="auto" src="http://devtest.qiniudn.com/若能绽放光芒.mp4" poster="http://devtest.qiniudn.com/若能绽放光芒.png" type="auto" mutex="true" iconsColor="#ffffff"]

Video短代码调用方式举例:

[video dplayer="true" src="http://devtest.qiniudn.com/若能绽放光芒.mp4" poster="http://devtest.qiniudn.com/若能绽放光芒.png"]

详细说明见:https://kn007.net/topics/wordpress-blog-use-new-html5-video-player-dplayer-lite/

特别鸣谢

感谢DIYgod写的DPlayer,Github项目地址

关于作者

kn007的个人博客

About

Easy handle DPlayer-Lite or DPlayer on WordPress. A shortcode for WordPress to using DPlayer.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.