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

lentoid-player-2

v1.2.6

Published

lentoidplay-h265player

Downloads

17

Readme

LentoidPlayer

FLV点播TODO

  • 测试音频(打开hasAudio,搜索flv_add)
  • 保证seek速度和加载速度

功能说明

  • 支持MP4播放
  • 支持全屏或比例显示
  • 支持倍速和修改进度
  • 支持AVC硬解码、HEVC硬解码、HEVC软解码,可自动判断浏览器是否支持HEVC硬解码

安装方式

npm install

npm run build

node server.js

配置属性

| 参数 | 说明 | 类型 | | ------------------ | ------------------------------------------------ | -------------------------- | | sourceURL | 视频地址 | String | | type | 封装格式(MP4或HLS) | String | | libPath | wasm的路径 | String | | playBackRate | 播放速度 | Int | | autoPlay | 是否自动开始播放 | Boolean | | video | 页面中的video元素 | element |

事件回调

| 方法名 | 说明 | 参数 | | ---------- | ------------ | --------------------- | | load | 加载视频 | - | | play | 播放 | - | | pause | 暂停 | - | | destroy | 销毁播放器 | - | | changeSrc | 切换视频源 | url | | changeSpeed | 切换播放速度 | { value:speed } |

demo示例

<!Doctype html>
<head>
<meta http-equiv=Content-Type content="text/html;charset=utf-8">
<meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href=/favicon.ico type=image/x-icon> <title>H.265在线播放器DEMO</title>
<link rel="stylesheet" href="../dist/lentoidplay-h265.css">
<script src="../dist/lentoidplay-h265-sdk.js"></script>
<style>

  .inline {
    display: inline-block;
    width: 50px;
  }
  body {
      font-family: Arial, sans-serif;
      background-color: #f0f0f0;
      margin: 0;
      padding: 0;
  }
  h1 {
      color: #333;
      text-align: center;
  }

  .play-container {
    width: 800px;
    height: 600px;
    /* background-color: #000; */
    margin: auto; /* 设置左右边距为auto,实现水平居中 */
  } 
</style>
</head>
<body>
  <h1>H.265 Player <b>在线播放器</b><em class="demo1" id="Demo1">DEMO</em></h1>
  <span class="setleft wid80"><span class="fyhbx">*</span>视频源:</span>
  <div id="PlayerWrapper">
    <div class="play-container"></div>
    <!-- <a href="http://www.baidu.com">baidu.com</a> -->
  </div>
  <br clear="all">
  <br>
  <script>
    (function (win, doc) {
      const Config = {
        get basePath() {
          let path = win.location.origin
          let pathname = win.location.pathname
          let demoIdx = pathname.lastIndexOf('/demo/')
          return path + pathname.substr(0, demoIdx)
        },
        get buildPath() {
          return this.basePath + '/dist/'
        },
        get libPath() {
          return this.buildPath + 'lib/'
        },
        get src() {
          return this.basePath + '/history.mp4'
        }
      }
      let el = doc.querySelector('.play-container')

      const video = document.createElement('video')
      let player = new LentoidPlay(el, {
        poster: '',
        sourceURL: 'http://xxx/xxx.mp4',
        type: 'MP4',
        libPath: Config.libPath,
        playBackRate: 1,
        autoPlay: false,
        video: video
      })

      player.load()

      // player.destroy()
    })(window, document)

  </script>
</body>

</html>