Play Desktop Sharing And Movie File Streams
playScreen
- A brief description - Play screen sharing
This interface is specifically used for playing the screen sharing stream shared by users. When receiving the callback: - (void)onShareScreenState(String peerId, int state, Map attrs), it indicates that a user has published screen sharing, and you can call this interface to play it.
- Interface Name
- (int)playScreen(String peerId, Object view);
- Parameters
Parameter Name | Required | Type | Description |
---|---|---|---|
peerID | Yes | string | User ID |
view | Yes | Object | The window for rendering video |
- Method Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
|
-Return Value Description
Type | Description |
---|---|
int | 0: Indicates successful invocation; Non-zero: Indicates invocation failure |
unPlayScreen
- A brief description - Stop playing screen sharing
This interface is specifically used to stop playing the screen sharing stream shared by users
- Interface Name
1 2 3 4 5 6 7 |
|
- Return Value Description
Type | Description |
---|---|
int | 0: Indicates successful invocation; Non-zero: Indicates invocation failure |
playFile
- A brief description - Play the movie file shared by the user
This interface is specifically used for playing the movie file stream shared by users. When receiving the callback: - (void)onShareFileState(String peerId, int state, Map attrs), it indicates that a user has published a shared movie, and you can call this interface to play it
- Interface Name
- (int)playFile(String peerId, Object view);
- Parameters
Parameter Name | Required | Type | Description |
---|---|---|---|
peerID | Yes | string | User ID |
view | Yes | Object | Render video window |
- Method Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
|
-Return Value Description
Type | Description |
---|---|
int | 0: Indicates successful invocation; Non-zero: Indicates invocation failure |
unPlayFile
- A brief description - Stop playing the movie file shared by the user
This interface is specifically used to stop playing the movie file stream shared by users
- Interface Name
- (int)unPlayFile(String peerId);
- Parameters
Parameter Name | Required | Type | Description |
---|---|---|---|
peerID | Yes | String | User ID |
- Method Example
TKRoomManager.getInstance().unPlayFile(peerId);
-Return Value Description
Type | Description |
---|---|
int | 0: Indicates successful invocation; Non-zero: Indicates invocation failure |