Notion如何嵌入騰訊、網易雲音樂

Notion如果直接嵌入騰訊、網易雲音樂,你會發現解析出來的是一個鏈接而不是一個播放器,根本不是我們想要的效果,那有什麼辦法可以解決呢?

當然有,就是藉助Simple Notion Widgets這個小工具;

Notion如何嵌入騰訊、網易雲音樂

比如我們要準備嵌入網易雲的歌單(騰訊音樂同理),我們嘗試生成外鏈播放器;

注意:能生成外鏈的說明音樂都沒有版權問題,可以嵌入播放,不能生成外鏈提示版權問題的,也是無法嵌入到notion當中播放的;

Notion如何嵌入騰訊、網易雲音樂

如果可以生成,我們進入下一步,把這個歌單的id複製下來;

Notion如何嵌入騰訊、網易雲音樂

把這個歌單id和下面的鏈接拼接起來,得到一個全新的鏈接,示例如下:

https://simple-notion-widgets.vercel.app/music-player/index.html?server=netease&type=playlist&id=3186576487

為什麼得到這個鏈接,後面會講到,現在只需要再進行最後一步,就是把這個鏈接複製到Notion裡面,一個嵌入的歌單播放器就會出現在你的Notion頁面上了;

Notion如何嵌入騰訊、網易雲音樂

Notion如何嵌入騰訊、網易雲音樂

好,現在再說說上面的鏈接,其實這個鏈接就是利用Simple Notion Widgets這個小工具得到的;

工具官網:https://simple-notion-widgets.vercel.app/#music-player

開發者針對Notion無法嵌入的問題,專門做的一個小組件,組件設計基於 Aplayer 和 Dplayer ,它可以自動解析 QQ 音樂,網易雲音樂的歌曲,專輯,以及歌單,還可以解析 B 站 1080P 的視頻,還提供眾多設置選項;

使用方法非常簡單,只需要把你想嵌入的歌曲、歌單轉換成這個工具的鏈接就可以了,還有不明白的請參考官網的使用說明;

另外,它還提供了一些播放功能的選項:

option default description
id require song id / playlist id / album id / search keyword

歌曲 id / 播放列表 id / 專輯 id / 搜索關鍵字

server require music platform: neteasetencentkugoubaidu

音樂平台:neteasetencentkugoubaidu

type require songplaylistalbumsearchartist
auto options music link, support: tencent

音樂鏈接,支持:tencent

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’

循環播放的設置: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

存儲播放器設置的本地存儲密鑰

想設置這些選項也非常簡單,以下面的鏈接為例

https://simple-notion-widgets.vercel.app/music-player/index.html?server=netease&type=playlist&id=3186576487

如果我們想設置單曲循環,只需要在鏈接後面加上loop=one即可,中間需要一個連接符&,所以鏈接看起來是這樣的:

https://simple-notion-widgets.vercel.app/music-player/index.html?server=netease&type=playlist&id=3186576487&loop=one

其他的選項設置也是如法炮製即可。

給TA打賞
共{{data.count}}人
人已打賞
教程類

pr新安裝字體找不到 ,pr中文字體名字變成英文或者顯示不正確的解決辦法

2021-6-14 16:28:40

教程類

iOS不越獄屏蔽各類軟件開屏廣告(授人以漁)

2021-7-5 10:23:26

0 條回復 A文章作者 M管理員
    暫無討論,說說你的看法吧
個人中心
今日簽到
有新私信 私信列表
搜索