#import <TCMPPSDK/TCMPPSDK.h>@interface MIniAppDemoSDKDelegateImpl : NSObject <TMFMiniAppSDKDelegate>@end
- (id<TMAVideoPlayerDelegate>)app:(TMFMiniAppInfo *_Nonnull)app createVideoViewWithFrame:(CGRect)frame andVideoParams:(NSDictionary *)params;
@property (nonatomic, strong) NSString *tmaVideoPlayerCurrentURL; // Playback URL/*tmaVideoPlayerHostVC is used to record the VC where the video player is located, usually a WebView, to perform related operations when entering or exiting full screen. You only need to add @synthesize tmaVideoPlayerHostVC; in your custom player.No other operations are required.*/@property(nonatomic, weak) UIViewController<TMAVideoViewFullScreenProtocol> *tmaVideoPlayerHostVC;// Cover image URL@property(nonatomic, strong) NSString *tmaVideoPlayerPosterUrl;// Specify the initial playback position@property(nonatomic, assign) CGFloat tmaVideoPlayerInitialTime;// Whether to show control buttons@property(nonatomic, assign) BOOL tmaVideoPlayerShowControls;// Whether to repeat playback@property(nonatomic, assign) BOOL tmaVideoPlayerRepeat;// Whether to mute@property(nonatomic, assign) BOOL tmaVideoPlayerIsMuted;// Whether to show the center play button@property(nonatomic, assign) BOOL tmaVideoPlayerShowCenterPlayButton;// Control videoGravity, contentsGravity, and poster's contentMode with three values: contain, fill, cover@property(nonatomic, strong) NSString *tmaVideoPlayerObjectFitMode;// Full screen orientation with three values: 0 UIInterfaceOrientationPortrait, 90 UIInterfaceOrientationLandscapeRight, -90 UIInterfaceOrientationLandscapeLeft@property(nonatomic, strong) NSNumber *tmaVideoPlayerFullscreenDirection;// Whether to support double-tap to pause/play@property(nonatomic, assign) BOOL tmaVideoPlayerEnablePlayGesture;// The title in the top left corner in full-screen mode@property(nonatomic, strong) NSString *tmaVideoPlayerFullscreenTitle;// Whether to show the progress bar@property(nonatomic, assign) BOOL tmaVideoPlayerShowProgress;// Whether to show the full screen button@property(nonatomic, assign) BOOL tmaVideoPlayerShowFullscreenBtn;// Whether to show the play button in the bottom control bar@property(nonatomic, assign) BOOL tmaVideoPlayerShowPlayBtn;// Whether to show the mute button@property(nonatomic, assign) BOOL tmaVideoPlayerShowMuteButton;// Whether to support progress adjustment gestures@property(nonatomic, assign) BOOL tmaVideoPlayerEnableProgressGesture;// Whether to enable volume and brightness adjustment gestures when not in full screen@property(nonatomic, assign) BOOL tmaVideoPlayerPageGestureWhenNotFullscreen;@property(nonatomic, strong) NSArray *tmaVideoPlayerDanmuList;// Whether to autoplay@property(nonatomic, assign) BOOL tmaVideoPlayerAutoPlay;// Whether to allow background playback@property(nonatomic, assign) BOOL tmaVideoPlayerBackgroundPlayback;// Whether to enable picture-in-picture@property(nonatomic, assign) BOOL tmaVideoPlayerIsPictureInPicture;// Records whether it is in full-screen mode@property(nonatomic, assign) BOOL tmaVideoPlayerIsFullScreen;// Whether to automatically rotate when entering full screen@property(nonatomic, assign) BOOL tmaVideoPlayerEnableAutoRotation;/*Used to send player events to the mini program*/@property(nonatomic, strong) void(^ _Nullable tmaVideoPlayerStatusBlock)(MAVideoPlayerStatus status, NSDictionary * _Nullable params);// Play- (void)tmaVideoPlayerPlay;// Pause- (void)tmaVideoPlayerPause;// Stop- (void)tmaVideoPlayerStop;// Adjust the playback progress- (void)tmaVideoPlayerSeekDuration:(CGFloat)duration;// Playback rate- (void)tmaVideoPlayerPlayBackRate:(CGFloat)rate;// Enter full screen- (void)tmaVideoPlayerEnterFullScreen;// Exit full screen- (void)tmaVideoPlayerExitFullScreen;// Whether to show the system status bar in full screen- (void)tmaVideoPlayerShowStatusBar:(BOOL)show;// Insert on-screen comment- (void)tmaVideoPlayerInsertDanmuText:(NSString *_Nonnull)content color:(NSString *_Nonnull)colorStr;// Interrupt playback- (void)tmaVideoPlayerInterruptPlay;// Resume playback- (void)tmaVideoPlayerResumePlay;// Pause when the page disappears- (void)tmaVideoPlayerPauseWhenDiappear;// Play when the page resumes- (void)tmaVideoPlayerPlayWhenAppear;// Whether to support background playback- (void)tmaVideoPlayerRequestBackgroundPlayback:(BOOL)state;
Feedback