smartdevicelink/sdl_ios

SDLVideoStreamingRange init not working properly

FrankElias77 opened this issue · 1 comments

Bug Report

The video stream fails when constructing our SDLVideoStreamingRange object using the init(), then setting a minimumDiagonal or minimumAspectRatio/maximumAspectRatio without setting the dimensions.
SDLVideoStreamingRange works properly with other init methods.

Reproduction Steps
  1. Set our SDLVideoStreamingRange
    let landscapeDiagonal = SDLVideoStreamingRange()
    landscapeDiagonal.minimumDiagonal = 5.0
  2. streamingMediaConfig.supportedLandscapeStreamingRange = landscapeDiagonal
    streamingMediaConfig.supportedPortraitStreamingRange = SDLVideoStreamingRange.disabled()
  3. Launch app
Expected Behavior

App streams successfully

Observed Behavior

App does not stream

OS & Version Information
  • iOS Version: 15.0/13.0
  • SDL iOS Version: 7.3.0-rc.1
  • Testing Against: SDL Core/Sync 3
Test Case, Sample Code, and / or Example App

https://smartdevicelink.com/en/guides/iOS/video-streaming-for-navigation-apps/video-streaming-ios/#creating-the-video-streaming-ranges

Doing let landscapeDiagonal = SDLVideoStreamingRange() is the same as doing let landscapeDiagonal = SDLVideoStreamingRange.disabled(). Creating an empty video streaming range, therefore, sets the resolutions to disabled. This should either (1) be made clear in .h documentation. (2) Changed to set the minimum and maximum resolution to nil (major version change). (3) Disable init (this would be a major version change, so we'd have to deprecate it).

If init survives, we should also set the min/max aspect ratio and the min diagonal. I think I prefer 3.