Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Documentation
Sidebar

SDLStreamingMediaConfiguration Class Reference

Section Contents

Overview

Undocumented

securityManagers

Set security managers which could be used. This is primarily used with video streaming applications to authenticate and perhaps encrypt traffic data.

Objective-C

@property (readwrite, copy, nonatomic, nullable)
    NSArray<Class<SDLSecurityType>> *securityManagers;

maximumDesiredEncryption

What encryption level video/audio streaming should be. The default is SDLStreamingEncryptionFlagAuthenticateAndEncrypt.

Objective-C

@property (assign, readwrite, nonatomic)
    SDLStreamingEncryptionFlag maximumDesiredEncryption;

Swift

var maximumDesiredEncryption: SDLStreamingEncryptionFlag { get set }

customVideoEncoderSettings

Properties to use for applications that utilize the video encoder for streaming. See VTCompressionProperties.h for more details. For example, you can set kVTCompressionPropertyKey_ExpectedFrameRate to set your framerate. Setting the framerate this way will also set the framerate if you use CarWindow automatic streaming.

Other properties you may want to try adjusting include kVTCompressionPropertyKey_AverageBitRate and kVTCompressionPropertyKey_DataRateLimits.

Objective-C

@property (readwrite, copy, nonatomic, nullable)
    NSDictionary<NSString *, id> *customVideoEncoderSettings;

Swift

var customVideoEncoderSettings: [String : Any]? { get set }

dataSource

Usable to change run time video stream setup behavior. Only use this and modify the results if you really know what you’re doing. The head unit defaults are generally good.

Objective-C

@property (readwrite, nonatomic, nullable) id<SDLStreamingMediaManagerDataSource>
    dataSource;

rootViewController

Set the initial view controller your video streaming content is within.

Activates the haptic view parser and CarWindow systems when set. This library will also use that information to attempt to return the touched view to you in SDLTouchManagerDelegate.

Note

If you wish to alter this rootViewController while streaming via CarWindow, you must set a new rootViewController on SDLStreamingMediaManager and this will update both the haptic view parser and CarWindow.

Warning

Apps using views outside of the UIView heirarchy (such as OpenGL) are currently unsupported. If you app uses partial views in the heirarchy, only those views will be discovered. Your OpenGL views will not be discoverable to a haptic interface head unit and you will have to manually make these views discoverable via the SDLSendHapticData RPC request.

Warning

If the rootViewController is app UI and is set from the UIViewController class, it should only be set after viewDidAppear:animated is called. Setting the rootViewController in viewDidLoad or viewWillAppear:animated can cause weird behavior when setting the new frame.

Warning

If setting the rootViewController when the app returns to the foreground, the app should register for the UIApplicationDidBecomeActive notification and not the UIApplicationWillEnterForeground notification. Setting the frame after a notification from the latter can also cause weird behavior when setting the new frame.

Warning

While viewDidLoad will fire, appearance methods will not.

Objective-C

@property (readwrite, strong, nonatomic, nullable)
    UIViewController *rootViewController;

Swift

var rootViewController: UIViewController? { get set }

carWindowRenderingType

Declares if CarWindow will use layer rendering or view rendering. Defaults to layer rendering.

Objective-C

@property (assign, readwrite, nonatomic)
    SDLCarWindowRenderingType carWindowRenderingType;

Swift

var carWindowRenderingType: SDLCarWindowRenderingType { get set }

enableForcedFramerateSync

When YES, the StreamingMediaManager will run a CADisplayLink with the framerate set to the video encoder settings kVTCompressionPropertyKey_ExpectedFrameRate. This then forces TouchManager (and CarWindow, if used) to sync their callbacks to the framerate. If using CarWindow, this must be YES. If NO, enableSyncedPanning on SDLTouchManager will be set to NO. Defaults to YES.

Objective-C

@property (assign, readwrite, nonatomic) BOOL enableForcedFramerateSync;

Swift

var enableForcedFramerateSync: Bool { get set }

allowMultipleViewControllerOrientations

