Git Product home page Git Product logo

metingjs's Introduction

Meting

Author Version Travis License

Requirement

https://github.com/MoePlayer/APlayer

Version API Status APlayer
1.2.x Supported
2.0.x Latest

CDN

Quick Start

<!-- require APlayer -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.css">
<script src="https://cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.js"></script>
<!-- require MetingJS -->
<script src="https://cdn.jsdelivr.net/npm/meting@2/dist/Meting.min.js"></script>

<meting-js
	server="netease"
	type="playlist"
	id="60198">
</meting-js>

https://music.163.com/#/playlist?id=60198

<meting-js
	auto="https://y.qq.com/n/yqq/song/001RGrEX3ija5X.html">
</meting-js>

https://y.qq.com/n/yqq/song/001RGrEX3ija5X.html

<meting-js
	name="rainymood"
	artist="rainymood"
	url="https://rainymood.com/audio1110/0.m4a"
	cover="https://rainymood.com/i/badge.jpg">
</meting-js>

for self-hosted media

<meting-js
	name="rainymood"
	artist="rainymood"
	url="https://rainymood.com/audio1110/0.m4a"
	cover="https://rainymood.com/i/badge.jpg"
	fixed="true">
	<pre hidden>
		[00:00.00]This
		[00:04.01]is
		[00:08.02]lyric
	</pre>
</meting-js>

Fixed mode with Lyric text

Option

option default description
id require song id / playlist id / album id / search keyword
server require music platform: netease, tencent, kugou, xiami, baidu
type require song, playlist, album, search, artist
auto options music link, support: netease, tencent, xiami
fixed false enable fixed mode
mini false enable mini mode
autoplay false audio autoplay
theme #2980b9 main color
loop all player loop play, values: 'all', 'one', 'none'
order list player play order, values: 'list', 'random'
preload auto values: 'none', 'metadata', 'auto'
volume 0.7 default volume, notice that player will remember user setting, default volume will not work after user set volume themselves
mutex true prevent to play multiple player at the same time, pause other players when this player start play
lrc-type 0 lyric type
list-folded false indicate whether list should folded at first
list-max-height 340px list max height
storage-name metingjs localStorage key that store player setting

Documentation for APlayer can be found at https://aplayer.js.org/#/home?id=options

Advanced

MetingJS allow you to use self-hosted API, more information about Meting.

<script>
var meting_api='http://example.com/api.php?server=:server&type=:type&id=:id&auth=:auth&r=:r';
</script>

<script src="dist/Meting.min.js"></script>

Browser support

Browsers without native custom element support require a polyfill.

  • Chrome
  • Firefox
  • Safari
  • Internet Explorer 11
  • Microsoft Edge

Author

MetingJS © metowolf, Released under the MIT License.

Blog @meto · GitHub @metowolf · Twitter @metowolf · Telegram Channel @metooooo

metingjs's People

Contributors

alandecode avatar metowolf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

metingjs's Issues

metingjs与hexo-toc插件冲突,中文标题无法跳转

感谢作者开源metingjs的功能。
问题描述:
我在博客代码里加入metingjs的引用音乐的功能,然后在toc中的目录跳转时,如果遇到中文目录则无法跳转,英文目录正常跳转。如果将metingjs插件功能注销掉,则toc中文目录正常跳转,猜测是和hexo-toc插件的代码冲突。
具体博客代码参考:https://github.com/huweihuang/www.huweihuang.com/blob/master/themes/huweihuang/layout/post.ejs#L38

问题现象参考:https://www.huweihuang.com/article/kubernetes/kubernetes-resource/

文章中英文toc目录可以正常跳转,中文则当页跳转失败,但是复制地址到新业面则会跳转。

歌单无法自动或手动更新

我在网易云音乐创建了一个歌单,在第一次引用的时候,可以加载歌单信息。
但是该歌单添加新的歌曲的时候,插件引用的歌单并不会更新对应的歌单,好像也无法手动更新,一直在第一次加载的歌单上
歌单的ID号并没有改变,能否设置成自动更新歌单的方式。

在hexo-tag-aplayer下的issue

解析不出来了

调用代码

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.css">
<script src="https://cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.js"></script>
<!-- require MetingJS -->
<script src="https://cdn.jsdelivr.net/npm/meting@2/dist/Meting.min.js"></script>
<meting-js style="width: auto;height: 2000px;"
    server="netease"
    type="playlist"
    id="2364053447"
    theme="#2980b9"
    loop="all"
    autoplay="false"
    order="list"
    storageName="aplayer-setting"
    lrctype= 0
    list-max-height="800px"
    >
</meting-js>

控制台打印

