Package 

Class AdCuePointComponent

  • All Implemented Interfaces:
    com.brightcove.player.event.Component

    @Emits(events = {EventType.PLAY, EventType.SET_CUE_POINTS, EventType.WILL_INTERRUPT_CONTENT, EventType.WILL_RESUME_CONTENT, FreeWheelEventType.LOCK, FreeWheelEventType.UNLOCK, EventType.SHOW_SEEK_CONTROLS, EventType.HIDE_SEEK_CONTROLS})@ListensFor(events = {EventType.COMPLETED, EventType.CUE_POINT, EventType.DID_INTERRUPT_CONTENT, EventType.DID_RESUME_CONTENT, EventType.PLAY, EventType.SEEK_TO, EventType.ACTIVITY_STARTED, EventType.FRAGMENT_STARTED, EventType.ACTIVITY_RESTARTED, EventType.ACTIVITY_RESUMED, EventType.FRAGMENT_RESUMED, EventType.ACTIVITY_PAUSED, EventType.FRAGMENT_PAUSED, EventType.ACTIVITY_STOPPED, EventType.FRAGMENT_STOPPED}) 
    public class AdCuePointComponent
    extends AbstractComponent
                        

    Before Video playback, converts Slots in an IAdContext into relevant CuePoints, then during playback is responsible for handling FreeWheel ad Cuepoints emitted by the VideoController. Before Video playback (most likely during SET_SOURCE), the AdCueComponent creates a series of CuePoints based on the current populated AdContext.

    It will create one CuePoint for all pre-roll ads (with CuePoint.Type of BEFORE), one CuePoint for all post-roll ads, and one for each mid-roll (POINT_IN_TIME) and overlay ad.

    Due to the nature of the hooks in to the EventEmitter that the AdCuePointComponent creates, it should be instantiated as soon as possible after the FreeWheelController

    • Constructor Detail

      • AdCuePointComponent

        AdCuePointComponent(EventEmitter emitter)
    • Method Detail

      • isLocked

         boolean isLocked()

        Determine if the controller is currently in 'isLocked' state. If in isLocked state, certain events will be blockedfrom travelling down the event chain if seen by the controller.

      • disable

         void disable()

        Removes the listeners from the Component. Should be called before a new AdCuePointComponent is created

      • skipCurrentAd

         void skipCurrentAd()

        Skips the currently playing advertisement within the active Ad break (a.k.a ISlot)and plays the next advertisement in the break. If there are no pending advertisements with incurrent Ad break, then the normal playback will be resume automatically.

        This method must be called while an Ad break is progress. Calling the method at othertimes will have no effect.

      • skipCurrentAdBreak

         void skipCurrentAdBreak()

        Skips the current advertisement break (a.k.a ISlot). Subsequent advertisement breakswill play at scheduled cue points and can be skipped again by calling theskipCurrentAdBreak method again.

        This method must be called while an Ad break is progress. Calling the method at othertimes will have no effect.

        Please note that an break may contain more than one advertisement. Calling this method atany point during the break will cause all advertisements in the current break to be skipped.

      • unlock

         void unlock()

        Tell the control to 'unlock' the normal Video playback control flow by re-emitting the Intercepted Event

      • lock

         void lock()

        'Locks' the FreeWheelController; afterwards, certain events will be stopped and prevented from bubbling

      • addCuePoints

         void addCuePoints(IAdContext context)

        Given an instance of IAdContext, parses the Ad slots contained in the context andgenerates CuePoints. It will generate one Cuepoint for PreRoll Ads, one for PostRoll, andindividual cue points for the midroll and overlay.

        Parameters:
        context - A populated IAdContext (i.e.