When YES, the StreamingMediaManager will disable its internal checks that the rootViewController only has one supportedOrientation. Having multiple orientations can cause streaming issues. If you wish to disable this check, set it to YES. Defaults to NO.

Objective-C

@property (assign, readwrite, nonatomic)
    BOOL allowMultipleViewControllerOrientations;

Swift

var allowMultipleViewControllerOrientations: Bool { get set }

-init

Create an insecure video streaming configuration. No security managers will be provided and the encryption flag will be set to None. If you’d like custom video encoder settings, you can set the property manually.

Objective-C

- (nonnull instancetype)init;

Swift

init()

Return Value

The configuration

-initWithSecurityManagers:encryptionFlag:videoSettings:dataSource:rootViewController:

Manually set all the properties to the streaming media configuration

Objective-C

- (nonnull instancetype)
initWithSecurityManagers:
    (nullable NSArray<Class<SDLSecurityType>> *)securityManagers
          encryptionFlag:(SDLStreamingEncryptionFlag)encryptionFlag
           videoSettings:(nullable NSDictionary<NSString *, id> *)videoSettings
              dataSource:
                  (nullable id<SDLStreamingMediaManagerDataSource>)dataSource
      rootViewController:(nullable UIViewController *)rootViewController;

Parameters

securityManagers

The security managers to use or nil for none.

encryptionFlag

The maximum encrpytion supported. If the connected head unit supports less than set here, it will still connect, but if it supports more than set here, it will not connect.

videoSettings

Custom video encoder settings to be used in video streaming.

rootViewController

The UIViewController wih the content that is being streamed on, to use for haptics if needed and possible (only works for UIViews)

Return Value

The configuration

-initWithSecurityManagers:

Create a secure configuration for each of the security managers provided.

Objective-C

- (nonnull instancetype)initWithSecurityManagers:
    (nonnull NSArray<Class<SDLSecurityType>> *)securityManagers;

Parameters

securityManagers

The security managers to be used. The encryption flag will be set to AuthenticateAndEncrypt if any security managers are set.

Return Value

The configuration

+secureConfigurationWithSecurityManagers:

Create a secure configuration for each of the security managers provided.

Objective-C

+ (nonnull instancetype)secureConfigurationWithSecurityManagers:
    (nonnull NSArray<Class<SDLSecurityType>> *)securityManagers;

Parameters

securityManagers

The security managers to be used. The encryption flag will be set to AuthenticateAndEncrypt if any security managers are set.

Return Value

The configuration

+insecureConfiguration

Create an insecure video streaming configuration. No security managers will be provided and the encryption flag will be set to None. If you’d like custom video encoder settings, you can set the property manually. This is equivalent to init.

Objective-C

+ (nonnull instancetype)insecureConfiguration;

Return Value

The configuration

+autostreamingInsecureConfigurationWithInitialViewController:

Create a CarWindow insecure configuration with a view controller

Objective-C

+ (nonnull instancetype)
autostreamingInsecureConfigurationWithInitialViewController:
    (nonnull UIViewController *)initialViewController;

Swift

class func autostreamingInsecureConfiguration(withInitialViewController initialViewController: UIViewController) -> Self

Parameters

initialViewController

The initial view controller that will be streamed

Return Value

The configuration

+autostreamingSecureConfigurationWithSecurityManagers:initialViewController:

Create a CarWindow secure configuration with a view controller and security managers

Objective-C

+ (nonnull instancetype)
autostreamingSecureConfigurationWithSecurityManagers:
    (nonnull NSArray<Class<SDLSecurityType>> *)securityManagers
                               initialViewController:
                                   (nonnull UIViewController *)
                                       initialViewController;

Parameters

securityManagers

The security managers available for secure streaming use

initialViewController

The initial view controller that will be streamed, this can be a basic UIViewController if you need to set your actual streaming view controller at a later time on SDLManager.streamingManager.rootViewController.

Return Value

The configuration

View on GitHub.com
Previous Section Next Section