Giter Site home page Giter Site logo

wechatshortvideo's Issues

iPhone 4s (iOS7.1.2)上崩溃了

RT:
Demo在iPhone 4s(iOS7.1.2系统)上崩溃了
----------------------Crash-Log-----------------------
2015-09-25 09:56:43.777 WechatShortVideoDemo[501:60b] *** Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan nan]'
*** First throw call stack:
(0x2f75ef83 0x39f0fccf 0x2f75eec5 0x31bf16a3 0x31bf15a7 0x2c5685 0x31fd4941 0x92b63 0x9283d 0x31f7bd59 0x31bf962b 0x31bf4e3b 0x31bf4ccd 0x31bf46df 0x31bf44ef 0x31bee21d 0x2f72a255 0x2f727bf9 0x2f727f3b 0x2f692ebf 0x2f692ca3 0x34598663 0x31fdf14d 0xc4bbd 0x3a41cab7)
libc++abi.dylib: terminating with uncaught exception of type NSException

一直按住“按住拍”按钮,会出现两个SCVideoPlayerView

在我一直按钮“按住拍”按钮,并达到最大时长时,会创建两个SCVideoPlayerView。我查了一下原因。因为执行了两次[self cancelCaptureWithSaveFlag:YES]方法。

第一次出现:因为设置了最大拍摄时间 ,所以在达到最大时长时会触发- (void)recorder:(SCRecorder *__nonnull)recorder didCompleteSession:(SCRecordSession *__nonnull)session这个方法,方法中创建了一个SCVideoPlayerView并播放Video。

第二次出现:因为第一次创建(也就是执行- (void)recorder:(SCRecorder *__nonnull)recorder didCompleteSession:(SCRecordSession *__nonnull)session 方法)时,没有对“按住拍”按钮的状态做处理。所以导致执行了一次 - (IBAction)captureStartTouchUpInside:(UIButton *)captureBtn 方法,这里又创建了一个SCVideoPlayerView。

我是这里修改的

- (IBAction)captureStartTouchUpInside:(UIButton *)captureBtn {

    //confirm capture
    [self hideMiddleTipView];

   if ([_scanPreviewView viewWithTag:400]) {
        return;
    } 
    if (captureValidFlag) {
        //preview and save video
        [self cancelCaptureWithSaveFlag:YES];
    } else {
        [self cancelCaptureWithSaveFlag:NO];
        [self showCaptureBtn];
    }
}

多加了一个[[_scanPreviewView viewWithTag:400]]是否存在的判断,我不知道修改那个属性能最优处理这个问题,望作者修改一下。

按住拍没有响应

你好,我下载了你的源码,运行demo的时候没有问题,加到我项目时就出现这个问题,按住拍没有响应,也不出现向上取消的提示,聚焦有.
我的xcode是7.0,设备是ios8.4

你好,打扰~

我看到SCRecorder最近更新在16天前,解决了iOS8的适配问题,你能替换为最新的库文件吗?
我很想用你的这个库,如果有时间还是更新下吧,多谢~

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.