iOS SDK API Reference

Instance Methods | Properties | List of all members
SKWVideo Class Reference

Video view. More...

#import <SKWVideo.h>

Inheritance diagram for SKWVideo:

Instance Methods

(BOOL) - addSrc:track:
 Add media stream. More...
 
(BOOL) - removeSrc:track:
 Remove video stream. More...
 
(void) - setDidChangeVideoSizeCallback:
 Set change video size callback. More...
 
(void) - setMirrorViewing:
 Set mirror viewing. More...
 

Properties

SKWVideoScalingEnum scaling
 Scaling type.
 

Detailed Description

Video view.

CGRect rect = CGRectMake(32.0f, 32.0f, 256.0f, 256.0f);
SKWVideo* video = [[SKWVideo alloc] initWithFrame:rect];
[self.view addSubview:video];

Method Documentation

◆ addSrc:track:

- (BOOL) addSrc: (SKWMediaStream *__nonnull)  stream
track: (NSUInteger)  trackNo 

Add media stream.

SKWVideo* video = (SKWVideo *)[self.view viewWithTag:100];
[video addSrc:stream track:0];
Parameters
streamMedia stream.
trackNoMedia track number.
Returns
Result code.
Deprecated:

◆ removeSrc:track:

- (BOOL) removeSrc: (SKWMediaStream *__nonnull)  stream
track: (NSUInteger)  trackNo 

Remove video stream.

SKWVideo* video = (SKWVideo *)[self.view viewWithTag:100];
[video removeSrc:stream track:0];
Parameters
streamMedia stream.
trackNoMedia track number.
Returns
Result code.

◆ setDidChangeVideoSizeCallback:

- (void) setDidChangeVideoSizeCallback: (void(^)(CGSize))  callback

Set change video size callback.

SKWVideo* video = (SKWVideo *)[self.view viewWithTag:100];
[video setDidChangeVideoSizeCallback:^(CGSize size) {
//
}];
Parameters
callbackCallback block.

◆ setMirrorViewing:

- (void) setMirrorViewing: (BOOL)  mirror

Set mirror viewing.

Parameters
mirrorMirror viewing.
-[SKWVideo addSrc:track:]
BOOL addSrc:track:(SKWMediaStream *__nonnull stream,[track] NSUInteger trackNo)
Add media stream.
SKWMediaStream
Media stream.
Definition: SKWMediaStream.h:18
SKWVideo
Video view.
Definition: SKWVideo.h:47
-[SKWVideo setDidChangeVideoSizeCallback:]
void setDidChangeVideoSizeCallback:(void(^ __nonnull callback)(CGSize))
Set change video size callback.
-[SKWVideo removeSrc:track:]
BOOL removeSrc:track:(SKWMediaStream *__nonnull stream,[track] NSUInteger trackNo)
Remove video stream.