Cesium – How to add video in infobox ?

cesium-how-to-add-viedo

var viewer = new Cesium.Viewer('cesiumContainer');

var iframe = document.getElementsByClassName('cesium-infoBox-iframe')[0];
iframe.setAttribute('sandbox', 'allow-same-origin allow-scripts allow-popups allow-forms'); 

var pinBuilder = new Cesium.PinBuilder();

var bluePin = viewer.entities.add({
    description: '',
    position : Cesium.Cartesian3.fromDegrees(-75.170726, 39.9208667),
    billboard : {
        image : pinBuilder.fromColor(Cesium.Color.ROYALBLUE, 48).toDataURL(),
        verticalOrigin : Cesium.VerticalOrigin.BOTTOM
    }
});

viewer.zoomTo(bluePin);
Share

Leave a Reply

Your email address will not be published. Required fields are marked *