Giter Site home page Giter Site logo

spvideoplayer's Issues

怎么监听当前是否是全屏模式?

创建是这样创建的

  • (SPVideoPlayerView *)playerView {
    if (!_playerView) {
    _playerView = [[SPVideoPlayerView alloc] init];

      // 这一步非常重要,这一步相当于设置了控制层和视频模型,如果控制层传nil,则默认自带的的控制层
      [_playerView configureControlView:nil videoItem:self.videoItem];
      // 如果有多个视频需要播放,如电视剧有很多集,则用这个方法
      //[_playerView configureControlView:nil videoItems:self.videoItems];
      
      // 设置代理
      _playerView.delegate = self;
      
      // 打开下载功能(默认没有这个功能)
      _playerView.hasDownload    = NO;
      
      // 打开预览图,默认是打开的
      _playerView.requirePreviewView = NO;
    

    }
    return _playerView;
    }

static UIView *buttonView = nil;这行代码有问题

static UIView *buttonView = nil;这行代码有问题,
static声明的变量 直到程序退出才会回收内存,这就会导致一个bug,切换清晰度之后,重新进入播放器,切换清晰度,buttonView高亮状态的按钮有两个。
这里改成SPVideoPlayerControlView控制的全局变量会更好一些

横竖屏切换的问题

在视频没有加载出来之前. 显示即将播放. 我横屏之后. 再点击返回按钮,变如图. 有几次视频播放的时候也出现这种情况.
simulator screen shot - iphone 6s plus - 2017-11-17 at 22 55 31

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.