package com.fastbee.data.controller.media;

import com.fastbee.common.core.controller.BaseController;
import com.fastbee.common.core.domain.AjaxResult;
import com.fastbee.deviceData.api.yingshiyun.service.YingshiyunService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/media/yingshiyun")
public class YingshiyunVideoController extends BaseController {

    @Autowired
    private YingshiyunService yingshiyunService;


    /**
     * 获取视频播放地址
     * @param deviceSerial 设备的序列号/编号
     * @return 视频播放地址
     */
    @GetMapping("/videoPlayUrl/get")
    public AjaxResult getVideoUrl(String deviceSerial){
        return success(yingshiyunService.getVideoPlayUrl(deviceSerial));
    }
}
