测试版

This commit is contained in:
liuyuan
2025-03-05 15:16:45 +08:00
parent 8dbdce6d3f
commit 9accfddbe5
3849 changed files with 365801 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
//
// AVPHlsKeyGenerator.h
// AliPlayerSDK
//
//
#import <Foundation/Foundation.h>
@protocol AVPLiveKeyInfoDelegate <NSObject>
@required
/*
功能异步获取到m3u8中的URI解析出key将key相关信息回调出去如果有两个key则会回调两次
ekeyGenURL: 密文key的url
ekeyPreGenTime:在多少时间内必须要生成key这个时间可以用于打散如果time=0表示打散时间为0这个key必须要优先立即生成
*/
/***
Feature: Asynchronous key generation. Retrieve the URI from m3u8, parse the URI, generate a key, and then return the key information. If two keys are generated, two callbacks are required.
ekeyGenURL: The URL of the ciphertext key.
ekeyPreGenTime: The maximum key generation time. You can divide the time into multiple periods. If time=0, then the key must be generated immediately.
*/
-(void) onLiveKeyInfo:(NSString*)ekeyGenURL ekeyPreGenTime:(int)time userData: (NSString*)userData;
/*
功能同步通过密文key来获取到明文key
ekeyGenURL: 密文key的url
*/
/***
Feature: Synchronous key generation. Use a ciphertext key to generate a plaintext key.
ekeyGenURL: The URL of the ciphertext key.
*/
-(NSData*) onGetLiveKey:(NSString*)ekeyGenURL userData: (NSString*)userData;
@end
OBJC_EXPORT
@interface AVPLiveKeyGenerator : NSObject
+ (AVPLiveKeyGenerator *) getInstance;
@property(nonatomic,weak) id<AVPLiveKeyInfoDelegate> delegate;
@end