onvif
    Preparing search index...

    Class Media2

    Media service, ver20 profile

    Hierarchy (View Summary)

    Index
    onvif: Onvif
    service: keyof OnvifServices
    xmlns: string
    • This operation adds one or more Configurations to an existing media profile. If a configuration exists in the media profile, it will be replaced. A device shall support adding a compatible Configuration to a Profile containing a VideoSourceConfiguration and shall support streaming video data of such a profile.

      Note that OSD elements must be added via the CreateOSD command.

      Parameters

      • options: AddConfigurationExtended
        • Optionalconfiguration?: ConfigurationRefExtended[]

          List of configurations to be added. The types shall be provided in the order defined by tr2:ConfigurationEnumeration. List entries with tr2:ConfigurationEnumeration value "All" shall be ignored.

        • Optionalname?: string

          Optional item. If present updates the Name property of the profile.

        • OptionalprofileToken?: string

          Reference to the profile where the configuration should be added

      Returns Promise<void>

    • Create the Mask.

      Parameters

      Returns Promise<CreateMaskResponse>

      const { token } = await cam.media2.createMask({
      type: 'Color',
      token: 'mask_token_1',
      color: { X: 1, Y: 2, Z: 3, colorspace: 'http://www.onvif.org/ver10/colorspace/YCbCr' },
      configurationToken: 'VideoSourceConfigurationToken_1',
      enabled: true,
      polygon: {
      point: [{ x: 0.1, y: 0.1 }, { x: 0.2, y: 0.2 }, { x: 0.3, y: 0.3 }],
      }
      });
    • This operation creates a new media profile. A created profile created via this method may be deleted via the DeleteProfile method. Optionally Configurations can be assigned to the profile on creation. For details regarding profile assignment check also the method AddConfiguration.

      Parameters

      • options: CreateProfileExtended
        • Optionalconfiguration?: ConfigurationRefExtended[]

          Optional set of configurations to be assigned to the profile. List entries with tr2:ConfigurationEnumeration value "All" shall be ignored.

        • name: string

          friendly name of the profile to be created

      Returns Promise<string>

    • This operation deletes a profile. The device shall support the deletion of a media profile through the DeletePro- file command. A device signaling support for MultiTrackStreaming shall support deleting of virtual profiles via the command. Note that deleting a profile of a virtual profile set may invalidate the virtual profile.

      Parameters

      • options: DeleteProfile
        • token: string

          This element contains a reference to the profile that should be deleted.

      Returns Promise<void>

    • The getAnalyticsConfigurations operation allows to retrieve the analytics settings of one ore more configurations.

      • If a configuration token is provided the device shall respond with the requested configuration or provide an error if it does not exist.
      • In case only a profile token is provided the device shall respond with all configurations that are compatible to the provided media profile.
      • If no tokens are provided the device shall respond with all available configurations.

      Parameters

      • Optionaloptions: GetAnalyticsConfigurations
        • OptionalconfigurationToken?: string

          Token of the requested configuration.

        • OptionalprofileToken?: string

          Contains the token of an existing media profile the configurations shall be compatible with.

      Returns Promise<VideoAnalyticsConfiguration[]>

    • The getAudioDecoderConfigurations operation allows to retrieve the audio decoder settings of one ore more configurations.

      • If a configuration token is provided the device shall respond with the requested configuration or provide an error if it does not exist.
      • In case only a profile token is provided the device shall respond with all configurations that are compatible to the provided media profile.
      • If no tokens are provided the device shall respond with all available configurations.

      Parameters

      • Optionaloptions: GetAudioDecoderConfigurations
        • OptionalconfigurationToken?: string

          Token of the requested configuration.

        • OptionalprofileToken?: string

          Contains the token of an existing media profile the configurations shall be compatible with.

      Returns Promise<AudioDecoderConfiguration[]>

    • The getAudioEncoderConfigurations operation allows to retrieve the audio encoder settings of one ore more configurations.

      • If a configuration token is provided the device shall respond with the requested configuration or provide an error if it does not exist.
      • In case only a profile token is provided the device shall respond with all configurations that are compatible to the provided media profile.
      • If no tokens are provided the device shall respond with all available configurations.

      Parameters

      • Optionaloptions: GetAudioEncoderConfigurations
        • OptionalconfigurationToken?: string

          Token of the requested configuration.

        • OptionalprofileToken?: string

          Contains the token of an existing media profile the configurations shall be compatible with.

      Returns Promise<AudioEncoder2Configuration[]>

    • This operation returns the available options (supported values and ranges for audio output configuration parameters) for configuring an audio output. To retrieve the EQPresetList, a valid ConfigurationToken must be provided. If EQPreset is supported and isFrequencyDecibelEditable is signaled as true, the response shall include the FrequencyDecibelPair.

      Parameters

      Returns Promise<AudioOutputConfigurationOptions>

    • The getAudioOutputConfigurations operation allows to retrieve the audio output settings of one ore more configurations.

      • If a configuration token is provided the device shall respond with the requested configuration or provide an error if it does not exist.
      • In case only a profile token is provided the device shall respond with all configurations that are compatible to the provided media profile.
      • If no tokens are provided the device shall respond with all available configurations.

      Parameters

      • Optionaloptions: GetAudioOutputConfigurations
        • OptionalconfigurationToken?: string

          Token of the requested configuration.

        • OptionalprofileToken?: string

          Contains the token of an existing media profile the configurations shall be compatible with.

      Returns Promise<AudioOutputConfigurationExtended[]>

    • This operation returns the available options (supported values and ranges for audio source configuration parameters) when the audio source parameters are reconfigured. If an audio source configuration is specified, the options shall concern that particular configuration. If a media profile is specified, the options shall be compatible with that media profile.

      Parameters

      Returns Promise<AudioSourceConfigurationOptions>

    • The getAudioSourceConfigurations operation allows to retrieve the audio source settings of one ore more configurations.

      • If a configuration token is provided the device shall respond with the requested configuration or provide an error if it does not exist.
      • In case only a profile token is provided the device shall respond with all configurations that are compatible to the provided media profile.
      • If no tokens are provided the device shall respond with all available configurations.

      Parameters

      • Optionaloptions: GetAudioSourceConfigurations
        • OptionalconfigurationToken?: string

          Token of the requested configuration.

        • OptionalprofileToken?: string

          Contains the token of an existing media profile the configurations shall be compatible with.

      Returns Promise<AudioSourceConfiguration[]>

    • This operation lists existing Mask configurations for the device.

      • If an Mask token is provided the device shall respond with the requested configuration or provide an error if it does not exist.
      • In case only a video source configuration token is provided the device shall respond with all configurations that exist for the video source configuration.
      • If no tokens are provided the device shall respond with all available Mask configurations.

      Parameters

      Returns Promise<Mask[]>

    • The getMetadataConfigurations operation allows to retrieve the metadata settings of one ore more configurations.

      • If a configuration token is provided the device shall respond with the requested configuration or provide an error if it does not exist.
      • In case only a profile token is provided the device shall respond with all configurations that are compatible to the provided media profile.
      • If no tokens are provided the device shall respond with all available configurations.

      Parameters

      • Optionaloptions: GetMetadataConfigurations
        • OptionalconfigurationToken?: string

          Token of the requested configuration.

        • OptionalprofileToken?: string

          Contains the token of an existing media profile the configurations shall be compatible with.

      Returns Promise<MetadataConfiguration[]>

    • This operation lists existing OSD configurations for the device.

      • If an OSD token is provided the device shall respond with the requested configuration or provide an error if it does not exist.
      • In case only a video source configuration token is provided the device shall respond with all configurations that exist for the video source configuration.
      • If no tokens are provided the device shall respond with all available OSD configurations.

      Parameters

      Returns Promise<OSDConfiguration[]>

    • Retrieve the profile with the specified token or all defined media profiles.

      • If no Type is provided the returned profiles shall contain no configuration information.
      • If a single Type with value 'All' is provided the returned profiles shall include all associated configurations.
      • Otherwise the requested list of configurations shall for each profile include the configurations present as Type.

      Parameters

      • options: GetProfiles = {}
        • Optionaltoken?: string

          Optional token of the requested profile.

        • Optionaltype?: string[]

          The types shall be provided as defined by tr2:ConfigurationEnumeration.

      Returns Promise<MediaProfile[]>

    • This operation requests a URI that can be used to initiate a live media stream using RTSP as the control protocol. The returned URI shall remain valid indefinitely even if the profile is changed.

      Defined stream types are: RtspUnicast RTSP streaming RTP as UDP Unicast. RtspMulticast RTSP streaming RTP as UDP Multicast. RTSP RTSP streaming RTP over TCP. RtspOverHttp Tunneling both the RTSP control channel and the RTP stream over HTTP or HTTPS.

      If a multicast stream is requested at least one of VideoEncoder2Configuration, AudioEncoder2Configuration and MetadataConfiguration shall have a valid multicast setting.

      Parameters

      Returns Promise<GetStreamUriResponse>

    • This operation returns the available options (supported values and ranges for video encoder configuration parameters) when the video encoder parameters are reconfigured.

      This response contains the available video encoder configuration options. If a video encoder configuration is specified, the options shall concern that particular configuration. If a media profile is specified, the options shall be compatible with that media profile. If no tokens are specified, the options shall be considered generic for the device.

      Parameters

      Returns Promise<VideoEncoder2ConfigurationOptions[]>

    • The getVideoEncoderConfigurations operation allows to retrieve the video encoder settings of one ore more configurations.

      • If a configuration token is provided the device shall respond with the requested configuration or provide an error if it does not exist.
      • In case only a profile token is provided the device shall respond with all configurations that are compatible to the provided media profile.
      • If no tokens are provided the device shall respond with all available configurations.

      Parameters

      • Optionaloptions: GetVideoEncoderConfigurations
        • OptionalconfigurationToken?: string

          Token of the requested configuration.

        • OptionalprofileToken?: string

          Contains the token of an existing media profile the configurations shall be compatible with.

      Returns Promise<VideoEncoder2Configuration[]>

    • This operation returns the available options (supported values and ranges for video source configuration parameters) when the video source parameters are reconfigured If a video source configuration is specified, the options shall concern that particular configuration. If a media profile is specified, the options shall be compatible with that media profile.

      Parameters

      Returns Promise<VideoSourceConfigurationOptions>

    • The getVideoSourceConfigurations operation allows to retrieve the video source settings of one ore more configurations.

      • If a configuration token is provided the device shall respond with the requested configuration or provide an error if it does not exist.
      • In case only a profile token is provided the device shall respond with all configurations that are compatible to the provided media profile.
      • If no tokens are provided the device shall respond with all available configurations.

      Parameters

      • Optionaloptions: GetVideoSourceConfigurations
        • OptionalconfigurationToken?: string

          Token of the requested configuration.

        • OptionalprofileToken?: string

          Contains the token of an existing media profile the configurations shall be compatible with.

      Returns Promise<VideoSourceConfiguration[]>

    • Protected Experimental

      The getWebRTCConfigurations operation allows to retrieve the WebRTC settings of one ore more configurations.

      • If a configuration token is provided the device shall respond with the requested configuration or provide an error if it does not exist.
      • In case only a profile token is provided the device shall respond with all configurations that are compatible to the provided media profile.
      • If no tokens are provided the device shall respond with all available configurations. Specs not ready yet, this method is for the future development

      Returns Promise<WebRTCConfiguration[]>

    • This operation removes one or more configurations from an existing media profile. Tokens appearing in the configuration list shall be ignored. Presence of the "All" type shall result in an empty profile. Removing a non-existing configuration shall be ignored and not result in an error. A device supporting the Media2 service shall support this command

      Parameters

      • options: RemoveConfigurationExtended
        • Optionalconfiguration?: ConfigurationRefExtended[]

          List of configurations to be removed. The types shall be provided in the order defined by tr2:ConfigurationEnumeration. Tokens appearing in the configuration list shall be ignored. Presence of the "All" type shall result in an empty profile.

        • OptionalprofileToken?: string

          This element contains a reference to the media profile from which the configuration shall be removed.

      Returns Promise<void>

    • This operation modifies an audio encoder configuration. Running streams using this configuration may be immediately updated according to the new settings. The changes are not guaranteed to take effect unless the client requests a new stream URI and restarts any affected streams. NVC methods for changing a running stream are out of scope for this specification.

      Parameters

      Returns Promise<void>

    • This operation modifies an audio source configuration. Running streams using this configuration may be immediately updated according to the new settings. The changes are not guaranteed to take effect unless the client requests a new stream URI and restarts any affected stream NVC methods for changing a running stream are out of scope for this specification.

      Parameters

      Returns Promise<void>

    • This operation modifies a metadata configuration. Running streams using this configuration may be updated immediately according to the new settings. The changes are not guaranteed to take effect unless the client requests a new stream URI and restarts any affected streams. NVC methods for changing a running stream are out of scope for this specification.

      Parameters

      Returns Promise<void>

    • This operation modifies a video encoder configuration. Running streams using this configuration may be immediately updated according to the new settings. The changes are not guaranteed to take effect unless the client requests a new stream URI and restarts any affected stream. NVC methods for changing a running stream are out of scope for this specification. SessionTimeout is provided as a hint for keeping rtsp session by a device. If necessary the device may adapt parameter values for SessionTimeout elements without returning an error. For the time between keep alive calls the client shall adhere to the timeout value signaled via RTSP.

      Parameters

      Returns Promise<void>

    • This operation modifies a video source configuration. Running streams using this configuration may be immediately updated according to the new settings. The changes are not guaranteed to take effect unless the client requests a new stream URI and restarts any affected stream. NVC methods for changing a running stream are out of scope for this specification.

      Parameters

      Returns Promise<void>

    • SetVideoSourceMode changes the media profile structure relating to video source for the specified video source mode. A device that indicates a capability of VideoSourceModes shall support this command. The behavior after changing the mode is not defined in this specification.

      Parameters

      Returns Promise<void>

    • This command starts multicast streaming using a specified media profile of a device. Streaming continues until StopMulticastStreaming is called for the same Profile. The streaming shall continue after a reboot of the device until a StopMulticastStreaming request is received. The multicast address, port and TTL are configured in the VideoEncoderConfiguration, AudioEncoderConfiguration and MetadataConfiguration respectively.

      Parameters

      Returns Promise<void>