【2025年1月2日】关于腾讯云小程序平台更名为腾讯云超级应用服务的公告
控制台更新动态
Android SDK 更新动态
iOS SDK 更新动态
Flutter 更新动态
IDE 更新动态
基础库更新动态
#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; //播放地址/*tmaVideoPlayerHostVC 用于记录 videoPlayer 所在的 VC,通常是 WebView,以在进入、退出全屏时进行相关操作,你只需要在你的customPlayer中加上 @synthesize tmaVideoPlayerHostVC;不需要进行其他操作.*/@property(nonatomic, weak) UIViewController<TMAVideoViewFullScreenProtocol> *tmaVideoPlayerHostVC;// 封面地址@property(nonatomic, strong) NSString *tmaVideoPlayerPosterUrl;// 指定视频初始播放位置@property(nonatomic, assign) CGFloat tmaVideoPlayerInitialTime;// 是否显示控制按钮@property(nonatomic, assign) BOOL tmaVideoPlayerShowControls;// 是否重复播放@property(nonatomic, assign) BOOL tmaVideoPlayerRepeat;// 是否静音@property(nonatomic, assign) BOOL tmaVideoPlayerIsMuted;// 是否显示中间播放按钮@property(nonatomic, assign) BOOL tmaVideoPlayerShowCenterPlayButton;// 控制 videoGravity、contentsGravity 和 poster 的 contentMode 有三种值:contain、fill、cover@property(nonatomic, strong) NSString *tmaVideoPlayerObjectFitMode;// 全屏方向 有三种值:0 UIInterfaceOrientationPortrait, 90 UIInterfaceOrientationLandscapeRight, -90 UIInterfaceOrientationLandscapeLeft@property(nonatomic, strong) NSNumber *tmaVideoPlayerFullscreenDirection;// 是否支持双击暂停/播放@property(nonatomic, assign) BOOL tmaVideoPlayerEnablePlayGesture;// 全屏时左上角的标题@property(nonatomic, strong) NSString *tmaVideoPlayerFullscreenTitle;// 是否显示进度条@property(nonatomic, assign) BOOL tmaVideoPlayerShowProgress;// 是否显示全屏按钮@property(nonatomic, assign) BOOL tmaVideoPlayerShowFullscreenBtn;// 是否显示底部控制栏的播放按钮@property(nonatomic, assign) BOOL tmaVideoPlayerShowPlayBtn;// 是否显示静音按钮@property(nonatomic, assign) BOOL tmaVideoPlayerShowMuteButton;// 是否支持进度调整手势@property(nonatomic, assign) BOOL tmaVideoPlayerEnableProgressGesture;// 非全屏是否开启音量、亮度调节手势@property(nonatomic, assign) BOOL tmaVideoPlayerPageGestureWhenNotFullscreen;@property(nonatomic, strong) NSArray *tmaVideoPlayerDanmuList;// 是否自动播放@property(nonatomic, assign) BOOL tmaVideoPlayerAutoPlay;// 是否允许后台播放@property(nonatomic, assign) BOOL tmaVideoPlayerBackgroundPlayback;// 是否开启画中画@property(nonatomic, assign) BOOL tmaVideoPlayerIsPictureInPicture;// 记录是否是全屏状态@property(nonatomic, assign) BOOL tmaVideoPlayerIsFullScreen;// 是否自动转屏进入全屏@property(nonatomic, assign) BOOL tmaVideoPlayerEnableAutoRotation;/*用于向小程序端发送播放器事件*/@property(nonatomic, strong) void(^ _Nullable tmaVideoPlayerStatusBlock)(MAVideoPlayerStatus status, NSDictionary * _Nullable params);// 播放- (void)tmaVideoPlayerPlay;// 暂停- (void)tmaVideoPlayerPause;// 停止- (void)tmaVideoPlayerStop;// 调整播放进度- (void)tmaVideoPlayerSeekDuration:(CGFloat)duration;// 播放速率- (void)tmaVideoPlayerPlayBackRate:(CGFloat)rate;// 进入全屏- (void)tmaVideoPlayerEnterFullScreen;// 退出全屏- (void)tmaVideoPlayerExitFullScreen;// 全屏时是否显示系统状态栏- (void)tmaVideoPlayerShowStatusBar:(BOOL)show;// 插入弹幕- (void)tmaVideoPlayerInsertDanmuText:(NSString *_Nonnull)content color:(NSString *_Nonnull)colorStr;// 打断播放- (void)tmaVideoPlayerInterruptPlay;// 恢复播放- (void)tmaVideoPlayerResumePlay;// 页面消失时的暂停- (void)tmaVideoPlayerPauseWhenDiappear;// 页面恢复时的播放- (void)tmaVideoPlayerPlayWhenAppear;// 是否支持后台播放- (void)tmaVideoPlayerRequestBackgroundPlayback:(BOOL)state;
文档反馈