Play desktop sharing and movie file streams
playScreen
- Brief description
Play screen sharing
A dedicated interface for playing the screen-sharing stream shared by users. When receiving the callback: -(void)roomManagerOnShareScreenState:(NSString *)peerId state:(TKMediaState)state, it indicates that a user has published a screen-sharing stream, and you can call this interface to play it.
- Interface name
1 2 3 4 |
|
- Parameter
Parameter Name | Required | Type | Description |
---|---|---|---|
peerID | Yes | NSString | User ID |
renderType | Yes | TKRenderMode | Rendering Mode |
window | Yes | UIView | Rendering window for the video |
attributes | Yes | NSDictionary | Additional parameters, such as file ID, file name, etc |
completion | No | completion_block | Callback for completion of the call |
- Method Example
1 2 3 4 5 6 |
|
- Return Value Description
Type | Description |
---|---|
int | 0: Indicates that the call was successful. Non-zero: Indicates that the call failed |
unPlayScreen
- Brief description
Stop playing the screen sharing
A dedicated interface for stopping the playback of the screen-sharing stream shared by users
- Interface name
- (int)unPlayScreen:(NSString *)peerID completion:(completion_block _Nullable)completion;
- Parameter
Parameter Name | Required | Type | Description |
---|---|---|---|
peerID | Yes | NSString | User ID |
completion | No | completion_block | Callback for completion of the call |
- Method Example
[_roomMgr unPlayScreen:@"adc123456" completion:nil];
- Return Value Description
Type | Description |
---|---|
int | 0: Indicates that the call was successful. Non-zero: Indicates that the call failed |
playFile
- Brief description
Play the movie file shared by the user
A dedicated interface for playing the movie file stream shared by users. When receiving the callback: -(void)roomManagerOnShareFileState:(NSString )peerId state:(TKMediaState)state extensionMessage:(NSDictionary )message; it indicates that a user has published a shared movie, and you can call this interface to play it.
- Interface name
1 2 3 4 |
|
- Parameter
Parameter Name | Required | Type | Description |
---|---|---|---|
peerID | Yes | NSString | User ID |
renderType | Yes | TKRenderMode | Rendering Mode |
window | Yes | UIView | Rendering video window |
completion | No | completion_block | Callback for completion of the call |
- Method Example
1 2 3 4 5 6 |
|
- Return Value Description
Type | Description |
---|---|
int | 0: Indicates that the call was successful. Non-zero: Indicates that the call failed |
unPlayFile
- Brief description
Stop playing the movie file shared by the use
A dedicated interface for stopping the playback of the movie file stream shared by users
- Interface name
- (int)unPlayFile:(NSString *)peerID completion:(completion_block _Nullable)completion;
- Parameter
Parameter Name | Required | Type | Description |
---|---|---|---|
peerID | Yes | NSString | User ID |
completion | No | completion_block | Callback for completion of the call |
- Method Example
[_roomMgr unPlayFile:@"adc123456" completion:nil];
- Return Value Description
Type | Description |
---|---|
int | 0: Indicates that the call was successful. Non-zero: Indicates that the call failed |
Notes
For more return error codes, please refer to the error code descriptions in TKRoomErrorCode