[GIS] Adding video to ArcGIS API for JavaScript popup template

arcgis-javascript-apiinfowindowpopupvideo

I was wondering how do I add a video to be played in the popup template?

I've looked at the documentation here: https://developers.arcgis.com/javascript/jssamples/widget_extendInfowindow.html

and can't seem to find any information on it?

Best Answer

The last line of the getTextContent function in that sample shows how an infoWindow can contain HTML:

return "<b>" + commName + "</b><br /><a target='_blank' href=http://en.wikipedia.org/wiki/" + sciName  +">Wikipedia Entry</a>";

You can set this using infoWindow.setContent, and point to the location of the video.

From this point you can use standard HTML video tags, or the embed link from YouTube, Vimeo, etc.