Giter Club home page Giter Club logo

skvideomanager's Introduction

SKVideoManager

自定义的一个以AVFoundation框架类为基础的视频管理者

A video manager with SKVideoCapture and SKVideoPlayer. The 2 tools just support APIs, UI is not supported.

包含一个拍摄和一个播放的工具,工具只提供API处理视频的各类事件,不提供UI,使用者可以自由的定制UI。此工具提供了Block回调,一次性提供所有需要的时机,只需要在Block中处理逻辑即可。

##Demo Screen shoot Demo截图

图片1 图片2 图片3

##SKVideoCapture 摄录工具默认抓去960x540尺寸的视频,相当于拍摄的视频宽度不变,高度以16:9的比例截取中间部分得到的视频。

capture a video with default size 960x540.

###USE 使用

#import "SKVideoCapture.h"

capture = [SKVideoCapture videoCaptureWithPreviewLayerView:recordView videoGravity:AVLayerVideoGravityResizeAspect];

[capture videoCaptureDidStartRecording:^{
        NSLog(@"——————startRecording");
    } finishRecording:^{
        NSLog(@"——————endRecording");
    } recordingFailed:^{
        NSLog(@"——————recordingFailed");
    }];
    
    // destory
    [capture destroy];
    capture = nil;
    

更多细节请查看.m文件,APIs请查看.h了解

more details check SKVideoCapture.h/.m file

##SKVideoPlayer 视频播放工具

a video player

###USE

#import "SKVideoPlayer.h"

player = [SKVideoPlayer videoPlayerWithView:recordView videoURL:outputURL];

[player videoPlayerDidReadyToPlay:^(BOOL loadVideoSucceed, float duration, NSString *durationFormatStr) {
        NSLog(@"----loadVideoSucceed:%d----duration:%.2f---Str:%@", loadVideoSucceed, duration, durationFormatStr);
    } play:^{
        NSLog(@"----play----");
    } pause:^{
        NSLog(@"----pause----");
    } playbackBufferEmpty:^{
        NSLog(@"----playbackBufferEmpty----");
    } playbackLikelyToKeepUp:^{
        NSLog(@"----playbackLikelyToKeepUp----");
    } bufferingProgress:^(float totoalBuffer) {
        NSLog(@"----bufferingProgress----totalBuffer:%.2f", totoalBuffer);
    } playProgress:^(float currentTime, float duration) {
        NSLog(@"----playProgress----currentTime:%.2f----duration:%.2f", currentTime, duration);
    } playDidEnd:^{
        NSLog(@"----playDidEnd----");
    }];
    
    // destory
    [player destroy];
    player = nil;
    

更多细节请查看.m文件,APIs请查看.h了解

more details check SKVideoCapture.h/.m file

##issue 如发现BUG或者有新需求,请告知我,谢谢!

Any bugs please issue me ! 3KS !

skvideomanager's People

Contributors

acoderbear avatar

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.