Share via


Embed player widget in Power BI

Note

Azure Video Analyzer has been retired and is no longer available.

Azure Video Analyzer for Media is not affected by this retirement. It is now rebranded to Azure Video Indexer. Click here to read more.

Azure Video Analyzer enables you to record video and associated inference metadata to your Video Analyzer cloud resource. Video Analyzer has a Player Widget - an easy-to-embed widget allowing client apps to playback video and inference metadata.

Dashboards are an insightful way to monitor your business and view all your most important metrics at a glance. A Power BI dashboard is a powerful tool to combine video with multiple sources of data including telemetry from IoT Hub. In this tutorial, you will learn how to add one or more player widgets to a dashboard using Microsoft Power BI web service.

Block diagram to embed Azure Video Analyzer player widget in Microsoft Power BI.

Suggested pre-reading

Prerequisites

Create a token

  1. Follow steps to create a token.
  2. Make sure to save values generated for Issuer, Audience, Key Type, Algorithm, Key Id, RSA Key Modulus, RSA Key Exponent, Token. You will need these values when creating an access policy below.

Get embed code for player widget

  1. Login to Azure portal with your credentials. Locate your Video Analyzer account used to complete the prerequisites and open the Video Analyzer account pane.

  2. Follow steps to Create an access policy.

  3. Select Videos in the Video Analyzer section.

  4. Select any video from the list.

  5. Click on Widget setup. A pane Use widget in your application opens on the right-hand side. Scroll down to Option 2 – using HTML and copy the code and paste it in a text editor. Click the Close button.

    Screenshot of copy widget HTML code from AVA portal and save for later.

  6. Edit the HTML code copied in step 5 to replace values for

    • Token AVA-API-JWT-TOKEN - replace with the value of Token that you saved in the “Create a token” step. Ensure to remove the angular brackets.
    • Optional – you can make other UI changes in this code for example - changing the header from “Example Player widget” to “Continuous Video Recording”.

Add widget in Power BI dashboard

  1. Open the Power BI service in your browser. From the navigation pane, select My Workspace

    Screenshot of Power BI workspace home page.

  2. Create a new dashboard by clicking New > Dashboard or open an existing dashboard. Select the Edit drop down arrow and then Add a tile. Select Web content > Next.

  3. In Add web content tile, enter your Embed code from previous section. Click Apply.

    Screenshot of embedding the html code in a Power BI dashboard tile.

  4. You will see a player widget pinned to the dashboard with a video.

    Screenshot of one video player widget added.

  5. To add more videos from Azure Video Analyzer Videos section, follow the same steps in this section.

Note

To add multiple videos from the same Video Analyzer account, a single set of access policy and token is sufficient.

Here is a sample of multiple videos pinned to a single Power BI dashboard.

Screenshot of two video player widgets added as an example.

Next steps