dplayer begin

master
string1995 5 years ago
parent b443b2d49c
commit 5e3ef14218
  1. 4
      etc/dplayer/DPlayer.min.css
  2. 1
      etc/dplayer/DPlayer.min.css.map
  3. 2
      etc/dplayer/DPlayer.min.js
  4. 1
      etc/dplayer/DPlayer.min.js.map
  5. BIN
      etc/img/logo/head.jpg
  6. BIN
      etc/img/logo/logo_black.png
  7. BIN
      etc/img/logo/logo_white.png
  8. 62
      functions.php
  9. 2
      test/_index.php
  10. 5
      test/index.php
  11. 2
      test/red.html

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 696 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

@ -61,7 +61,7 @@ function yimian__footer($wordColor="#C7C7C7",$backgroundColor="#2B2B2B",$urlColo
{
echo " <style>/*footer theme*/footer{padding:1.5rem 1rem;color:".$wordColor.";font-size:1.2rem;line-height:1.4;text-align:center;background:".$backgroundColor.";border-top:1px solid #C7C7C7}a.footera:link{color: ".$urlColor." ; text-decoration:none;}a.footera:visited {color:#79CDCD}</style>
<script>function openwin(){window.open(\"https://cn.yimian.xyz/cv\");}</script>
<footer class=\"footer\">Copyright © 2018.<a class=\"footera\" target=\"_blank\" onclick=\"openwin()\" href=\"#\">Yimian LIU</a> All rights reserved.</footer>";
<footer class=\"footer\">Copyright © 2018.<a class=\"footera\" onclick=\"openwin()\" href=\"#\">Yimian LIU</a> All rights reserved.</footer>";
echo "</body>
</html>";
}
@ -172,3 +172,63 @@ function aplayer__netease($playlistid="2012006204",$loadStart=0,$numLimit=10,$th
}
/**functions for dplayer**/
//put this function to where you want the dplayer to dispaly
function dplayer__element()
{
echo "<div id=\"dplayer\"></div>";
}
//this should put at the near the need of a body,
//the js object name is dp.
function dplayer__setup()
{
echo "<link rel=\"stylesheet\" href=\"https://cn.yimian.xyz/etc/dplayer/DPlayer.min.css\">
<script src=\"https://cn.yimian.xyz/etc/dplayer/DPlayer.min.js\"></script>";
echo "<script type=\"text/javascript\">//script for set up the dplayer
const dp = new DPlayer({
container: document.getElementById('dplayer'),
autoplay: false,
theme: '#FADFA3',
loop: false,
lang: 'zh-cn',
hotkey: true,
preload: 'auto',
logo: 'https://cn.yimian.xyz/etc/img/logo/logo_white.png',
volume: 0.7,
mutex: true,
video: {
url: 'https://obs-410c.obs.myhwclouds.com/video/404.mp4'
},
danmaku: {
id: 'null',
api: 'https://dans.yimian.ac.cn/',
bottom: '10%'
},
contextmenu: [{
text: 'Yimian',
link: 'https://www.yimian.xyz'
}]
});
</script>";
}
//this should put behind the setup function
function dplayer__add($id="null",$url="https://obs-410c.obs.myhwclouds.com/video/404.mp4")
{
echo "<script>//script for adding a new video to aplayer
dp.switchVideo({
url: '$url'
},
{
id: '$id',
api: 'https://dans.yimian.ac.cn/',
bottom: '10%'
});
</script>";
}

@ -0,0 +1,2 @@
<div id="content"><a href="red.html">hhhh</a></div>

@ -2,8 +2,11 @@
<?php yimian__header("Yimian Test","yimian test","This is the test place of Yimian web.");?>
<?php js__jquery()?>
<?php yimian__headerEnd()?>
<div id="content"></div>
<div id="content"><a href="red.html">hhhh</a></div>
<script>$(document).pjax('a', '#content');</script>
<?php dplayer__element()?>
<?php dplayer__setup()?>
<?php dplayer__add(1,"https://obs-410c.obs.cn-east-2.myhwclouds.com/video/%E6%9C%AB%E6%97%A5%E6%97%B6%E5%9C%A8%E5%81%9A%E4%BB%80%E4%B9%88%2C%E6%9C%89%E6%B2%A1%E6%9C%89%E7%A9%BA%2C%E5%8F%AF%E4%BB%A5%E6%9D%A5%E6%8B%AF%E6%95%91%E5%90%97/01%E3%80%8C%E5%9C%A8%E5%A4%AA%E9%98%B3%E8%A5%BF%E6%96%9C%E7%9A%84%E8%BF%99%E4%B8%AA%E4%B8%96%E7%95%8C%E9%87%8C%E3%80%8D.mp4")?>
<?php aplayer__element()?>
<?php aplayer__setup_mini()?>
<?php $rand=rand(0,300);aplayer__netease(808097971,$rand,$rand+10);?>

@ -1,2 +1,2 @@
<a href="_index.php">yyyyyyy</a>
<div id="color" style="background-color:red;width:1000px;height:500px;margin: 0px auto"></div>

Loading…
Cancel
Save