How to enable the watermark for media files?

Follow

Comments

1 comment

  • wang
    我这样写,却没有用,并没有水印出现
    fun setCameraWatermark(){
    val setting = CameraWatermarkSettings()
    setting.enabledForPhotos = true
    setting.enabledForVideos = true

    KeyManager.getInstance().setValue(KeyTools.createKey(KeyCameraWatermarkSettings,
    ComponentIndexType.LEFT_OR_MAIN),setting,object : CommonCallbacks.CompletionCallback{
    override fun onSuccess() {
    Log.d("水印设置","设置开启成功")
    setDisPlayWatermark()
    }

    override fun onFailure(error: IDJIError) {
    Log.d("水印设置","设置开启失败:"+error.description())
    }

    })
    }

    fun setDisPlayWatermark(){
    val settings = WatermarkDisplayContentSettings()
    settings.userCustomStringEnabled = true
    settings.droneSnEnabled = true
    settings.setScreenLocation(ControlLocation.RIGHT_BOTTOM)
    KeyManager.getInstance().setValue(KeyTools.createKey(KeyWatermarkDisplayContentSettings,
    ComponentIndexType.LEFT_OR_MAIN),settings,object : CommonCallbacks.CompletionCallback{
    override fun onSuccess() {
    Log.d("水印设置","设置自定义文案显示成功")
    setCustomWatermark()

    }

    override fun onFailure(error: IDJIError) {
    Log.d("水印设置","设置自定义文案显示成功:"+error.description())
    }

    })
    }

    fun setCustomWatermark(){
    KeyManager.getInstance().setValue(KeyTools.createKey(KeyWatermarkUserCustomInfo,
    ComponentIndexType.LEFT_OR_MAIN),"长沙埃比特科技有限公司",object : CommonCallbacks.CompletionCallback{
    override fun onSuccess() {
    Log.d("水印设置","设置自定义文案显示成功")

    }

    override fun onFailure(error: IDJIError) {
    Log.d("水印设置","设置自定义文案显示成功:"+error.description())
    }

    })
    }
    0
    Comment actions Permalink

Please sign in to leave a comment.

close