使用产品:iClient3d for webgl
操作系统:win10 64位
问题描述:以下代码视频可正常播放,执行到 projectionImage.build(); 系统崩溃, 错误提示见图片
var vid = document.getElementById("video");
if (Hls.isSupported()) {
var hls = new Hls();
hls.loadSource(playUrl);
hls.attachMedia(video);
hls.on(Hls.Events.MANIFEST_PARSED, function() {
vid.play();
});
}
var scene = viewerGlobal.scene; //当前场景
var projectionImage = new Cesium.ProjectionImage(scene); //视频投放类
var wgsPosition = scene.camera.positionCartographic; //
var longitude = Cesium.Math.toDegrees(wgsPosition.longitude);
var latitude = Cesium.Math.toDegrees(wgsPosition.latitude);
var height = wgsPosition.height;
projectionImage.setDistDirByPoint([longitude, latitude, height]);
projectionImage.distance = 200; //设置观察点到投影仪的距离
projectionImage.viewPosition = [longitude, latitude, height]; //设置起始位置
projectionImage.direction = 180; //方位角
projectionImage.pitch = -18; //俯仰角
projectionImage.horizontalFov = 30; //水平视角
projectionImage.verticalFov = 10; //垂直视角
projectionImage.hintLineColor = Cesium.Color.DODGERBLUE; //提示线的颜色
projectionImage.setImage({
video: vid
});
projectionImage.build();