serverless-meto.herokuapp.com/meting/index.php?server=netease&type=playlist&id=2364053447&r=0.7724818304792973:1 GET https://serverless-meto.herokuapp.com/meting/index.php?server=netease&type=playlist&id=2364053447&r=0.7724818304792973 net::ERR_NAME_NOT_RESOLVED
(index):1 Uncaught (in promise) TypeError: Failed to fetch
Promise.then (async)
_parse @ Meting.min.js:1
connectedCallback @ Meting.min.js:1

线上网址https://removeif.github.io/music1/

前进后退导致 Aplayer 重复创建

点击浏览器的返回,再点击前进回到页面,原来的 Aplayer 还在,meting-js 又会创建新的 Aplayer。猜测浏览器保存了原来的状态,同时也会触发 connectedCallback,感觉需要加个判断,或者作者有更好的办法。

  connectedCallback() {
    if (!this.aplayer && window.APlayer && window.fetch) {
      this._init()
      this._parse()
    }
  }

您好,qq音乐好像被腾讯墙了

谷歌浏览器控制台出现如下请求错误:

GET https://ws.stream.qqmusic.qq.com/M800004gQb5F3tsz7n.mp3?guid=410002021&vkey=DE797989D560CA3C699A1C0A557676DC26C903D87185F078C471FE7E99A63BEDBADAF42F1F74F7410CA6E41827343D2CCD1888BF19268547&uin=0&fromtag=66 net::ERR_CERT_COMMON_NAME_INVALID

播放器提示:An audio error has occurred, player will skip forward in 2 seconds.
网易云歌单正常播放,就是qq音乐被forbidden

能否设置歌词默认不显示

能否设置歌词默认不显示

吸底状态下显示歌词,很容易挡住一些内容,可不可以增加选项,设置歌词默认不显示

请问短期内会取消支持1.x版本嘛?

网站出了一些问题,现在看起来是只能支持1.x版本,上2.x版本F12就会报错“Meting.min.js:1 Uncaught TypeError: Cannot read property 'destroy' of undefined”,所以准备暂时先用1.x版本的,请问1.x版本会一直支持下去嘛?有没有取消支持1.x版本的计划…

页面切换报错。

Uncaught TypeError: Cannot read property 'classList' of undefined
at e.value (list.js:176)
at e.value (player.js:516)
at player.js:184

list.js:176
this.player.container.querySelectorAll('.aplayer-list li')[this.index].classList.add('aplayer-list-light');

See Link .
1.点击 Playlist 进入带 歌单 的页面。
2.切换到其他页面。
3.再点击 Playlist 进入含含 meting-js 标签的页面,即报错。

用的是 1.20 + loadMeting() 适应pjax.
曾试过切换至 2.01,依然报错。

本地页面请求返回302

你好,请教一下,我用文档示例代码本地测试了一下,我看http请求响应的是302。为什么呢 代码如下:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="./dist/APlayer.min.css">
    <script src="./dist/APlayer.min.js"></script>
</head>
<body>   
    <div class="aplayer"
        data-id="1338728670"
        data-server="netease"
        data-type="song">
    </div>        
</body>
<script src="dist/Meting.min.js"></script>
</html>

主题附带了aplayer,做单独的歌单也必需metingJS吗?

嗨,我用的hexo,主题是volantis,主题自带的有aplayer,可以在yml里开启底部或者侧边aplayer播放器。我想在文章内引用做一个歌单页面,但是按照aplayer官方的文档,嵌入的代码会以代码块的方式展示出来,所以我今天安装了tags-aplayer插件,按照那个文档也不行,直到使用了这个文档。
如果这些操作不是必需的话,请问有什么办法可以直接在posts里嵌入播放器呢?地址:https://w4j1e.xyz
非常感谢!

autoplay 似乎失效,请问怎么解决啊?

解析出的代码:

<meting-js theme="#1BCDFC" fixed="false" list-folded="true" mutex="true" autoplay="" server="tencent" type="playlist" id="1759617925" volume="0.7">

可是我在模板里写的是 autoplay="true" ,加载时怎么会没出来呢?

网址链接:inkss.cn

歌词默认隐藏

我该怎样设置才能让歌词默认不显示呢,现在加载完毕之后总会在底部默认显示歌词

lifetime of direct link

我在做静态页面生成, 要静态化所有的请求.

这里有个问题

返回的解析链接时永久的吗, 只要源站不改就不用更新的那种

还是每隔一段时间要向 Meting 服务器请求新的地址

您好,不知为何有时候网易云歌单会返回以前的数据

是这样的,我新建了一个歌单做存储,放了一首音乐进去测试,没有问题后开始往里面收藏音乐,但是很长时间不能刷新到全部歌曲,等了一段时间后 能刷新全部但是偶尔刷新页面还会回到只有1首歌测试的时候,而且那首歌已经被移除歌单,不知这是什么问题?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.