metowolf / MetingJS

:cake: A powerful plugin connect APlayer and Meting
https://i-meto.com/about/
MIT License
1.17k stars 158 forks source link

请问如何用js的方式来调用 #77

Open vioa opened 1 year ago

vioa commented 1 year ago

比如aplayer可以这样

const ap = new APlayer({
    container: document.getElementById('aplayer'),
    audio: [{
        name: 'HLS',
        artist: 'artist',
        url: 'url.m3u8',
        cover: 'cover.jpg',
        type: 'hls'
    }]
});

meetjs应该如何用js直接调用呢

    server="netease"
    type="playlist"
    id="60198">
//这个怎么用js写,因为系统内的博客,无法改html只能用js注入
ScarletDor commented 1 year ago

请问解决了么,我也卡这个了

wangyang0210 commented 1 year ago

动态引入对应的cdn资源后,然后通过append去插入元素; https://github.com/wangyang0210/cnblogs-theme/blob/v2/src/components/footer/footer.js