Skip to content

Commit

Permalink
update sdk to 3.1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
lizilong1989 committed Oct 11, 2016
1 parent 2424d30 commit 1905feb
Show file tree
Hide file tree
Showing 79 changed files with 2,531 additions and 3,071 deletions.
8 changes: 4 additions & 4 deletions HyphenateSDK/HyphenateFull-SDK/include/EMCallLocalView.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// HyphenateSDK
//
// Created by XieYajie on 2/29/16.
// Copyright © 2016 easemob.com. All rights reserved.
// Copyright © 2016 Hyphenate.io. All rights reserved.
//

#import <UIKit/UIKit.h>
Expand All @@ -13,10 +13,10 @@
/*!
* Initialization LocalView
*
* @param frame frame of localView
* @param sessionPreset output resolution,only support AVCaptureSessionPreset352x288 and AVCaptureSessionPreset640x480
* @param frame Frame of localView
* @param sessionPreset AVCaptureSession output resolution, currently support AVCaptureSessionPreset352x288 and AVCaptureSessionPreset640x480
*
* @result Get instance of LocalView
* @result Returns a LocalView instance
*/
- (instancetype)initWithFrame:(CGRect)frame withSessionPreset:(NSString*)aSessionPreset;

Expand Down
54 changes: 29 additions & 25 deletions HyphenateSDK/HyphenateFull-SDK/include/EMCallManagerDelegate.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* @header EMCallManagerDelegate.h
* @abstract This protocol defined the callbacks of real time voice/video
* @abstract This protocol defines the callbacks of voice/video calling
* @author Hyphenate
* @version 3.00
*/
Expand All @@ -19,55 +19,59 @@
@optional

/*!
* User B will receive this callback after user A dial user B
* Delegate method will be invoked when receiving a call.
* User B will receive this callback after user A dial user B.
*
* @param aSession Session instance
*/
- (void)didReceiveCallIncoming:(EMCallSession *)aSession;
- (void)callDidReceive:(EMCallSession *)aSession;

/*!
* Both user A and B will receive this callback after connection is established
* Delegate method invokes when the connection is established.
* Both user A and B will receive this callback.
*
* @param aSession Session instance
*/
- (void)didReceiveCallConnected:(EMCallSession *)aSession;
- (void)callDidConnect:(EMCallSession *)aSession;

/*!
* User A will receive this callback after user B accept A's call
* Delegate method invokes when the outgoing call is accepted by the recipient.
* User A will receive this callback after user B accept A's call.
*
* @param aSession
* @param Session instance
*/
- (void)didReceiveCallAccepted:(EMCallSession *)aSession;
- (void)callDidAccept:(EMCallSession *)aSession;

/*!
* 1.The another peer will receive this callback after user A or user B terminate the call.
* 2.Both user A and B will receive this callback after error occur.
* Delegate method invokes when the other party ends the call or some error happens.
* 1.The another party will receive this callback after user A or user B end the call.
* 2.Both user A and B will receive this callback after error occured.
*
* @param aSession Session instance
* @param aReason Terminate reason
* @param aError Error
* @param aOption The reason of ending the call
* @param aError EMError
*/
- (void)didReceiveCallTerminated:(EMCallSession *)aSession
reason:(EMCallEndReason)aReason
error:(EMError *)aError;
- (void)callDidEnd:(EMCallSession *)aSession
reason:(EMCallEndReason)aReason
error:(EMError *)aError;

/*!
* User A and B is on the call, A pause or resume the data stream, B will receive the callback
* Delegate method invokes when the other party pauses or resumes the call.
* User A and B are on the same call, A pauses or resumes the call, B will receive this callback.
*
* @param aSession Session instance
* @param aType Type
* @param aType Current call status
*/
- (void)didReceiveCallUpdated:(EMCallSession *)aSession
type:(EMCallStreamControlType)aType;
- (void)callStateDidChange:(EMCallSession *)aSession
type:(EMCallStreamingStatus)aType;

