Solved! Go to Solution.
function onResult(results:Array, clickGraphic:Graphic = null):void
{
if (results && results.length > 0)
{
var result:IdentifyResult = results[0];
var resultGraphic:Graphic = result.feature;
var mapPoint:MapPoint = MapPoint(clickGraphic.geometry);
var point:Point = mainMap.toScreen(mapPoint);
mainMap.infoWindow.hide();
switch (resultGraphic.geometry.type)
{
case Geometry.MAPPOINT:
{
mainMap.infoWindow.content = createVideoWindow(resultGraphic, xmlProjectParameters, divephotourl, divevideourl, site_id, videoname, photocount);
mainMap.infoWindow.label = "Site ID: " + resultGraphic.attributes[site_id];
resultGraphic.symbol = new SimpleMarkerSymbol("x",12,0xFF0080);
break;
}
}
layerGraphics.graphicProvider = resultGraphic;
mainMap.infoWindow.show(mainMap.toMap(point));
}
}
public static function createVideoWindow(graphic:Graphic, xmlProjectParameters:XMLList, photoURL:String, videoURL:String, siteID:String, videoName:String, photoCount:String):VideoPopup
{
var popVideo:VideoPopup = new VideoPopup();
popVideo.TitleText = graphic.attributes[siteID];
popVideo.VideoName = graphic.attributes[videoName];
popVideo.attributeText = returnAttributes(graphic, xmlProjectParameters, 0); //a function to get all the attributes
popVideo.imageCount = graphic.attributes[photoCount];
popVideo.photoURL = photoURL;
popVideo.videoURL = videoURL;
return popVideo;
}
<esri:Map id="myMap" load="loadHandler()"> <esri:infoWindowContent> <s:VideoPlayer width="480" height="360"> <s:DynamicStreamingVideoSource host="rtmp://111.111.11.111/live/" streamType="live"> <s:DynamicStreamingVideoItem streamName="yourStreamName" /> </s:DynamicStreamingVideoSource> </s:VideoPlayer> </esri:infoWindowContent> </esri:Map>