Skip to content

Add an extension menu with custom actions#779

Open
tvanlaerhoven wants to merge 1 commit intodevelopfrom
feature/example-extension-button
Open

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

Conversation

@tvanlaerhoven
Copy link
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).

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.

1 participant