/*!
* User A and B is on the call, A network status is not stable, A will receive the callback
* Delegate method invokes when the local network status changes.
* User A and B are on the same call, A's network status changes from active to unstable or unavailable, and A will receive the callback.
*
* @param aSession Session instance
* @param aStatus Current status
* @param aStatus Current network status
*/
- (void)didReceiveCallNetworkChanged:(EMCallSession *)aSession
status:(EMCallNetworkStatus)aStatus;


- (void)callNetworkStatusDidChange:(EMCallSession *)aSession
status:(EMCallNetworkStatus)aStatus;
@end
2 changes: 1 addition & 1 deletion HyphenateSDK/HyphenateFull-SDK/include/EMCallRemoteView.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// HyphenateSDK
//
// Created by XieYajie on 2/29/16.
// Copyright © 2016 easemob.com. All rights reserved.
// Copyright © 2016 Hyphenate.io. All rights reserved.
//

#import <UIKit/UIKit.h>
Expand Down
119 changes: 62 additions & 57 deletions HyphenateSDK/HyphenateFull-SDK/include/EMCallSession.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,59 +14,59 @@
* Call session status
*/
typedef enum{
EMCallSessionStatusDisconnected = 0, /*! Disconnected */
EMCallSessionStatusRinging, /*! Callee is Ringing */
EMCallSessionStatusConnecting, /*! It's ready, wait to answer */
EMCallSessionStatusConnected, /*! Connection is established */
EMCallSessionStatusAccepted, /*! Accepted */
EMCallSessionStatusDisconnected = 0, /*! Disconnected */
EMCallSessionStatusRinging, /*! Callee is Ringing */
EMCallSessionStatusConnecting, /*! Waiting for the recipient to pickup */
EMCallSessionStatusConnected, /*! Connection is established */
EMCallSessionStatusAccepted, /*! Accepted */
}EMCallSessionStatus;

/*!
* Call type
*/
typedef enum{
EMCallTypeVoice = 0, /*! Voice call */
EMCallTypeVideo, /*! Video call */
EMCallTypeVoice = 0, /*! Voice call */
EMCallTypeVideo, /*! Video call */
}EMCallType;

/*!
* Call end reason
* Call end cause
*/
typedef enum{
EMCallEndReasonHangup = 0, /*! Another peer hang up */
EMCallEndReasonNoResponse, /*! No response */
EMCallEndReasonDecline, /*! Another peer declined the call */
EMCallEndReasonBusy, /*! User is busy */
EMCallEndReasonFailed, /*! Establish the call failed */
EMCallEndReasonHangup = 0, /*! The recipient hung up */
EMCallEndReasonNoResponse, /*! No response from recipient */
EMCallEndReasonDecline, /*! The recipient declined the call */
EMCallEndReasonBusy, /*! The recipient was busy */
EMCallEndReasonFailed, /*! Failed to establishing the connection */
}EMCallEndReason;

/*!
* Connection type of the call
* Call connection type
*/
typedef enum{
EMCallConnectTypeNone = 0, /*! None */
EMCallConnectTypeDirect, /*! Direct connect */
EMCallConnectTypeRelay, /*! Relay connect */
EMCallConnectTypeNone = 0, /*! No connection */
EMCallConnectTypeDirect, /*! Direct connection */
EMCallConnectTypeRelay, /*! Relay connection */
}EMCallConnectType;


/*!
* Stream control
* Call status
*/
typedef enum{
EMCallStreamControlTypeVoicePause = 0, /*! Pause Voice */
EMCallStreamControlTypeVoiceResume, /*! Resume Voice */
EMCallStreamControlTypeVideoPause, /*! Pause Video */
EMCallStreamControlTypeVideoResume, /*! Resume Video */
}EMCallStreamControlType;
EMCallStreamStatusVoicePause = 0, /*! Pause voice streaming */
EMCallStreamStatusVoiceResume, /*! Resume voice streaming */
EMCallStreamStatusVideoPause, /*! Pause video streaming */
EMCallStreamStatusVideoResume, /*! Resume video streaming */
}EMCallStreamingStatus;

