Skip to content

Commit

Permalink
Publishing latest changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Shawn Busolits committed Feb 22, 2016
1 parent 62c11b8 commit d95dfb0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@

// Maps SDK enum to strings for logging.
const char *AdEventNames[] = {
"Ad Break Ready", "All Ads Completed", "Clicked", "Complete", "First Quartile", "Loaded",
"Midpoint", "Pause", "Resume", "Skipped", "Started", "Tapped", "Third Quartile",
"Ad Break Ready", "Ad Break Ended", "Ad Break Started", "All Ads Completed", "Clicked",
"Complete", "First Quartile", "Loaded", "Midpoint", "Pause", "Resume",
"Skipped", "Started", "Tapped", "Third Quartile"
};

typedef enum { PlayButton, PauseButton } PlayButtonType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ class VideoViewController: UIViewController, AVPictureInPictureControllerDelegat

let AdEventNames: [IMAAdEventType: String] = [
IMAAdEventType.AD_BREAK_READY: "Ad Break Ready",
IMAAdEventType.AD_BREAK_ENDED: "Ad Break Ended",
IMAAdEventType.AD_BREAK_STARTED: "Ad Break Started",
IMAAdEventType.ALL_ADS_COMPLETED: "All Ads Completed",
IMAAdEventType.CLICKED: "Clicked",
IMAAdEventType.COMPLETE: "Complete",
Expand Down Expand Up @@ -495,7 +497,8 @@ class VideoViewController: UIViewController, AVPictureInPictureControllerDelegat
logMessage("AdsManager event \(eventType!)")
switch (event.type) {
case IMAAdEventType.LOADED:
if (!pictureInPictureController!.pictureInPictureActive) {
if (pictureInPictureController == nil ||
!pictureInPictureController!.pictureInPictureActive) {
adsManager.start()
}
break
Expand Down

0 comments on commit d95dfb0

Please sign in to comment.