package cn.iocoder.yudao.module.smartfactory.constant;

import com.hikvision.artemis.sdk.config.ArtemisConfig;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.CommandLineRunner;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

@Configuration
@Slf4j
public class ArtemisApiConstant implements CommandLineRunner {

    public static String camerasApi;
    public static String previewUrlsApi;
    public static String replayUrlApi;

    public static String operateUrlApi = "/artemis/api/video/v1/ptzs/controlling";

    @Value("${resource.cameras}")
    public void setCamerasApi(String a) {
        camerasApi = a;
    }

    @Value("${video.previewUrls}")
    public void setPreviewUrls(String a) {
        previewUrlsApi = a;
    }

    @Value("${video.replayUrlApi}")
    public void setReplayUrlApi(String a) {
        replayUrlApi = a;
    }

    @Override
    public void run(String... args) throws Exception {
        log.info("# 【ArtemisApiConstant】 camerasApi：{} #", camerasApi);
        log.info("# 【ArtemisApiConstant】 previewUrlsApi：{} #", previewUrlsApi);
        log.info("# 【ArtemisApiConstant】 replayUrlApi：{} #", replayUrlApi);
    }


}
