新疆框架

This commit is contained in:
History
2025-06-30 09:33:34 +08:00
commit 593b22626d
1291 changed files with 107611 additions and 0 deletions
@@ -0,0 +1,25 @@
//
// CQAudioPlayManager.h
// EscortProject
//
// Created by 仁康信息 on 2023/12/5.
//
#import <Foundation/Foundation.h>
#import <AVFoundation/AVFoundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface CQAudioPlayManager : NSObject
+ (AVPlayer *)initWhithUrl:(NSURL *)avUrl;
//开始播放
+ (void)avPlayIngAction:(AVPlayer *)avPlay;
//暂停播放
+ (void)avPauseAction:(AVPlayer *)avPlay;
@end
NS_ASSUME_NONNULL_END
@@ -0,0 +1,34 @@
//
// CQAudioPlayManager.m
// EscortProject
//
// Created by 仁康信息 on 2023/12/5.
//
#import "CQAudioPlayManager.h"
@implementation CQAudioPlayManager
+ (AVPlayer *)initWhithUrl:(NSURL *)avUrl {
AVPlayerItem * item = [AVPlayerItem playerItemWithURL:avUrl];// 2.创建AVPlayerItem
AVPlayer * avTools = [AVPlayer playerWithPlayerItem:item];
avTools= [AVPlayer playerWithURL:avUrl];
return avTools;
}
//开始播放
+ (void)avPlayIngAction:(AVPlayer *)avPlay {
[avPlay play];
}
//暂停播放
+ (void)avPauseAction:(AVPlayer *)avPlay {
[avPlay pause];
}
@end