All Projects → shaojiankui → Jkscreenrecorder

shaojiankui / Jkscreenrecorder

Licence: mit
JKScreenRecorder(屏幕录制),use RPScreenRecorder of ReplayKit.framework supports iOS9 and later, use AVAssetWriter of AVFoundation.framework supports iOS8

Projects that are alternatives of or similar to Jkscreenrecorder

WWDC17
WWDC 2017 Scholarship Submission by Phil Zet (Philipp Zakharchenko)
Stars: ✭ 14 (-56.25%)
Mutual labels:  avfoundation
iphonepip
PiP (Picture in Picture) prototype for iPhone
Stars: ✭ 15 (-53.12%)
Mutual labels:  avfoundation
Swiftscan
A barcode and qr code scanner( 二维码/条形码扫描、生成,仿微信、支付宝)
Stars: ✭ 293 (+815.63%)
Mutual labels:  avfoundation
podcatcher
Podcast App
Stars: ✭ 21 (-34.37%)
Mutual labels:  avfoundation
Starling
Simple low-latency audio library for iOS + macOS
Stars: ✭ 38 (+18.75%)
Mutual labels:  avfoundation
Light-Shallow
iOS 采集,录制,实时滤镜,存储相册,视频编辑,音视频合成
Stars: ✭ 30 (-6.25%)
Mutual labels:  avfoundation
AUHost
Application which hosts AudioUnits v3 using AVFoundation API
Stars: ✭ 104 (+225%)
Mutual labels:  avfoundation
Ios tips
iOS的一些示例,持续更新中:1、AVFoundation 高仿微信相机拍摄和编辑 2、AVFoundation 人脸检测、实时滤镜、音视频编解码、GPUImage框架的使用等音视频相关内容 3、OpenGLES 4、LeetCode算法练习 5、iOS Crash防护和APM监控 6、WKWebView相关的内容 等........
Stars: ✭ 896 (+2700%)
Mutual labels:  avfoundation
AutoVideoPlayer
Easily Play/Pause videos in any UIView subclass especially UITableViewCell subclass
Stars: ✭ 88 (+175%)
Mutual labels:  avfoundation
Baraba
Make your UIScrollView scroll automatically when user is looking 👀 by tracking face using ARKit and AVFoundation
Stars: ✭ 268 (+737.5%)
Mutual labels:  avfoundation
Soundable
Soundable allows you to play sounds, single and in sequence, in a very easy way
Stars: ✭ 88 (+175%)
Mutual labels:  avfoundation
RecPlayer-iOS
A simple iOS application that records audio and plays it back. (+some animations)
Stars: ✭ 21 (-34.37%)
Mutual labels:  avfoundation
MCamera
CameraViewController which allows to take photos, set filters, peform image blurring and more.
Stars: ✭ 28 (-12.5%)
Mutual labels:  avfoundation
VITimelineView
VITimelineView can represent any time base things. Made with fully customizable & extendable.
Stars: ✭ 51 (+59.38%)
Mutual labels:  avfoundation
Lbxscan
A barcode and qr code scanner (二维码、扫码、扫一扫、ZXing、ZBar、iOS系统AVFoundation扫码封装,扫码界面效果封装)
Stars: ✭ 3,133 (+9690.63%)
Mutual labels:  avfoundation
AVPlayerItemHomeOutput
Coordinate the output of content associated with your HomeKit lightbulbs. #Ambilight
Stars: ✭ 38 (+18.75%)
Mutual labels:  avfoundation
NKJMovieComposer
NKJMovieComposer is very simple movie composer for iOS.
Stars: ✭ 40 (+25%)
Mutual labels:  avfoundation
Kaudiorecorder
İOS Audio Record & Play Helper Class 🔊
Stars: ✭ 22 (-31.25%)
Mutual labels:  avfoundation
Wavideobox
秒级! 三行代码实现iOS视频压缩、变速、混音、合并、GIF水印、旋转、换音、裁剪 ! 支持不同分辩率,支持你能想到的各种混合操作! 扩展性强...更多功能不断增加中... iOS 8.0 + 有需要的功能或错误欢迎issue,笔者会及时更新
Stars: ✭ 707 (+2109.38%)
Mutual labels:  avfoundation
Aural Player
An audio player for macOS, inspired by Winamp for Windows.
Stars: ✭ 256 (+700%)
Mutual labels:  avfoundation

JKScreenRecorder

JKScreenRecorder(屏幕录制),use RPScreenRecorder of ReplayKit.framework supports iOS9 and later, use AVAssetWriter of AVFoundation.framework supports iOS8

应用内屏幕录制功能,iOS9之后使用原生ReplayKit进行录制,iOS8及以后使用截图方式保存视频.

使用方法

开始录制

- (IBAction)startTouched:(id)sender {
    _sreenRecorder = [[JKScreenRecorder alloc]init];
    //不区分系统版本 直接使用截图合成视频
    //[_sreenRecorder startRecordingWithCapture];
    //根据不同版本的系统SDK 使用不同的API 两种开始方法调用一种即可
    [_sreenRecorder startRecordingWithHandler:^(NSError *error) {
        
    }];
    [_sreenRecorder screenRecording:^(NSTimeInterval duration) {
        self.timeLabel.text  = [@(duration) stringValue];
    }];
}

结束录制

- (IBAction)stopTouched:(id)sender {
    [_sreenRecorder stopRecordingWithHandler:^(UIViewController *previewViewController, NSString *videoPath, NSError *error) {
        
        //videoPath非空为使用低版本截图方式保存视频 previewViewController为MPMoviePlayerViewController的实例
        if (videoPath) {
            MPMoviePlayerViewController *p = (MPMoviePlayerViewController*)previewViewController;
            [p.moviePlayer prepareToPlay];
            [p.moviePlayer play];
            [self presentMoviePlayerViewControllerAnimated:p];
//            存入相册 注意要在info.plist中增加 Privacy - Photo Library Usage Description
//            ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init];
//            [library writeVideoAtPathToSavedPhotosAlbum:[NSURL fileURLWithPath:videoPath]
//                                        completionBlock:^(NSURL *assetURL, NSError *error) {
//                                            if (error) {
//                                                NSLog(@"Save video fail:%@",error);
//                                            } else {
//                                                NSLog(@"Save video succeed.");
//                                            }
//                                        }];
        }else{
             //videoPath空为使用ReplayKit.framework方式录制视频 previewViewController为RPPreviewViewController的实例
            [self presentViewController:previewViewController animated:YES completion:^{
                
            }];
        }
            
    }];
}

效果

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].