How To: Embed a video in pop-ups in ArcGIS Online for a hosted feature service
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.
Follow the instructions below to embed a video in a pop-up in ArcGIS Online:
- Open the hosted feature service in ArcMap or ArcGIS Pro.
- 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.
- Open the CSV file in Microsoft Excel and add a new column in the table to insert the URL of the video.
- 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>
- 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.
- 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.
- ArcMap Web Help: Adding ArcGIS Server map services
- ArcGIS Pro Web Help: Add a feature service for editing
- ArcMap Web Help: Exporting tables
- ArcGIS Pro Web Help: Export tables
- ArcGIS Online Web Help: Add layers from files
- ArcGIS Online Web Help: Enable and remove pop-ups
- ArcGIS REST API Web Help: Generate Token
- ArcGIS Online Web Help: Share items with everyone
- ArcGIS Ideas: Allow embedded videos in ArcGIS Online pop-up windows