npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

multimediajs

v1.0.2

Published

```shell npm i multimediajs -S ``` ## Quick Start ``` javascript import Video from 'multimediajs'; new Video(this.$refs.gbox).init() ```

Downloads

2

Readme

Install

npm i multimediajs -S 

Quick Start

import Video from 'multimediajs';
new Video(this.$refs.gbox).init()

Usage

dom结构自己定义 但是class必须是这些

音频

<div class="g-box" ref="gbox">
    <div class="g-player">
      <audio :src="audioUrl" class="player" volume="1">您的浏览器不支持 audio 标签</audio>
    </div>
    <div class="g-operation">
      <div class="progress-bar enlargeb">
        <span class="progress-done" />
        <span class="operation-btn enlarge switch">
          <img src="../../assets/play.png" class="play" />
          <img src="../../assets/pause.png" class="pause" />
        </span>
      </div>
      <div class="time-line">
        <span class="current-time">00:00</span>
        <span class="total-time">00:00</span>
      </div>
    </div>
  </div>


  .g-box {
    position: relative;
  }

  .player {
    width: 100%;
    position: relative;
  }

  .g-operation {
    bottom: 0;
    //position: absolute;
    width: 100%;
  }

  .time-line {
    overflow: hidden;
    margin-top: 12px;
    margin-bottom: 7px;
    font-size: 10px;
    font-family: PingFangSC-Medium, PingFang SC;
    font-weight: 500;
    color: rgba(151, 151, 151, 1);
    line-height: 14px;
    display: flex;
    justify-content: space-between;
  }

  .progress-bar {
    height: 3px;
    background: #979797;
    border-radius: 1px;
    position: relative;
  }

  .progress-done {
    background: #fff;
    border-radius: 3px;
    height: 5px;
    width: 0;
    position: absolute;
    left: 0;
    top: 50%;
    margin-top: -2.5px;
    padding: 0 2px;
  }

  .operation-btn {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 100%;
    top: 50%;
    margin-top: -10px;
    background: #fff;
    box-shadow: 0 0 5px 1px #fff;
    text-align: center;
    line-height: 20px;

    img {
      width: 8px;
      height: 8px;
    }

    .play {
      margin-left: 2px;
    }
  }

  .enlarge::after {
    content: '';
    position: absolute;
    left: -10px;
    top: -10px;
    right: -10px;
    bottom: -10px;
  }

  .enlargeb::before {
    content: '';
    position: absolute;
    left: -10px;
    top: -10px;
    right: -10px;
    bottom: -10px;
  }

  .icos {
    float: right;
  }

  .pause {
    display: none;
  }

  .vol-box {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .vol-bar {
    position: absolute;
    bottom: 30px;
    width: 6px;
    height: 50px;
    background: pink;
    display: none;
  }

  .unvol {
    display: none;
  }

  .full-screen {
    margin-left: 26px;
  }

  .vol-btn {
    position: absolute;
    width: 100%;
    height: 8px;
    background: yellow;
  }

  .iconfont {
    font-size: 26px;
    color: pink;
  }

视频

<div class="g-box" ref="gbox">
        <div class="g-player">
            <video src="http://www.170mv.com/tool/jiexi/ajax/pid/13134/vid/3242313.mp4" class="player" volume="1"></video>
            <img src="https://img2.soyoung.com/upload/20180604/3/20180604205305422.jpg" class="poster"/>
        </div>
        <div class="g-operation">
            <div class="first-line">
                <span class="switch">
                    <i class="iconfont icon-bofang play"></i>
                    <i class="iconfont icon-zanting1 pause"></i>
                </span>
               
                <div class="time">
                    <span class="current-time">00:00</span>/
                    <span class="total-time">12:00</span>
                </div>
                <div class="icos">
                    <span class="vol-box">
                        <span class="vol-bar">
                            <span class="vol-btn"></span>
                        </span>
                        <span class="switch-vol">
                            <i class="vol iconfont icon-laba"></i>
                            <i class="unvol iconfont icon-jingyin"></i>
                        </span>
                        
                    </span>
                    
                    <i class="full-screen iconfont icon-fangda"></i>
                </div>
                
            </div>
            <div class="progress-bar">
                <span class="operation-btn"></span>
            </div>
        </div>
    </div>

    .g-box{
        position: relative;
        margin-bottom:50px;
    }
    .player{
        width:100%;
        position: relative;
    }
    .poster{
        position: absolute;
        width:100%;
        
        top:0;
    }
    .g-operation{
        bottom:0px;
        position: absolute;
        width:100%;
        background: rgba(0,0,0,.5)
    }
    .first-line{
       overflow: hidden;
       
    }
    .progress-bar{
       height:15px;
       background: #ffffff82;
       position: relative;
    }
    .operation-btn{
       position: absolute;
        width:15px;
        height:100%;
        top:0;
        background:pink;
    }
    .time{
        display: inline-block;
        color:#fff
    }
    .icos{
        float:right
    }
    .pause{
        display: none;
    }
    .vol-box{
        position: absolute;
        display: flex;
    justify-content: center;
    align-items: center;
    }
    .vol-bar{
        position: absolute;
        bottom: 30px;
        width:6px;
        height:50px;
        background: pink;
        display: none;
    }
    .unvol{
        display: none;
    }
    .full-screen{
        margin-left: 26px;
    }
    .vol-btn{
        position: absolute;
        width:100%;
        height:8px;
        background: yellow
    }
    .iconfont{
        font-size: 26px;
        color:pink
    }

| prop | desc | type | default | other | example | ------ | ------ | ------ | ------ | ------ | ------ | | | | | "" | 可传 |