Controls if process termination signal handling is enabled or not
configureLogging
Control if phenix logging is enabled
streamingSourceMapping
Allows partial override of streaming source URIs
Stream Source Mapping
Optional field that can be provided with PhenixPCastInitializeOptions. It only has an effect on the subscriber side, and only for streams with the "streaming" capability (on both publisher and subscriber side). The property allows you to redirect requests from the SDKs player to your own CDN.
The authentication token generated using the Phenix EdgeAuth library
authenticationCallback (required)
lambda (pcast, status, sessionId)
Called upon successful authentication or when authentication failed or has to be redone. Upon successful authentication, the authenticationCallback will be called with status=PhenixRequestStatusOk. If at any time a new authenticationToken is required, then the authenticationCallback is called with status=PhenixRequestStatusUnauthorized to indicate that we are no longer authenticated.
onlineCallback (required)
lambda (pcast)
Called when the client is connected to the streaming platform
offlineCallback (required)
lambda (pcast)
Called when the client is disconnected from the streaming platform. Ongoing streams may continue while we are temporarily disconnected. However, no new streams can be started while being disconnected. The client automatically tries to reconnect and will call onlineCallback when it succeeds in doing so or eventually call authenticationCallback to indicate that re-authentication is required.
Authentication Callback Status Codes
Status
Valid Fields
Description
PhenixRequestStatusOk
sessionId
Authentication succeeded, the sessionId is populated
PhenixRequestStatusUnauthorized
none
Authentication failed or re-authentication required
varies
none
Authentication failed for other reasons
Disconnecting
Objective-C
1@import PhenixSdk;
2
3// Previously initialized and started
4id<PhenixPCast> pcast =...;
5
6[pcast stop];
7
8// Once you are done using PCast (e.g. exiting the app)
The options defining the requested user media stream
userMediaCallback (required)
lambda (pcast, status, userMediaStream)
Upon acquiring of the user media stream, the userMediaCallback will be called with status=PhenixRequestStatusOk. If the user media is currently used by another application, then you may receive a code status=PhenixRequestStatusConflict . If the operation fails with status=PhenixRequestStatusFailed then please check the logs for more information
Device Capability
Note: iPhone models earlier than the iPhone 6 will be limited to publishing at 720p due to hardware limitations.
Hard constraint: Capability must have at least the specified value
PhenixConstraintTypeMax
Hard constraint: Capability must have at most the specified value
PhenixConstraintTypeExact
Hard constraint: Capability must have exactly the specified value
PhenixConstraintTypeIdeal
Soft constraint: Capability should have specified value, but other values are acceptable (default)
Facing Mode
Name
Description
PhenixFacingModeAutomatic
Select a facing mode automatically (default)
PhenixFacingModeEnvironment
Facing the surrounding environment (e.g., back camera)
PhenixFacingModeUser
Facing the user (e.g., front camera)
Flash Mode
Only applicable to video devices
Name
Description
PhenixFlashModeAutomatic
Flash is turned on automatically when needed (default)
PhenixFlashModeAlwaysOn
Flash is on (if available)
PhenixFlashModeAlwaysOff
Flash is off
Device Location
Name
Description
PhenixLocationAutomatic
Select any device (default)
PhenixLocationUpper
Mounted on top of phone/tablet
PhenixLocationLower
Mounted at bottom of phone/tablet
Polar Pattern
Only applicable to audio devices
Name
Description
PhenixPolarPatternAutomatic
Automatically select pattern (default)
PhenixPolarPatternOmnidirectional
Equally sensitive to sound from any direction
PhenixPolarPatternCardioid
Most sensitive to sound from the direction in which the data source points and is (nearly) insensitive to sound from the opposite direction
PhenixPolarPatternSubcardioid
Most sensitive to sound from the direction in which the data source points and is less sensitive to sound from the opposite direction
Audio Echo Cancelation Mode
Only applicable to audio devices
Name
Description
PhenixAudioEchoCancelationModeAutomatic
Automatically select AEC (default)
PhenixAudioEchoCancelationModeOn
Enable AEC if available
PhenixAudioEchoCancelationModeOff
Disabled AEC
Video source rotation mode
Only applicable to video devices. Determines how to orient captured video frames.
Follow device rotation will ensure that video frames match the orientation in which the user is holding the device, regardless of how the app UI may be oriented. This is generally the behavior expected by a user, i.e. if the user is holding the device sideways, then video should be in landscape mode.
Following UI rotation allows your app to keep the video orientation locked to the UI rotation, regardless of how the user is holding the device. This makes it possible for instance to lock your UI in portrait mode, and have portrait video output even if the user is holding the device sideways.
Name
Description
PhenixVideoSourceRotationModeAutomatic
Automatically select rotation mode (default)
PhenixVideoSourceRotationModeFollowDeviceRotation
Video frames oriented according to how device is held
PhenixVideoSourceRotationModeFollowUiRotation
Video frames oriented according to UI orientation
Updating Options
Sometimes you find it useful to change the camera while a stream is running or just would like to turn on the flash light temporarily.
Objective-C
1@import PhenixSdk;
2
3// Previously obtained via 'getUserMedia'
4id<PhenixUserMediaStream> userMediaStream =...;
5
6// Previously initialized and used with 'getUserMedia'