Files
soulspace/uni_modules/zy-AliyunPlayer/ios/AliyunPlayer.framework/Headers/AVPLiveKeyGenerator.h
2025-03-05 15:16:45 +08:00

45 lines
1.4 KiB
Objective-C
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
//
// 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