打开/关闭搜索
搜索
打开/关闭菜单
132
146
148
3.8K
吾萌百科
导航
首页
最近更改
随机页面
特殊页面
上传文件
站务
编辑指南
公告
日志
关联
赞助
友联
切换首选项菜单
通知
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。
user-interface-preferences
个人工具
创建账号
登录
查看“︁模块:NeteaseMusic”︁的源代码
来自吾萌百科
分享此页面
查看
阅读
查看源代码
查看历史
associated-pages
模块
讨论
更多操作
←
模块:NeteaseMusic
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您必须确认您的电子邮件地址才能编辑页面。请通过
参数设置
设置并确认您的电子邮件地址。
您可以查看和复制此页面的源代码。
local p = {} function p.getMusicId(url) return string.match(url, "[%?&]id=(%d+)") end function p.checkMusicId(id) return string.match(id, "^%d+$") ~= nil end function p.player(frame) local musicId = frame.args[1] local autoPlay = frame.args.auto and (frame.args.auto == "1" or frame.args.auto == "true") local autoPlayStr = "0" if autoPlay then autoPlayStr = "1" end if musicId ~= nil and p.checkMusicId(musicId) then return '<div class="netease-music-player">' .. frame:extensionTag("htmltag", "", { tagname = "iframe", frameborder = "no", border = "0", marginwidth = "0", marginheight = "0", width = "330", height = "86", src = string.format( "https://music.163.com/outchain/player?type=2&id=%s&auto=%s&height=66", musicId, autoPlayStr) }) .. '</div>' else error("输入的网易云音乐ID错误: " .. musicId) end end return p
该页面使用的模板:
模块:NeteaseMusic/doc
(
查看源代码
)
返回
模块:NeteaseMusic
。