Skip to content

Add an extension menu with custom actions#779

Merged
tvanlaerhoven merged 1 commit intodevelopfrom
feature/example-extension-button
Mar 24, 2026
Merged

Add an extension menu with custom actions#779
tvanlaerhoven merged 1 commit intodevelopfrom
feature/example-extension-button

Conversation

@tvanlaerhoven
Copy link
Copy Markdown
Member

Add an extension menu to the UI that enables to easily add custom actions.

For example:

  <ExtensionMenuButton>
    <ExtensionButton label={'Schedule ad'} onPress={() => {
      player.ads.schedule({
        integration: AdIntegrationKind.google_ima,
        timeOffset: 1e-3 * (player?.currentTime ?? 0) + 3, // in 3 seconds from now
        sources: {
          src: 'https://cdn.theoplayer.com/demos/ads/vast/dfp-preroll-no-skip.xml',
        },
      });
    }} />
  </ExtensionMenuButton>

The menu is hidden if no custom actions are defined (default).

@tvanlaerhoven tvanlaerhoven merged commit 0f6b9a5 into develop Mar 24, 2026
7 of 9 checks passed
@tvanlaerhoven tvanlaerhoven deleted the feature/example-extension-button branch March 24, 2026 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants