PLVPPTWebview

Deprecated

已废弃,请使用PLVWebViewBridge


@interface PLVPPTWebview

PPT视图

Note

直播,添加至相应视图中即可; 回放,添加至相应视图中,并调用 [pptStart] 方法即可;
// 直播场景 代码演示
// 1.创建及加载
PLVPPTWebview * pptWebiew = [[PLVPPTWebview alloc] init];
[someView addSubview:pptWebiew];
pptWebiew.frame = someView.bounds;
[pptWebiew loadOnlinePPT];

// 2. socket 登录成功后设置用户信息
pptWebiew.userInfo = userInfo;

// 3. 接收到 socket PPT事件则执行刷新
[pptWebiew refreshPPT:json];

配置属性

  • Deprecated

    已废弃,请使用PLVWebViewBridge

    delegate

    Declaration

    Objective-C

    @property (nonatomic, weak) id<PLVPPTWebviewDelegate> _Nullable delegate;
  • Deprecated

    已废弃,请使用PLVWebViewBridge

    直播场景,在 socket 登录成功后,需将用户信息同步至 PPT视图

    Declaration

    Objective-C

    @property (nonatomic, strong) NSDictionary *_Nonnull userInfo;

高级配置属性

  • Deprecated

    已废弃,请使用PLVWebViewBridge

    jsbridge delegate

    Note

    当需要接收 webview 回调事件时,可设置此 jsDelegate

    Declaration

    Objective-C

    @property (nonatomic, weak) id _Nullable jsDelegate;
  • Deprecated

    已废弃,请使用PLVWebViewBridge

    是否自定义‘加载指示器’ (YES:内置加载指示器将不显示 NO:内置加载指示器将显示;默认 NO)

    Note

    需同时设置 jsDelegate,以接收对应的回调。回调介绍,具体请参考

    Declaration

    Objective-C

    @property (nonatomic) BOOL customActivityIndicator;
  • Deprecated

    已废弃,请使用PLVWebViewBridge

    调试模式 (YES:打印调试信息 NO:不打印调试信息;默认 NO)

    Declaration

    Objective-C

    @property (nonatomic) BOOL jsDebugMode;

页面加载

  • Deprecated

    已废弃,请使用PLVWebViewBridge

    加载在线 互动页面

    Declaration

    Objective-C

    - (void)loadOnlinePPT;
  • Deprecated

    已废弃,请使用PLVWebViewBridge

    加载本地 互动页面

    Declaration

    Objective-C

    - (void)loadLocalPPTWithHTMLString:(nonnull NSString *)htmlString
                               baseURL:(nonnull NSURL *)baseURL;

    Parameters

    htmlString

    本地 html 解析后内容

    baseURL

    可访问的文件夹路径 (注意是 file:// 开头的 URL)

  • 加载本地 html 文件

    Note

    该方法要求 iOS9 以上;对本地文件读取的兼容性更好

    Declaration

    Objective-C

    - (void)loadLocalPPTWithFileURL:(nonnull NSURL *)URL
            allowingReadAccessToURL:(nonnull NSURL *)readAccessURL;

    Parameters

    URL

    html 本地文件路径 (注意是 file:// 开头的 URL)

    readAccessURL

    可访问的文件夹路径 (注意是 file:// 开头的 URL)

直播场景相关方法

  • Deprecated

    已废弃,请使用PLVWebViewBridge

    刷新PPT内容

    Declaration

    Objective-C

    - (void)refreshPPT:(nonnull NSString *)json;

    Parameters

    json

    PPT内容

  • Deprecated

    已废弃,请使用PLVWebViewBridge

    刷新PPT内容

    Declaration

    Objective-C

    - (void)refreshPPT:(nonnull NSString *)json delay:(NSUInteger)delay;

    Parameters

    json

    PPT内容

    delay

    延迟时间 (单位毫秒)

  • Deprecated

    已废弃,请使用PLVWebViewBridge

    设置视频SEI信息

    Declaration

    Objective-C

    - (void)setSEIData:(nonnull NSString *)json;

    Parameters

    json

    SEI信息

双向画笔相关方法

  • Deprecated

    已废弃,请使用PLVWebViewBridge

    设置画笔相关权限

    Declaration

    Objective-C

    - (void)setPaintPermission:(BOOL)paint controlPPTPermission:(BOOL)control;

    Parameters

    paint

    画笔权限 (YES:允许使用 NO:禁用)

    control

    操作ppt权限 (YES:允许使用 NO:禁用)

  • Deprecated

    已废弃,请使用PLVWebViewBridge

    设置画板可绘制状态

    Declaration

    Objective-C

    - (void)setPaintStatus:(nonnull NSString *)status;

    Parameters

    status

    可绘制状态 (close:关闭画笔 open:开启画笔)

  • Deprecated

    已废弃,请使用PLVWebViewBridge

    设置画笔颜色

    Declaration

    Objective-C

    - (void)setBrushColor:(nonnull NSString *)color;

    Parameters

    color

    画笔颜色色值字符串

  • Deprecated

    已废弃,请使用PLVWebViewBridge

    开启画笔删除状态

    Declaration

    Objective-C

    - (void)toDelete;

回放场景相关方法

  • Deprecated

    已废弃,请使用PLVWebViewBridge

    加载回放PPT

    Declaration

    Objective-C

    - (void)pptStart:(nonnull NSString *)vid;

    Parameters

    vid

    回放视频的vid

  • Deprecated

    已废弃,请使用PLVWebViewBridge

    【观看回放时】加载回放PPT

    Declaration

    Objective-C

    - (void)pptStartWithVideoId:(nonnull NSString *)videoId
                      channelId:(nonnull NSString *)channelId;

    Parameters

    videoId

    回放视频的videoId(请求'直播回放视频的信息‘接口返回的视频Id,与后台回放列表看到的vid不是同一个数据)

    channelId

    频道Id

  • Deprecated

    已废弃,请使用PLVWebViewBridge

    【观看暂存时】加载暂存PPT

    Declaration

    Objective-C

    - (void)pptStartWithFileId:(nonnull NSString *)fileId
                     channelId:(nonnull NSString *)channelId;

    Parameters

    fileId

    暂存视频的fileId

    channelId

    频道Id

  • Deprecated

    已废弃,请使用PLVWebViewBridge

    PPT 恢复播放

    Declaration

    Objective-C

    - (void)pptPlay:(long)currentTime;

    Parameters

    currentTime

    当前播放时间点

  • Deprecated

    已废弃,请使用PLVWebViewBridge

    PPT 暂停播放

    Declaration

    Objective-C

    - (void)pptPause:(long)currentTime;

    Parameters

    currentTime

    当前播放时间点

  • Deprecated

    已废弃,请使用PLVWebViewBridge

    PPT 跳至某个播放点

    Declaration

    Objective-C

    - (void)pptSeek:(long)toTime;

    Parameters

    toTime

    需要跳至的播放时间点