Customizing the Scrubber for iOS playback

Learn how to customize the player scrubber for iOS.

  1. Prepare the app for customizations using the steps in Implementing Inline Custom Controls for iOS.
  2. Use the following steps to change the color of the scrubber bar to red:
    1. Open CustomInlineIOS7ControlsView.m for editing.
    2. Change the navigationBar.backgroundColor to red. This is shown in the following code sample:
      navigationBar = [[UIView alloc] initWithFrame:CGRectMake(0, self.bounds.size.height - 36, self.bounds.size.width, 36)];
      if (navigationBar) {
          nav igationBar.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleTopMargin;
          navigationBar.backgroundColor = [UIColor redColor];              
  3. Edit ViewController.m to include OoyalaPlayerViewController and call the custom controls code. This step is showing in the following code example:
      _ooyalaPlayerViewController = [[OOOoyalaPlayerViewController alloc] initWithPcode:PCODE domain:[[OOPlayerDomain alloc] initWithString:PLAYERDOMAIN]];
      CustomInlineIOS7ViewController *inlineController = [CustomInlineIOS7ViewController new];
      MyFullScreenIOS7ViewController *fullscreenController = [MyFullScreenIOS7ViewController new];
      [_ooyalaPlayerViewController setInlineViewController:inlineController];
      [_ooyalaPlayerViewController setFullScreenViewController:fullscreenController];
  4. Edit ViewController.m to attach the custom controllers to the current view as shown in the following code sample:
     // Attach to current view
      [self addChildViewController:_ooyalaPlayerViewController];
      [_ooyalaPlayerViewController.view setFrame:_playerView.bounds];
      [self addChildViewController:_ooyalaPlayerViewController];
      [_playerView addSubview:_ooyalaPlayerViewController.view];

    Your app now includes custom controls for the player scrubber bar. For information about how to customize other player interface elements see Layout Controls.