Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

fix(InteractiveVideo): Added Player end and pause events and play and resume methods to the Managed Ad View #290

Merged
merged 6 commits into from
Apr 17, 2023

Conversation

me2k
Copy link
Contributor

@me2k me2k commented Apr 5, 2023

JIRA

AAG-3024

DESCRIPTION

Added Player end and pause events and play and resume methods to the Managed Ad View, this also includes a refactor for the Javascript message handlers.

NOTE: the play / pause javascript functions are not final as we are still discussing how to control this with the AA Mid team.

SCREENSHOTS

n/a

@me2k me2k requested a review from a team April 5, 2023 16:43
@me2k me2k self-assigned this Apr 5, 2023
Comment on lines +65 to +67
adPaused: function() { postMessageToBridge("\(AdEvent.adPaused.rawValue)"); },
adPlaying: function() { postMessageToBridge("\(AdEvent.adPlaying.rawValue)"); }
};
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added adPlaying and adPaused events for the WebSDK to communicate back up

Comment on lines +111 to +120
func adPaused() {
callback?(placementId, .adPaused)
logger.info("Event callback: adPaused for placement \(placementId)")
}

func adPlaying() {
callback?(placementId, .adPlaying)
logger.info("Event callback: adPlaying for placement \(placementId)")
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exposed hooks in the Native SDK for adPlaying and adPaused

Comment on lines +196 to +197
case adPaused = 9
case adPlaying = 10
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added cases for adPlaying and adPaused these are not breaking changes.

Comment on lines 114 to 120
func playVideo() {
webView.evaluateJavaScript("playVideo();")
}

func pauseVideo() {
webView.evaluateJavaScript("pauseVideo();")
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The two new methods for playing and pausing a video, these are the subject of our discussions at the moment.

@me2k me2k removed the don't merge label Apr 12, 2023
Copy link
Contributor

@thomas-james-1986 thomas-james-1986 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙌

@me2k me2k merged commit 9f53899 into develop Apr 17, 2023
@me2k me2k deleted the feat/aag-3024-adpaused-adplaying-events branch April 17, 2023 16:49
sa-release-bot-public-repo bot pushed a commit that referenced this pull request Apr 19, 2023
# [8.6.0](v8.5.7...v8.6.0) (2023-04-19)

### Bug Fixes

* **Bumper:** calling dismiss on the presenting viewcontroller if one exists and cleaning up the timer ([#292](#292)) ([a88f15c](a88f15c))
* **CI:** Locked in Circle CI macos.x86.medium.gen2 resource class ([#279](#279)) ([8e18233](8e18233))
* **Interactive Video:** Added Video Leave Warning dialog and close at end option to IV. ([#280](#280)) ([a7d38a8](a7d38a8))
* **InteractiveVideo:** Added Player end and pause events and play and resume methods to the Managed Ad View ([#290](#290)) ([9f53899](9f53899))
* **Settings:** Added a settings screen to the test app for testing. ([#284](#284)) ([5dcd9ce](5dcd9ce))
* **Test Ads:** Made the duration parameter optional in the Decodable object ([#283](#283)) ([2fbf955](2fbf955))

### Features

* **Network:** Adds retry mechanism for the failed networking requests ([#278](#278)) ([a7a43d6](a7a43d6))
@sa-release-bot-public-repo
Copy link

🎉 This PR is included in version 8.6.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants