GithubHelp home page GithubHelp logo

seq-image-player's Introduction

license Build Status Coveralls npm NPM downloads Percentage of issues still open

序列图播放组件

⭐ 特性

  • 移动端视频播放的降级方案
  • 兼容 IPhone 低电量模式
.
├── dist 编译产出代码
├── src 源代码目录
├── test 单元测试
├── CHANGELOG.md 变更日志
└── TODO.md 计划功能

🚀 使用者指南

通过 npm 下载安装代码

$ npm install --save seq-image-player

如果你是 node 环境

const SeqImagePlayer = require('seq-image-player');
import SeqImagePlayer from 'seq-image-player';
const container = document.createElement('div');
const option = {
  imageSource: [
    'https://xxx.com/001.png',
    //...
  ],
  container,
};
new SeqImagePlayer(option);

如果你是 webpack 等环境

import SeqImagePlayer from 'seq-image-player';
const container = document.createElement('div');
const option = {
  imageSource: [
    'https://xxx.com/001.png',
    //...
  ],
  container,
};
new SeqImagePlayer(option);

如果你是 requirejs 环境

requirejs(['node_modules/seq-image-player/dist/index.aio.js'], function (SeqImagePlayer) {
  const container = document.createElement('div');
  const option = {
    imageSource: [
      'https://xxx.com/001.png',
      //...
    ],
    container,
  };
  new SeqImagePlayer(option);
});

如果你是浏览器环境

<script src="node_modules/seq-image-player/dist/index.aio.js"></script>
<script>
  const container = document.createElement('div');
  const option = {
    imageSource: [
      'https://xxx.com/001.png',
      //...
    ],
    container,
  };
  new SeqImagePlayer(option);
</script>

😘 贡献者指南

首次运行需要先安装依赖

$ npm install

一键打包生成生产代码

$ npm run build

运行单元测试:

$ npm test

使用文档:

$ npm run storybook

注意:浏览器环境需要手动测试,位于test/browser

修改 package.json 中的版本号,修改 README.md 中的版本号,修改 CHANGELOG.md,然后发布新版

$ npm run release

将新版本发布到 npm

$ npm publish

贡献者列表

contributors

⚙️ 更新日志

CHANGELOG.md

✈️ 计划列表

TODO.md

seq-image-player's People

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.