@4rk/video-lib 中文文档教程

发布于 6年前 浏览 25 项目主页 更新于 3年前

VideoLib

HTML 视频播放的辅助方法。

该库可帮助您解决在实现自定义 HTML5 视频播放器时出现的问题。 特别是,它有辅助方法:

  • Use movingimage with HLS as source, with fallback for non-HLS-compatible browsers
  • Apply custom CSS style to subtitles
  • Emulating object-fit: cover; with Internet Explorer support
  • Waiting for a video to become ready

请查看每个方法的 JSDoc 以获取更多信息。

Tricks

  • Some browsers do not accept <track kind="subtitles"> to be mode="hidden". Use kind="metadata" instead.

Creating a release

需要完成某些步骤才能创建新版本:

  1. Decide on a semver version number
  2. Start a new release using git flow release start [version number]
  3. Update the package.json version
  4. Run yarn run release
  5. Commit changes: git commit -a -m "Prepare release [version number]"
  6. Finish release using git flow release finish
  7. Push all changes: git push origin --all && git push origin --tags

License

请参阅 LICENSE

VideoLib

Helper methods for HTML video playback.

This library helps you on problems occuring when implementing custom HTML5 video players. In particular, it has helper methods to:

  • Use movingimage with HLS as source, with fallback for non-HLS-compatible browsers
  • Apply custom CSS style to subtitles
  • Emulating object-fit: cover; with Internet Explorer support
  • Waiting for a video to become ready

Please take a look at the JSDoc of each method for further information.

Tricks

  • Some browsers do not accept <track kind="subtitles"> to be mode="hidden". Use kind="metadata" instead.

Creating a release

Certain steps need to be done in order to create a new release:

  1. Decide on a semver version number
  2. Start a new release using git flow release start [version number]
  3. Update the package.json version
  4. Run yarn run release
  5. Commit changes: git commit -a -m "Prepare release [version number]"
  6. Finish release using git flow release finish
  7. Push all changes: git push origin --all && git push origin --tags

License

See LICENSE

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文