PortSIP VoIP SDK Manual for iOS  16.2
PortSIP features our newest, supported, quality-assured VoIP SDK used by Several hundred companies around the world for easy VoIP application develop and quality-assured code.
Functions
Play audio and video files to remote party

Functions

(int) - PortSIPSDK::playVideoFileToRemote:aviFile:loop:playAudio:
 Play an AVI file to remote party. More...
 
(int) - PortSIPSDK::stopPlayVideoFileToRemote:
 Stop playing video file to remote party. More...
 
(int) - PortSIPSDK::playAudioFileToRemote:filename:fileSamplesPerSec:loop:
 Play a wave file to remote party. More...
 
(int) - PortSIPSDK::stopPlayAudioFileToRemote:
 Stop playing wave file to remote party. More...
 
(int) - PortSIPSDK::playAudioFileToRemoteAsBackground:filename:fileSamplesPerSec:
 Play a wave file to remote party as conversation background sound. More...
 
(int) - PortSIPSDK::stopPlayAudioFileToRemoteAsBackground:
 Stop playing a wave file to remote party as conversation background sound. More...
 
(void) - PortSIPSDK::audioPlayLoopbackTest:
 Used for the loop back testing against audio device. More...
 

Detailed Description

Function Documentation

◆ playVideoFileToRemote:aviFile:loop:playAudio:()

- (int) playVideoFileToRemote: (long)  sessionId
aviFile: (NSString *)  aviFile
loop: (BOOL)  loop
playAudio: (BOOL)  playAudio 

Play an AVI file to remote party.

Parameters
sessionIdSession ID of the call.
aviFileThe full filepath, such as "/test.avi".
loopSet to false to stop playing video file when it is ended, or true to play it repeatedly.
playAudioIf it is set to true, audio and video will be played together, or false with video played only.
Returns
If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

◆ stopPlayVideoFileToRemote:()

- (int) stopPlayVideoFileToRemote: (long)  sessionId

Stop playing video file to remote party.

Parameters
sessionIdSession ID of the call.
Returns
If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

◆ playAudioFileToRemote:filename:fileSamplesPerSec:loop:()

- (int) playAudioFileToRemote: (long)  sessionId
filename: (NSString *)  filename
fileSamplesPerSec: (int)  fileSamplesPerSec
loop: (BOOL)  loop 

Play a wave file to remote party.

Parameters
sessionIdSession ID of the call.
filenameThe full filepath, such as "/test.wav".
fileSamplesPerSecThe sample wave file in seconds. It should be 8000, 16000 or 32000.
loopSet to false to stop playing audio file when it is ended, or true to play it repeatedly.
Returns
If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

◆ stopPlayAudioFileToRemote:()

- (int) stopPlayAudioFileToRemote: (long)  sessionId

Stop playing wave file to remote party.

Parameters
sessionIdSession ID of the call.
Returns
If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

◆ playAudioFileToRemoteAsBackground:filename:fileSamplesPerSec:()

- (int) playAudioFileToRemoteAsBackground: (long)  sessionId
filename: (NSString *)  filename
fileSamplesPerSec: (int)  fileSamplesPerSec 

Play a wave file to remote party as conversation background sound.

Parameters
sessionIdSession ID of the call.
filenameThe full filepath, such as "/test.wav".
fileSamplesPerSecThe sample wave file in seconds. It should be 8000, 16000 or 32000.
Returns
If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

◆ stopPlayAudioFileToRemoteAsBackground:()

- (int) stopPlayAudioFileToRemoteAsBackground: (long)  sessionId

Stop playing a wave file to remote party as conversation background sound.

Parameters
sessionIdSession ID of the call.
Returns
If the function succeeds, it will return value 0. If the function fails, it will return a specific error code.

◆ audioPlayLoopbackTest:()

- (void) audioPlayLoopbackTest: (BOOL)  enable

Used for the loop back testing against audio device.

Parameters
enableSet to true to start audio look back test, or false to stop.