Git Product home page Git Product logo

hyplayerdemo's Introduction

HYPlayerDemo

本地|网络 音视频播放器

HYPlayer实现功能:

  • 画中画功能
  • 屏幕滑动调节进度、亮度、音量
  • 倍速播放
  • 竖播视频适配
  • 全屏状态画面(自适应、铺满)调节
  • 在wifi条件下自动缓存
  • 断点续播功能
  • 自定义播放结束页面及音频播放界面
  • 视频加密
  • 修改自定义结束页面
  • 长按加速

附加实现:

  • 主动 缓存|清除 网络视频

调用方法:

let videoView = HYPlayerCommonView(播放器父视图) videoView?.updateCurrentPlayer(playerConfig: HYPlayerCommonConfig(title: "标题", videoUrl: "视频地址"))

在controller的viewWillDisappear中调用 videoView.dealToDisappear()以销毁播放器

播放器配置(HYPlayerCommonConfig):

  • title: 播放音视频标题(全屏时显示),可不传
  • videoUrl: 播放视频地址(不传则播放音频)
  • audioUrl: 播放音频地址
  • needCache: 是否需要缓存(默认不开启)
  • playContinue: 是否断点续播(默认开启)
  • placeHoldImg: 封面图(可传本地图片String或网络图片URL)
  • customEndView: 自定义播放结束界面(可不传)
  • customAudioView: 自定义音频播放界面(可不传)
  • authenticationFunc: 播放地址鉴权函数(可不传)

hyplayerdemo's People

Contributors

ishye avatar

Watchers

 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.