| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- //
- // JXShortDramaCell.h
- // AICity
- //
- // Created by TogetherWatch on 2025-10-20.
- // Feature: 010-ui-ios - 短剧播放Cell
- // 对标Android: ShortDramaSuperPlayerAdapter.SuperPlayerViewHolder
- //
- #import <UIKit/UIKit.h>
- @class JXDramaContent;
- #import "JXSuperPlayer.h"
- NS_ASSUME_NONNULL_BEGIN
- /**
- * 短剧播放Cell回调协议
- */
- @protocol JXShortDramaCellDelegate <NSObject>
- @optional
- - (void)shortDramaCellDidTapLike:(UICollectionViewCell *)cell;
- - (void)shortDramaCellDidTapFavorite:(UICollectionViewCell *)cell;
- - (void)shortDramaCellDidTapComment:(UICollectionViewCell *)cell;
- - (void)shortDramaCellDidTapCollection:(UICollectionViewCell *)cell;
- - (void)shortDramaCellDidTapDetail:(UICollectionViewCell *)cell;
- - (void)shortDramaCellDidFailToPlay:(UICollectionViewCell *)cell;
- @end
- /**
- * 短剧垂直滑动播放Cell
- *
- * 功能:
- * - 集成SuperPlayer播放DRM视频
- * - 显示交互按钮(点赞、收藏、评论、合集)
- * - 显示短剧信息(标题、描述、作者)
- * - 支持手势交互
- *
- * 对标Android: ShortDramaSuperPlayerAdapter.SuperPlayerViewHolder
- */
- @interface JXShortDramaCell : UICollectionViewCell
- @property (nonatomic, weak) id<JXShortDramaCellDelegate> delegate;
- @property (nonatomic, assign, readonly) JXSuperPlayerState playerState;
- /**
- * 配置Cell数据
- */
- - (void)configureWithDrama:(JXDramaContent *)drama;
- /**
- * 播放控制
- */
- - (void)startPlay;
- - (void)stopPlay;
- - (void)pausePlay;
- - (void)resumePlay;
- /**
- * 更新交互UI
- */
- - (void)updateLikeUI:(BOOL)isLiked count:(long long)count;
- - (void)updateFavoriteUI:(BOOL)isFavorited count:(long long)count;
- - (void)updateCommentCount:(long long)count;
- /**
- * 更新点赞和收藏数量(与ViewController匹配)
- */
- - (void)updateLikeCount:(NSInteger)likeCount isLiked:(BOOL)isLiked;
- - (void)updateFavoriteCount:(NSInteger)favoriteCount isFavorited:(BOOL)isFavorited;
- /**
- * 格式化数字显示(如 1000 -> 1K)
- */
- + (NSString *)formattedCountWithCount:(long long)count;
- @end
- NS_ASSUME_NONNULL_END
|