2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.
This is a live video source in China. You may not be able to access this video source. If you want to test it, please replace the live video source address.
<body>
<video id="video" width=960 height=540 class="video-js vjs-default-skin" controls>
<source src="rtmp://58.200.131.2:1935/livetv/hunantv">
</video>
<script>
var player = videojs('video', {}, function(){
this.play();
});
var material = new Cesium.ImageMaterialProperty({
image: document.getElementById('video');
})
var redPolygon = viewer.entities.add({
name : 'Red polygon on surface',
polygon : {
hierarchy : Cesium.Cartesian3.fromDegreesArray([-115.0, 37.0,
-115.0, 32.0,
-107.0, 33.0,
-102.0, 31.0,
-102.0, 35.0]),
material : material
}
});
</script>
</body>
3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
I need to play the surveillance video on the material of the entity, but the surveillance video is the live stream data of rtmp, I don't know how to load it onto the material of the entity.
4. The Cesium version you're using, your operating system and browser.
Cesium1.51
Windows64
Google Chrome