Comments (4)
你可以在可视化编辑里面 添加媒体,添加音乐,然后插入文章即可
短代码方式添加音乐是可以引用外部音乐,但是插入文章方式不可以
from diaspora.
我是想改造下音乐的插入方式,但是这个音乐地址你是在什么地方进行引用的呢?我要在文章的编辑界面添加音乐的上传和URL的输入框!这样就方便了许多
from diaspora.
@iexe 我并没有对 wp 插入的音乐做什么处理
https://github.com/LoeiFy/Diaspora/blob/master/assets/Diaspora.js#L174-L198
player: function(id) {
var p = $('#audio-'+ id +'-1');
if (!p.length) {
$('.icon-play').css({
'color': '#dedede',
'cursor': 'not-allowed'
})
return
}
p[0].play()
p.on({
'timeupdate': function() {
$('.bar').css('width', p[0].currentTime / p[0].duration * 100 +'%')
},
'ended': function() {
$('.icon-pause').removeClass('icon-pause').addClass('icon-play')
},
'playing': function() {
$('.icon-play').removeClass('icon-play').addClass('icon-pause')
}
})
},
wp 插入的音乐都是有固定格式的,我只是让其播放,读取播放状态
from diaspora.
你这么说我就明白了!我的js不是很好 所以没看明白这个方法。谢谢!我准备在页面直接输出这个音乐播放器!这样就方便了 谢谢
from diaspora.
Related Issues (20)
- 动态背景(canvas-nest.js)应用问题 HOT 4
- 如何修改预加载动画… HOT 6
- 你这个不是用的hexo? HOT 1
- 关于文章壁纸 HOT 3
- 如何创建archive页面 HOT 1
- wordpress 5.0.3 无法添加媒体 HOT 2
- 如何删除评论?
- 友情链接 页面用的links模版, 但是样式全乱了.. HOT 1
- TimThumb is No Longer Supported or Maintained HOT 1
- 大佬,我的网页里有个js文件加载缓慢 HOT 1
- 这主题太棒了,有没有hugo版的
- 请教如何关闭音乐自动播放 HOT 2
- 请教关于如何在菜单底部版权声明处添加备案号
- 使用问题 HOT 3
- 手机端点击菜单后仍然能滑动
- what is the name of this theme? 123anime(dot)com
- parallax插件用不了 HOT 1
- 在文章中引用图片引用不了
- 有没有halo版本...
- 首页文章预览内容直接显示了音乐的短代码 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from diaspora.