How to load files through the whiteboard?
Problem Description
After integrating both Interactive Whiteboard SDK and File Sharing SDK, how to load shared files through Interactive Whiteboard?
Solution
In actual use, users often need to use whiteboards and files together. Here we introduce two common scenarios:
1. Users actively create whiteboards with files
For usage guidelines on this part, please refer to:
- iOS: Collaborative Use of Interactive Whiteboard and File Sharing
- Android: Collaborative Use of Interactive Whiteboard and File Sharing
2. Developers receive notifications of newly added file whiteboards (onWhiteboardAdd)
At this time, you can load files according to the following steps:
a. When receiving a newly added whiteboard from the remote end, get the fileID needed to load the file from the fileInfo field in the whiteboardModel parameter of whiteboardView.
b. Create ZegoDocsView and display ZegoDocsView on the interface.
c. Call the loadFile interface of ZegoDocsView to load the file.
d. After the file is loaded successfully, adjust the layout of whiteboardView according to the actual content layout of the file.
For specific implementation methods, please refer to Sample Demo
