79 lines
1.3 KiB
Objective-C
79 lines
1.3 KiB
Objective-C
|
|
|
|
// Created by AI on 2025/1/20.
|
|
|
|
|
|
#import <Foundation/Foundation.h>
|
|
#import <UIKit/UIKit.h>
|
|
|
|
@class VAPView, NetImageView, XPRoomGiftAnimationParser;
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
|
@protocol MedalMediaDisplayDelegate <NSObject>
|
|
|
|
@required
|
|
|
|
- (NSString * _Nullable)getMP4UrlFromModel:(id _Nullable)model;
|
|
|
|
|
|
- (NSString * _Nullable)getPicUrlFromModel:(id _Nullable)model;
|
|
|
|
|
|
- (NetImageView *)getImageView;
|
|
|
|
|
|
- (VAPView *)getMP4View;
|
|
|
|
@optional
|
|
|
|
- (void)onMediaDisplayUpdated:(BOOL)isMP4 success:(BOOL)success;
|
|
|
|
|
|
- (UIImage * _Nullable)getDefaultPlaceholderImage;
|
|
|
|
@end
|
|
|
|
|
|
@interface MedalMediaDisplayManager : NSObject
|
|
|
|
|
|
@property (nonatomic, weak) id<MedalMediaDisplayDelegate> delegate;
|
|
|
|
|
|
@property (nonatomic, strong, nullable) id currentModel;
|
|
|
|
|
|
@property (nonatomic, assign) BOOL isVisible;
|
|
|
|
|
|
@property (nonatomic, copy, readonly, nullable) NSString *currentImagePath;
|
|
@property (nonatomic, copy, readonly, nullable) NSString *currentMP4Path;
|
|
|
|
|
|
- (instancetype)initWithDelegate:(id<MedalMediaDisplayDelegate>)delegate;
|
|
|
|
|
|
- (void)updateDisplayWithModel:(id _Nullable)model;
|
|
|
|
|
|
- (void)willDisplay;
|
|
- (void)didEndDisplaying;
|
|
|
|
|
|
- (void)stopMP4Playback;
|
|
- (void)pauseMP4Playback;
|
|
- (void)resumeMP4Playback;
|
|
|
|
|
|
- (void)cleanupResources;
|
|
|
|
|
|
- (void)handleAppDidEnterBackground;
|
|
- (void)handleAppWillEnterForeground;
|
|
- (void)handleMemoryWarning;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END |