Class ZegoMixerImageInfo


  • public class ZegoMixerImageInfo
    extends java.lang.Object
    Set the image information of a single input stream in the mux. Available since: 2.19.0 Description: Sets a picture for the content of a single input stream, which is used in place of the video, i.e. the video is not displayed when the picture is used. The `layout` layout in [ZegoMixerInput] for image multiplexing. Use case: The developer needs to temporarily turn off the camera to display the image during the video connection to the microphone, or display the picture when the audio is connected to the microphone. Restrictions: Image size is limited to 1M.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      int displayMode
      Image display mode.
      java.lang.String url
      The image path, if not empty, the image will be displayed, otherwise, the video will be displayed.
    • Constructor Summary

      Constructors 
      Constructor Description
      ZegoMixerImageInfo​(java.lang.String url)
      Build a image info object with url.
      ZegoMixerImageInfo​(java.lang.String url, int displayMode)
      Build a image info object with url and displayMode.
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • url

        public java.lang.String url
        The image path, if not empty, the image will be displayed, otherwise, the video will be displayed. JPG and PNG formats are supported. There are 2 ways to use it: 1. URI: Provide the picture to ZEGO technical support for configuration. After the configuration is complete, the picture URI will be provided, for example: preset-id://xxx.jpg. 2. URL: Only HTTP protocol is supported.
      • displayMode

        public int displayMode
        Image display mode. 0: Default. Use image to replace video content when url is not null. 1: Display image based on camera status. Display image when camera is turned off. Display video content when camera is turned on (no need to clear the url parameter). 2: Display image based on the input stream has video data or not. Display image when there is no video data in the input stream for 3 consecutive seconds. The default duration for judging that there is no video data is 3 seconds. If you need change this setting, please contact ZEGO technical support. Display video content when the input stream has video data.
    • Constructor Detail

      • ZegoMixerImageInfo

        public ZegoMixerImageInfo​(java.lang.String url)
        Build a image info object with url.
      • ZegoMixerImageInfo

        public ZegoMixerImageInfo​(java.lang.String url,
                                  int displayMode)
        Build a image info object with url and displayMode.