English

How To: Embed a video in pop-ups in ArcGIS Online for a hosted feature service

Summary

In some instances, videos may be embedded in ArcGIS Online to provide visual information of the locations on the web map. In ArcGIS Online, it is possible to embed a video in pop-ups for a hosted feature service using the <iframe> tag with the appropriate width and height for the video.

Procedure

Follow the instructions below to embed a video in a pop-up in ArcGIS Online:

  1. Open the hosted feature service in ArcMap or ArcGIS Pro.
  2. Export the attribute table to a CSV file. For more information refer to ArcMap Web Help: Exporting tables or ArcGIS Pro Web Help: Export tables.
  3. Open the CSV file in Microsoft Excel and add a new column in the table to insert the URL of the video.
  4. In the new column, add the <iframe> tag with the appropriate width and height for the video.
<iframe width="xxx" height="xxx" src=https://www.youtube.com/embed/xxxxxxx frameborder="0" allowfullscreen></iframe>
iframe code
 
  1. Save the changes in the CSV file and add the file to the ArcGIS Online web map. For more detailed steps, refer to ArcGIS Online Web Help: Add layers from files.
Note:
Ensure to enable and configure pop-ups to display the new field to play the video on the layer. For more information, refer to ArcGIS Online Web Help: Enable and remove pop-ups.
  1. On the web map, click the desired feature on the layer to watch the video.
Note:
If the video fails to play as it is not hosted on a web server, attach the video to the hosted feature service and generate a token to the URL of the video. For more information on generating tokens, refer to ArcGIS REST API Web Help: Generate Token.
Video

Related Information