How does Cesium's Entity material load the video of the monitoring class, and how to use the materia

How does Cesium's Entity material load the video of the monitoring class, and how to use the material to load the video data of the live stream in rtmp format?

1. A concise explanation of the problem you're experiencing.
Since the Video tag does not support live stream data in rtmp format, I introduced the videojs library to play rtmp live stream data. But this video is attached to the material of the entity, but it can't be played. After looking at the console, I found that videojs converted the Video tag into an Object tag. I don't know how to make the physical material a live video material. Do you know how to solve this problem? Or you have a better way to achieve this effect, please tell me, thank you!

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

See answer here: https://groups.google.com/d/msg/cesium-dev/vOzLJkJFew8/88MWH8-RFAAJ

1 Like