Working with Multi-Resolution Streams on Widevine

To support ABR for video content with multiple resolutions on Google Widevine, you can set the maximum dimensions of the video stream.

To allow your multi-resolution videos to be played at maximal size on a mobile device, you can set the maximum width and height of the video stream, as shown in the code fragment below. The stream selected will have a resolution smaller or equal to the maximum dimensions you define.
  1. Extend the OODefaultPlayerInfo class.

    The maxHeight and maxWidth should accommodate the highest resolution you have.

  2. Set the static StreamPlayer.OODefaultPlayerInfo to an instance of your new class, in the code snippet, CustomStreamInfo.
// iOS
@interface CustomStreamPlayer : OODefaultPlayerInfo

@implementation CustomStreamPlayer
- (int)maxHeight { return 500; }
- (int)maxWidth { return 1280; }

- (void)viewDidLoad
  [super viewDidLoad];

  [OOStreamPlayer setDefaultPlayerInfo:[CustomStreamPlayer alloc]];


  ooyalaPlayerViewController = [[OOOoyalaPlayerViewController alloc] initWithPcode:PCODE domain:[[OOPlayerDomain alloc]