Reply
Occasional Advisor
Posts: 9
Registered: ‎10-21-2016
Accepted Solution

Playing a Jingle Image before the rolls

Hello,

 

We use the latest Pulse SDK.

We were wondering how we could delay the start of the adBreak to play a jingle image before each adBreak ?

We only show the jingle image if there is at least one ad to display.

 

This jingle image warns the user that some ads will be displayed.

Is this possible with Pulse ? 

 

Thank you,

Vincent.


Accepted Solutions
Occasional Advisor
Posts: 9
Registered: ‎10-21-2016

Re: Playing a Jingle Image before the rolls

[ Edited ]

For now, I've managed to do it by doing:

  const startAdPlayback = manager.session._sessionListener.startAdPlayback;

  manager.session._sessionListener.startAdPlayback = (...args) => {
    if (!manager.isAdBreakJinglePlayed) {
      manager.isAdBreakJinglePlayed = true;

      showJingle(player.thirdParties.jingle, 'ads', dispatch)
        .then(() => startAdPlayback.apply(manager.session, args))
        .catch(() => startAdPlayback.apply(manager.session, args));
    } else {
      startAdPlayback.apply(manager.session, args);
    }
  };

 

And by resetting 

manager.isAdBreakJinglePlayed

when the AD_BREAK_FINISHED event is fired

View solution in original post


All Replies
Occasional Advisor
Posts: 9
Registered: ‎10-21-2016

Re: Playing a Jingle Image before the rolls

[ Edited ]

For now, I've managed to do it by doing:

  const startAdPlayback = manager.session._sessionListener.startAdPlayback;

  manager.session._sessionListener.startAdPlayback = (...args) => {
    if (!manager.isAdBreakJinglePlayed) {
      manager.isAdBreakJinglePlayed = true;

      showJingle(player.thirdParties.jingle, 'ads', dispatch)
        .then(() => startAdPlayback.apply(manager.session, args))
        .catch(() => startAdPlayback.apply(manager.session, args));
    } else {
      startAdPlayback.apply(manager.session, args);
    }
  };

 

And by resetting 

manager.isAdBreakJinglePlayed

when the AD_BREAK_FINISHED event is fired

Highlighted
Posts: 1,360
Topics: 179
Kudos: 108
Blog Posts: 78
Ideas: 3
Solutions: 39
Registered: ‎08-20-2012

Re: Playing a Jingle Image before the rolls

Hi Vincent,

 

We are happy to see that you solved your issue. Thank you for sharing your solution with the Ooyala community.

 

 

Best regards,

Thomas

Please show your appreciation to others. If someone helps you, don't forget to give them Kudos by clicking the star button next to their post. If a post answers your question, please mark it as an "Accepted Solution."




Check out our latest Ooyala Engineering Blog!