/*!
* Network status
* Call Network status
*/
typedef enum{
EMCallNetworkStatusNormal = 0, /*! Normal */
EMCallNetworkStatusUnstable, /*! Unstable */
EMCallNetworkStatusNoData, /*! No data */
EMCallNetworkStatusNormal = 0, /*! Network Available */
EMCallNetworkStatusUnstable, /*! Network Unstable */
EMCallNetworkStatusNoData, /*! Network Unavailable */
}EMCallNetworkStatus;

/*!
Expand All @@ -86,7 +86,7 @@ typedef enum{
@property (nonatomic, strong, readonly) NSString *username;

/*!
* The other side's username
* The other party's username
*/
@property (nonatomic, strong, readonly) NSString *remoteUsername;

Expand All @@ -111,99 +111,104 @@ typedef enum{
@property (nonatomic, strong) EMCallLocalView *localVideoView;

/*!
* Remote display view
* The other party's display view
*/
@property (nonatomic, strong) EMCallRemoteView *remoteVideoView;

/*!
* Set video bit rate, must set before start the session
* Video bit rate, must be set before call session is started.
*
* Value is 150-1000, the default is 600
* Value range is 150-1000, the default is 600.
*/
@property (nonatomic) int videoBitrate;

/*!
* Get voice volume
* Get voice volume of the call
*
* @return Volume
*/
- (int)getVoiceVolume;

/*!
* Get video delay time, in milliseconds, it's real time changed
* Get video latency, in milliseconds, changing in real time
*
* @result The delay time
*/
- (int)getVideoTimedelay;
- (int)getVideoLatency;

/*!
* Get video frame rate, it's real time changed
* Get video frame rate, changing in real time
*
* @result The frame rate
* @result The video frame rate
*/
- (int)getVideoFramerate;
- (int)getVideoFrameRate;

/*!
* Get video package lost rate
*
* @result Package lost rate
* @result Video package lost rate
*/
- (int)getVideoLostcnt;
- (int)getVideoLostRateInPercent;

/*!
* Get video width, fix size, it's not real time changed
* Get video original width
*
* @result Video width
* @result Video original width
*/
- (int)getVideoWidth;

/*!
* Get video height, fix size, it's not real time changed
* Get fixed video original height
*
* @result Video height
* @result Video original height
*/
- (int)getVideoHeight;

/*!
* Get another peer's bitrate, it's real time changed
* Get the other party's bitrate, changing in real time
*
* @result Another peer's bitrate
* @result The other party's bitrate
*/
- (int)getVideoRemoteBitrate;

/*!
* Get bitrate of video call, it's real time changed
* Get bitrate of video call, changing in real time
*
* @result Bitrate of video
* @result Bitrate of video call
*/
- (int)getVideoLocalBitrate;

/*!
* Get snapshot of video
* Get a snapshot of current video screen as jpeg picture and save to the local file system.
*
* @param aFullPath Save path of picture
* @param aPath Saved path of picture
*/
- (void)takeRemotePicture:(NSString *)aFullPath;
- (void)screenCaptureToFilePath:(NSString *)aPath error:(EMError**)pError;

/*!
* Start recording video
*
* @param aPath File save path
* @param aPath File saved path
* @param aError Error
*
*/
- (BOOL)startVideoRecord:(NSString*)aPath;
- (void)startVideoRecordingToFilePath:(NSString*)aPath
error:(EMError**)aError;

/*!
* Stop recording video
*
* @result path of record file
* @param aError Error
*
*/
- (NSString *)stopVideoRecord;
- (NSString *)stopVideoRecording:(EMError**)aError;

/*!
* Use front camera or back camera,default use front
* Use front camera or back camera, default use front
*
* @param isFont Weather use front camera or not,Yes is Front,No is Back
* @param aIsFrontCamera YES for front camera, NO for back camera.
*/
- (void)setCameraBackOrFront:(BOOL)isFont;
- (void)switchCameraPosition:(BOOL)aIsFrontCamera;

@end
Loading

0 comments on commit 1905feb

Please sign in to comment.