DPlayer实现带弹幕logo右键菜单设置截屏功能的视频播放器示例代码
代码语言:html
所属分类:多媒体
代码描述:DPlayer实现带弹幕logo右键菜单设置截屏功能的视频播放器示例代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum=1.0,minimum=1.0,user-scalable=0" /> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/mock.min.js"></script> <script type="text/javascript"> //ajax拦截并返回模拟数据 Mock.mock('/api/v3/?id=demo', { code:0,//成功 data:[ [20.188,0,16777215,'小明','好家伙,我直接好家伙'], [1.188,0,16777215,'小华','好,我知道'] ] }); </script> <style> </style> </head> <body> <div id="dplayer"></div> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/DPlayer.min.js"></script> <script> const dp = new DPlayer({ container: document.getElementById('dplayer'), autoplay: false, theme: '#FADFA3', loop: true, lang: 'zh-cn', screenshot: true, hotkey: true, preload: 'auto', logo: '//repo.bfw.wiki/bfwrepo/icon/617246072.........完整代码请登录后点击上方下载按钮下载查看
网友评论0