Я создаю маленькое приложение для карт, где вам дают информацию, видео и изображения, касающиеся различных кампусов в университете.
Я использую метод customContent для вставки объекта видеопроигрывателя в информационное окно, но при этом он избавляется от моего текстового содержимого и становится единственной видимой вещью для пользователя.
Как я могу обойти это и иметь текст и видео в информационном окне?
Демонстрационная ссылка
public function createMarker(latlng:LatLng, name:String, address:String, video:String):Marker
{
var marker:Marker=new Marker(latlng);
marker.addEventListener(MapMouseEvent.CLICK, function(e:MapMouseEvent):void
{
//marker.openInfoWindow(new InfoWindowOptions({contentHTML:html + moulVid}));
var infoWindow:InfoWindowOptions = new InfoWindowOptions();
infoWindow.title = name;
var videoPlayer:VideoPlayer = new VideoPlayer();
videoPlayer.source = '../assets/video/' + video.toLocaleLowerCase();
videoPlayer.autoPlay = false;
videoPlayer.alpha = 0.8;
titleFormat = new TextFormat();
titleFormat.font = "Arial";
titleFormat.size = 14;
titleFormat.bold = true;
contentFormat = new TextFormat();
contentFormat.font = "Arial";
contentFormat.size = 12;
infoWindow.drawDefaultFrame = true;
infoWindow.titleFormat = titleFormat;
if (video != "") {
infoWindow.customContent = videoPlayer;
infoWindow.height = 300;
}
infoWindow.width = 380;
infoWindow.content = address;
infoWindow.contentFormat = contentFormat;
infoWindow.padding = 10;
marker.openInfoWindow(infoWindow);
});