Socket
Socket
Sign inDemoInstall

@vuepress-reco/vuepress-plugin-bgm-player

Package Overview
Dependencies
0
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @vuepress-reco/vuepress-plugin-bgm-player

bgm player plugin for vuepress themes


Version published
Weekly downloads
20
increased by17.65%
Maintainers
2
Install size
113 kB
Created
Weekly downloads
 

Readme

Source

@vuepress-reco/vuepress-plugin-bgm-player

demo.png

Details

Bgm player plugin for vuepress-theme-reco or other vuepress theme.
Vuepress 音乐播放器插件

使用位置
plugin name@vuepress-reco/vuepress-plugin-bgm-player
component nameBgMusic(自动出现在页面中,无需添加额外代码)

Options

以下为插件注入时的参数。

Attributes

参数说明类型默认值可选值
audios播放列表Array-
position播放器位置Object{ left: '10px', bottom: '10px', 'z-index': '999999'}-
autoplay是否自动播放Booleanfalsetrue/false
autoShrink是否自动缩小Booleanfalsetrue/false
shrinkMode指定PC端缩小为哪种模式String'float''mini'/'float'
floatPosition指定浮窗模式浮动在哪一侧String'left''left'/'right'
floatStyle浮窗的样式Object{ bottom: '200px', 'z-index': '999999' }-

audios示例

  • audios为播放列表的对象数组
  • 无默认值必须配置
  • 示例
    audios: [
      // 本地文件示例
      {
        name: '장가갈 수 있을까',
        artist: '咖啡少年',
        url: '/bgm/1.mp3',
        cover: '/bgm/1.jpg'
      },
      // 网络文件示例
      {
        name: '강남역 4번 출구',
        artist: 'Plastic / Fallin` Dild',
        url: 'https://assets.smallsunnyfox.com/music/2.mp3',
        cover: 'https://assets.smallsunnyfox.com/music/2.jpg'
      },
      {
        name: '用胳膊当枕头',
        artist: '최낙타',
        url: 'https://assets.smallsunnyfox.com/music/3.mp3',
        cover: 'https://assets.smallsunnyfox.com/music/3.jpg'
      }
    ]  
    

shrinkMode说明

  • PC端可以通过shrinkMode来指定正常模式缩小时缩小为哪种模式
  • 移动端默认缩小为浮窗模式

About

  • 兼容性:vuepress-plugin-bgm-player是使用HTML5的Audio开发,故兼容性与Audio的兼容性相关
  • 对于 vuepress-theme-recodark 模式的适配
    dark.png
  • 开发计划
    • 移动端适配问题修复

Keywords

FAQs

Last updated on 09 Sep 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc