Android(Java)[v1.7.5.0]
|
RtcWhiteboard 接口类对应用程序提供了所有的白板相关方法。 更多...
类 | |
interface | Callback |
PANO白板引擎回调接口。 更多... | |
Public 成员函数 | |
QResult | setCallback (Callback callback) |
设置白板回调函数,用以接收白板事件消息 | |
QResult | setRoleType (WBRoleType role) |
设置白板角色类型。 更多... | |
QResult | open (RtcWbView view) |
QResult | open (PanoCoursePageView view) |
打开白板。 更多... | |
QResult | close () |
关闭白板。 更多... | |
QResult | leave () |
离开白板 更多... | |
QResult | stop () |
停止白板 更多... | |
QResult | importFrom (String filename) |
导入dump文件到白板 更多... | |
QResult | exportTo (String filename) |
导出白板到文件 更多... | |
String | getCurrentWhiteboardId () |
获取当前白板Id 更多... | |
WBToolType | getToolType () |
获取工具类型 更多... | |
int | getCurrentPageNumber () |
获取当前白板页码 更多... | |
int | getTotalNumberOfPages () |
获取总白板页码数 更多... | |
float | getCurrentScaleFactor () |
获取当前白板视图的缩放比例 更多... | |
QResult | setCurrentScaleFactor (float scale) |
设置当前白板视图的缩放比例 更多... | |
float | getCurrentMinScaleFactor () |
获取当前白板视图的最小缩放比例 更多... | |
float | getCurrentMaxScaleFactor () |
获取当前白板视图的最大缩放比例 更多... | |
QResult | setBackgroundImage (String imageUrl) |
设置白板背景图片 更多... | |
QResult | setBackgroundImage (String imageUrl, int pageNo) |
设置白板指定页背景图片 更多... | |
QResult | setBackgroundImageScalingMode (WBImageScalingMode mode) |
设置白板背景图缩放模式 更多... | |
QResult | setToolType (WBToolType type) |
设置工具类型 更多... | |
RtcWbView | getAttachedRtcWbView () |
获取绑定的RtcWbView 更多... | |
PanoCoursePageView | getAttachedCoursePageView () |
获取绑定的PanoCoursePageView 更多... | |
QResult | setLineWidth (int size) |
设置线宽 更多... | |
QResult | setFillType (WBFillType type) |
设置填充类型 更多... | |
QResult | setFillColor (int color) |
设置填充颜色。 更多... | |
QResult | setFillColor (float r, float g, float b, float a) |
设置填充颜色 更多... | |
QResult | setForegroundColor (int color) |
设置白板前景色。 更多... | |
QResult | setForegroundColor (float r, float g, float b, float a) |
设置白板前景色。 更多... | |
QResult | setBackgroundColor (int color) |
设置白板背景色。 更多... | |
QResult | setBackgroundColor (float r, float g, float b, float a) |
设置白板背景色。 更多... | |
QResult | setFontStyle (WBFontStyle style) |
设置字体样式 更多... | |
QResult | setFontSize (int size) |
设置字体大小 更多... | |
QResult | addStamp (WBStamp stamp) |
添加图章资源 更多... | |
QResult | setStamp (String stampId) |
设置图章资源 更多... | |
QResult | undo () |
撤消上一次操作 更多... | |
QResult | redo () |
重做白板的上一次被撤销操作 更多... | |
QResult | addPage (boolean autoSwitch) |
添加一个新页面到最后 更多... | |
QResult | insertPage (int pageNo, boolean autoSwitch) |
添加一个新页面到 pageNo 之后 更多... | |
QResult | removePage (int pageNo) |
删除页 pageNo 更多... | |
QResult | removePage (int pageNo, boolean switchNext) |
删除页 pageNo 更多... | |
QResult | gotoPage (int pageNo) |
切换到页 pageNo 更多... | |
QResult | nextPage () |
切换到下一页 更多... | |
QResult | prevPage () |
切换到前一页 更多... | |
QResult | nextStep () |
执行H5文件下一步 更多... | |
QResult | prevStep () |
执行H5文件上一步 更多... | |
QResult | addImageFile (String imageUrl) |
添加图片到当前白板页 更多... | |
QResult | addAudioFile (String mediaUrl) |
添加音频媒体文件到当前白板页 更多... | |
QResult | addVideoFile (String mediaUrl) |
添加视频媒体文件到当前白板页 更多... | |
String | addBackgroundImages (List< String > urls) |
添加指定数量的背景图到当前白板文件 更多... | |
String | addH5File (String url, String downloadUrl) |
添加H5文件URL到当前白板文件作为背景 更多... | |
String | addDoc (WBDocContents contents) |
添加新的白板文件 更多... | |
String | addDoc (WBDocExtHtml contents) |
使用外部Html添加新的白板文件 更多... | |
String | addDoc (WBDocExtContents contents) |
基于外部内容添加新的白板文件 更多... | |
String | createDoc (List< String > imageUrls) |
导入指定数量的背景图并创建新的白板文件 更多... | |
String | createDoc (String filePath) |
上传本地需转码的文件并创建新的白板文件 更多... | |
String | createDoc (String filePath, WBDocConvertConfig param) |
上传本地需转码的文件并创建新的白板文件 更多... | |
QResult | deleteDoc (String fileId) |
删除白板文件 更多... | |
QResult | switchDoc (String fileId) |
切换白板文件 更多... | |
QResult | saveDocToImages (String fileId, String outputDir) |
保存白板文件为多张图片。每个白板页存为一张图 图像名称格式为whiteboard_[fileId]_[page number].png, 例如:whiteboard_default_1.png 更多... | |
List< String > | enumerateFiles () |
枚举白板文件 更多... | |
String | getCurrentFileId () |
获取当前白板文件ID 更多... | |
WBDocInfo | getFileInfo (String fileId) |
获取指定白板文件ID的白板文件信息 更多... | |
QResult | sendMessageToExternalHtml (String fileId, String msg) |
发送自定义消息到外部HTML页面 更多... | |
QResult | clearContents (boolean curPage, WBClearType type) |
清除白板内容,需要 ADMIN 角色才可调用成功 更多... | |
QResult | clearUserContents (long userId, boolean curPage, WBClearType type) |
清除指定用户的白板内容 更多... | |
QResult | clearDocContents (String fileId, WBClearType type) |
清除指定白板文件的内容 更多... | |
QResult | snapshot (WBSnapshotMode mode, String outputDir) |
保存白板内容到图像。 更多... | |
QResult | initVision (WBVisionConfig config) |
设置白板初始大小 更多... | |
QResult | resetVision () |
重置当前页视角 更多... | |
QResult | startShareVision () |
开始共享视角 更多... | |
QResult | stopShareVision () |
结束共享视角 更多... | |
QResult | startFollowVision () |
开始跟随视角 更多... | |
QResult | stopFollowVision () |
结束跟随视角 更多... | |
QResult | syncVision () |
同步当前页视角 更多... | |
QResult | sendMessage (long userId, byte[] msg) |
发送消息给某个指定用户。 更多... | |
QResult | broadcastMessage (byte[] msg) |
广播消息给所有用户。 更多... | |
QResult | setFileCachePath (String path) |
白板文件缓存路径 更多... | |
QResult | enableUIResponse (boolean enable) |
是否启用白板响应UI事件。默认启用 更多... | |
QResult | enableShowDraws (boolean enable) |
显示或隐藏白板涂鸦。默认显示 更多... | |
QResult | enableScaleMove (boolean enable) |
允许白板画布缩放和移动手势。默认打开 更多... | |
QResult | enableAutoSelected (boolean enable) |
设置图片或音视频对象默认选中状态。默认打开 更多... | |
QResult | enableCursorPosSync (boolean enable) |
设置是否同步光标或画笔位置。默认关闭 更多... | |
QResult | enableShowRemoteCursor (boolean enable) |
设置是否显示远端光标或画笔。默认关闭 更多... | |
RtcWhiteboard 接口类对应用程序提供了所有的白板相关方法。
RtcWhiteboard 对象可以通过 RtcEngine 实例获取。
QResult com.pano.rtc.api.RtcWhiteboard.addAudioFile | ( | String | mediaUrl | ) |
添加音频媒体文件到当前白板页
mediaUrl | 媒体 URL,可为本地路径或远程 URL |
String com.pano.rtc.api.RtcWhiteboard.addBackgroundImages | ( | List< String > | urls | ) |
添加指定数量的背景图到当前白板文件
urls | 背景图url数组(仅支持远程URL) |
String com.pano.rtc.api.RtcWhiteboard.addDoc | ( | WBDocContents | contents | ) |
添加新的白板文件
contents | 根据转码结果指定的白板文件内容 |
String com.pano.rtc.api.RtcWhiteboard.addDoc | ( | WBDocExtContents | contents | ) |
基于外部内容添加新的白板文件
contents | 外部白板文件内容 |
String com.pano.rtc.api.RtcWhiteboard.addDoc | ( | WBDocExtHtml | contents | ) |
使用外部Html添加新的白板文件
contents | 外部Html的白板文件内容 |
String com.pano.rtc.api.RtcWhiteboard.addH5File | ( | String | url, |
String | downloadUrl | ||
) |
添加H5文件URL到当前白板文件作为背景
url | 网络URL(仅支持远程URL) |
downloadUrl | H5文件的下载URL, 所有文件需要打包为zip文件 |
QResult com.pano.rtc.api.RtcWhiteboard.addImageFile | ( | String | imageUrl | ) |
添加图片到当前白板页
imageUrl | 图像 URL,可为本地路径或远程 URL |
QResult com.pano.rtc.api.RtcWhiteboard.addPage | ( | boolean | autoSwitch | ) |
添加一个新页面到最后
autoSwitch | 自动切换到新添加的页面 |
添加图章资源
stamp | 图章资源 |
QResult com.pano.rtc.api.RtcWhiteboard.addVideoFile | ( | String | mediaUrl | ) |
添加视频媒体文件到当前白板页
mediaUrl | 媒体 URL,可为本地路径或远程 URL |
QResult com.pano.rtc.api.RtcWhiteboard.broadcastMessage | ( | byte[] | msg | ) |
广播消息给所有用户。
msg | 要广播的消息,最大为 16KB |
QResult com.pano.rtc.api.RtcWhiteboard.clearContents | ( | boolean | curPage, |
WBClearType | type | ||
) |
清除白板内容,需要 ADMIN 角色才可调用成功
curPage | true: 只清除当前页内容;false: 清除所有页内容 |
type | WBClearType 枚举类型 |
QResult com.pano.rtc.api.RtcWhiteboard.clearDocContents | ( | String | fileId, |
WBClearType | type | ||
) |
清除指定白板文件的内容
fileId | 白板文件ID |
type | WBClearType 枚举类型 |
QResult com.pano.rtc.api.RtcWhiteboard.clearUserContents | ( | long | userId, |
boolean | curPage, | ||
WBClearType | type | ||
) |
清除指定用户的白板内容
userId | 用户ID |
curPage | true: 只清除当前页内容;false: 清除所有页内容 |
type | WBClearType 枚举类型 |
QResult com.pano.rtc.api.RtcWhiteboard.close | ( | ) |
关闭白板。
String com.pano.rtc.api.RtcWhiteboard.createDoc | ( | List< String > | imageUrls | ) |
导入指定数量的背景图并创建新的白板文件
imageUrls | 背景图url数组(仅支持远程URL) |
String com.pano.rtc.api.RtcWhiteboard.createDoc | ( | String | filePath | ) |
上传本地需转码的文件并创建新的白板文件
filePath | 本地文件路径 |
String com.pano.rtc.api.RtcWhiteboard.createDoc | ( | String | filePath, |
WBDocConvertConfig | param | ||
) |
上传本地需转码的文件并创建新的白板文件
filePath | 本地文件路径 |
param | 转码参数 |
QResult com.pano.rtc.api.RtcWhiteboard.deleteDoc | ( | String | fileId | ) |
删除白板文件
fileId | 白板文件ID |
QResult com.pano.rtc.api.RtcWhiteboard.enableAutoSelected | ( | boolean | enable | ) |
设置图片或音视频对象默认选中状态。默认打开
enable | 是否打开. |
QResult com.pano.rtc.api.RtcWhiteboard.enableCursorPosSync | ( | boolean | enable | ) |
设置是否同步光标或画笔位置。默认关闭
enable | 是否打开. |
QResult com.pano.rtc.api.RtcWhiteboard.enableScaleMove | ( | boolean | enable | ) |
允许白板画布缩放和移动手势。默认打开
enable | 是否打开. |
QResult com.pano.rtc.api.RtcWhiteboard.enableShowDraws | ( | boolean | enable | ) |
显示或隐藏白板涂鸦。默认显示
enable | 是否显示. |
QResult com.pano.rtc.api.RtcWhiteboard.enableShowRemoteCursor | ( | boolean | enable | ) |
设置是否显示远端光标或画笔。默认关闭
enable | 是否打开. |
QResult com.pano.rtc.api.RtcWhiteboard.enableUIResponse | ( | boolean | enable | ) |
是否启用白板响应UI事件。默认启用
enable | 是否启用. |
List< String > com.pano.rtc.api.RtcWhiteboard.enumerateFiles | ( | ) |
枚举白板文件
QResult com.pano.rtc.api.RtcWhiteboard.exportTo | ( | String | filename | ) |
导出白板到文件
filename | 导出文件 |
PanoCoursePageView com.pano.rtc.api.RtcWhiteboard.getAttachedCoursePageView | ( | ) |
获取绑定的PanoCoursePageView
RtcWbView com.pano.rtc.api.RtcWhiteboard.getAttachedRtcWbView | ( | ) |
获取绑定的RtcWbView
String com.pano.rtc.api.RtcWhiteboard.getCurrentFileId | ( | ) |
获取当前白板文件ID
float com.pano.rtc.api.RtcWhiteboard.getCurrentMaxScaleFactor | ( | ) |
获取当前白板视图的最大缩放比例
float com.pano.rtc.api.RtcWhiteboard.getCurrentMinScaleFactor | ( | ) |
获取当前白板视图的最小缩放比例
int com.pano.rtc.api.RtcWhiteboard.getCurrentPageNumber | ( | ) |
获取当前白板页码
float com.pano.rtc.api.RtcWhiteboard.getCurrentScaleFactor | ( | ) |
获取当前白板视图的缩放比例
String com.pano.rtc.api.RtcWhiteboard.getCurrentWhiteboardId | ( | ) |
获取当前白板Id
WBDocInfo com.pano.rtc.api.RtcWhiteboard.getFileInfo | ( | String | fileId | ) |
获取指定白板文件ID的白板文件信息
fileId | 白板文件ID |
WBToolType com.pano.rtc.api.RtcWhiteboard.getToolType | ( | ) |
获取工具类型
int com.pano.rtc.api.RtcWhiteboard.getTotalNumberOfPages | ( | ) |
获取总白板页码数
QResult com.pano.rtc.api.RtcWhiteboard.gotoPage | ( | int | pageNo | ) |
切换到页 pageNo
pageNo | 页码 |
QResult com.pano.rtc.api.RtcWhiteboard.importFrom | ( | String | filename | ) |
导入dump文件到白板
filename | 导入文件 |
QResult com.pano.rtc.api.RtcWhiteboard.initVision | ( | WBVisionConfig | config | ) |
设置白板初始大小
QResult com.pano.rtc.api.RtcWhiteboard.insertPage | ( | int | pageNo, |
boolean | autoSwitch | ||
) |
添加一个新页面到 pageNo 之后
pageNo | 页码 |
autoSwitch | 自动切换到新添加的页面 |
QResult com.pano.rtc.api.RtcWhiteboard.leave | ( | ) |
离开白板
QResult com.pano.rtc.api.RtcWhiteboard.nextPage | ( | ) |
切换到下一页
QResult com.pano.rtc.api.RtcWhiteboard.nextStep | ( | ) |
执行H5文件下一步
QResult com.pano.rtc.api.RtcWhiteboard.open | ( | PanoCoursePageView | view | ) |
打开白板。
view | 客户提供的白板显示视图。 |
QResult com.pano.rtc.api.RtcWhiteboard.prevPage | ( | ) |
切换到前一页
QResult com.pano.rtc.api.RtcWhiteboard.prevStep | ( | ) |
执行H5文件上一步
QResult com.pano.rtc.api.RtcWhiteboard.redo | ( | ) |
重做白板的上一次被撤销操作
QResult com.pano.rtc.api.RtcWhiteboard.removePage | ( | int | pageNo | ) |
删除页 pageNo
pageNo | 被删除的页码 |
QResult com.pano.rtc.api.RtcWhiteboard.removePage | ( | int | pageNo, |
boolean | switchNext | ||
) |
删除页 pageNo
pageNo | 被删除的页码 |
switchNext | 切换到删除页的下一页. |
QResult com.pano.rtc.api.RtcWhiteboard.resetVision | ( | ) |
重置当前页视角
QResult com.pano.rtc.api.RtcWhiteboard.saveDocToImages | ( | String | fileId, |
String | outputDir | ||
) |
保存白板文件为多张图片。每个白板页存为一张图 图像名称格式为whiteboard_[fileId]_[page number].png, 例如:whiteboard_default_1.png
fileId | 白板文件ID |
outputDir | 输出路径 |
QResult com.pano.rtc.api.RtcWhiteboard.sendMessage | ( | long | userId, |
byte[] | msg | ||
) |
发送消息给某个指定用户。
userId | 用户 ID。 |
msg | 要发送的消息,最大为 16KB |
QResult com.pano.rtc.api.RtcWhiteboard.sendMessageToExternalHtml | ( | String | fileId, |
String | msg | ||
) |
发送自定义消息到外部HTML页面
fileId | 白板文件ID |
msg | 自定义消息 |
QResult com.pano.rtc.api.RtcWhiteboard.setBackgroundColor | ( | float | r, |
float | g, | ||
float | b, | ||
float | a | ||
) |
设置白板背景色。
r | g b a 背景颜色值。有效值范围:[0, 1]。 |
QResult com.pano.rtc.api.RtcWhiteboard.setBackgroundColor | ( | int | color | ) |
设置白板背景色。
color | 背景颜色值。 |
QResult com.pano.rtc.api.RtcWhiteboard.setBackgroundImage | ( | String | imageUrl | ) |
设置白板背景图片
imageUrl | 背景图 URL,可为本地路径或远程 URL |
QResult com.pano.rtc.api.RtcWhiteboard.setBackgroundImage | ( | String | imageUrl, |
int | pageNo | ||
) |
设置白板指定页背景图片
imageUrl | 背景图 URL,可为本地路径或远程 URL |
pageNo | 白板页码 |
QResult com.pano.rtc.api.RtcWhiteboard.setBackgroundImageScalingMode | ( | WBImageScalingMode | mode | ) |
设置白板背景图缩放模式
mode | 背景图缩放模式 |
QResult com.pano.rtc.api.RtcWhiteboard.setCurrentScaleFactor | ( | float | scale | ) |
设置当前白板视图的缩放比例
scale | 缩放比例值。有效值范围 [0.1, 5.0] |
QResult com.pano.rtc.api.RtcWhiteboard.setFileCachePath | ( | String | path | ) |
白板文件缓存路径
path | 缓存路径 |
QResult com.pano.rtc.api.RtcWhiteboard.setFillColor | ( | float | r, |
float | g, | ||
float | b, | ||
float | a | ||
) |
设置填充颜色
r | g b a 填充颜色值。有效值范围:[0, 1]。 |
QResult com.pano.rtc.api.RtcWhiteboard.setFillColor | ( | int | color | ) |
设置填充颜色。
color | 填充颜色值。 |
QResult com.pano.rtc.api.RtcWhiteboard.setFillType | ( | WBFillType | type | ) |
设置填充类型
type | 填充类型 |
QResult com.pano.rtc.api.RtcWhiteboard.setFontSize | ( | int | size | ) |
设置字体大小
size | 字体大小,有效值范围:[10, 96],默认值:16。 |
QResult com.pano.rtc.api.RtcWhiteboard.setFontStyle | ( | WBFontStyle | style | ) |
设置字体样式
style | 字体样式 |
QResult com.pano.rtc.api.RtcWhiteboard.setForegroundColor | ( | float | r, |
float | g, | ||
float | b, | ||
float | a | ||
) |
设置白板前景色。
r | g b a 前景颜色值。有效值范围:[0, 1]。 |
QResult com.pano.rtc.api.RtcWhiteboard.setForegroundColor | ( | int | color | ) |
设置白板前景色。
color | 前景颜色值。 |
QResult com.pano.rtc.api.RtcWhiteboard.setLineWidth | ( | int | size | ) |
设置线宽
size | 线宽,有效值范围:[1, 20],默认值:1。 |
QResult com.pano.rtc.api.RtcWhiteboard.setRoleType | ( | WBRoleType | role | ) |
设置白板角色类型。
role | 白板角色。 |
QResult com.pano.rtc.api.RtcWhiteboard.setStamp | ( | String | stampId | ) |
设置图章资源
stampId | 图章资源ID |
QResult com.pano.rtc.api.RtcWhiteboard.setToolType | ( | WBToolType | type | ) |
设置工具类型
type | 工具类型 |
QResult com.pano.rtc.api.RtcWhiteboard.snapshot | ( | WBSnapshotMode | mode, |
String | outputDir | ||
) |
保存白板内容到图像。
mode | 快照模式 |
outputDir | 输出路径 |
QResult com.pano.rtc.api.RtcWhiteboard.startFollowVision | ( | ) |
开始跟随视角
QResult com.pano.rtc.api.RtcWhiteboard.startShareVision | ( | ) |
开始共享视角
QResult com.pano.rtc.api.RtcWhiteboard.stop | ( | ) |
停止白板
QResult com.pano.rtc.api.RtcWhiteboard.stopFollowVision | ( | ) |
结束跟随视角
QResult com.pano.rtc.api.RtcWhiteboard.stopShareVision | ( | ) |
结束共享视角
QResult com.pano.rtc.api.RtcWhiteboard.switchDoc | ( | String | fileId | ) |
切换白板文件
fileId | 白板文件ID |
QResult com.pano.rtc.api.RtcWhiteboard.syncVision | ( | ) |
同步当前页视角
QResult com.pano.rtc.api.RtcWhiteboard.undo | ( | ) |
撤消上一次操作