package cn.reghao.oss.web.app.service.media;

import cn.reghao.oss.api.dto.media.VideoInfo;
import cn.reghao.oss.api.dto.media.VideoUrlDto;
import cn.reghao.oss.api.iface.media.VideoFileService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author reghao
 * @date 2024-02-23 08:55:03
 */
@Service
public class VideoService {
    @DubboReference(check = false)
    private VideoFileService videoFileService;

    public void deleteVideoFile(String videoFileId) {
        videoFileService.deleteVideoFile(videoFileId);
    }

    public VideoInfo getVideoInfo(String videoFileId) {
        return videoFileService.getVideoInfo(videoFileId);
    }

    public List<VideoUrlDto> getVideoUrls(String videoFileId, long loginUser) {
        return videoFileService.getVideoUrls(videoFileId, loginUser);
    }

    public LocalDateTime getCreateTime(String videoFileId) {
        return videoFileService.getCreateTime(videoFileId);
    }
}
