Merge branch 'main' of http://113.45.157.195:3003/insiinc/re-mooc
This commit is contained in:
commit
8895845c26
|
@ -12,6 +12,7 @@ export class VideoProcessor extends BaseProcessor {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
async process(resource: Resource): Promise<Resource> {
|
async process(resource: Resource): Promise<Resource> {
|
||||||
|
console.log('process');
|
||||||
const { url } = resource;
|
const { url } = resource;
|
||||||
const filepath = getUploadFilePath(url);
|
const filepath = getUploadFilePath(url);
|
||||||
this.logger.log(
|
this.logger.log(
|
||||||
|
@ -114,6 +115,7 @@ export class VideoProcessor extends BaseProcessor {
|
||||||
filepath: string,
|
filepath: string,
|
||||||
outputDir: string,
|
outputDir: string,
|
||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
|
console.log('outputDir', outputDir);
|
||||||
const m3u8Path = path.join(outputDir, 'index.m3u8');
|
const m3u8Path = path.join(outputDir, 'index.m3u8');
|
||||||
this.logger.log(
|
this.logger.log(
|
||||||
`Generating M3U8 stream for video: ${filepath}, Output Dir: ${outputDir}`,
|
`Generating M3U8 stream for video: ${filepath}, Output Dir: ${outputDir}`,
|
||||||
|
|
|
@ -11,9 +11,6 @@ export class VisitService extends BaseService<Prisma.VisitDelegate> {
|
||||||
const { postId, lectureId, messageId } = args.data;
|
const { postId, lectureId, messageId } = args.data;
|
||||||
const visitorId = args.data?.visitorId || staff?.id;
|
const visitorId = args.data?.visitorId || staff?.id;
|
||||||
let result;
|
let result;
|
||||||
console.log(args.data.type);
|
|
||||||
console.log(visitorId);
|
|
||||||
console.log(postId);
|
|
||||||
const existingVisit = await db.visit.findFirst({
|
const existingVisit = await db.visit.findFirst({
|
||||||
where: {
|
where: {
|
||||||
type: args.data.type,
|
type: args.data.type,
|
||||||
|
@ -21,10 +18,8 @@ export class VisitService extends BaseService<Prisma.VisitDelegate> {
|
||||||
OR: [{ postId }, { messageId }],
|
OR: [{ postId }, { messageId }],
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
console.log('result', existingVisit);
|
|
||||||
if (!existingVisit) {
|
if (!existingVisit) {
|
||||||
result = await super.create(args);
|
result = await super.create(args);
|
||||||
console.log('createdResult', result);
|
|
||||||
} else if (args.data.type === VisitType.READED) {
|
} else if (args.data.type === VisitType.READED) {
|
||||||
result = await super.update({
|
result = await super.update({
|
||||||
where: { id: existingVisit.id },
|
where: { id: existingVisit.id },
|
||||||
|
|
|
@ -128,7 +128,7 @@ export class TusService implements OnModuleInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
async handleTus(req: Request, res: Response) {
|
async handleTus(req: Request, res: Response) {
|
||||||
console.log(req)
|
// console.log(req)
|
||||||
return this.tusServer.handle(req, res);
|
return this.tusServer.handle(req, res);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -100,7 +100,7 @@ server {
|
||||||
# 仅供内部使用
|
# 仅供内部使用
|
||||||
internal;
|
internal;
|
||||||
# 代理到认证服务
|
# 代理到认证服务
|
||||||
proxy_pass http://host.docker.internal:3000/auth/file;
|
proxy_pass http://host.docker.internal:3006/auth/file;
|
||||||
|
|
||||||
# 请求优化:不传递请求体
|
# 请求优化:不传递请求体
|
||||||
proxy_pass_request_body off;
|
proxy_pass_request_body off;
|
||||||
|
|
|
@ -1,24 +1,27 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
<head>
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<script>
|
<script>
|
||||||
window.env = {
|
window.env = {
|
||||||
VITE_APP_SERVER_IP: "$VITE_APP_SERVER_IP",
|
VITE_APP_SERVER_IP: "192.168.139.239",
|
||||||
VITE_APP_APP_NAME: "$VITE_APP_APP_NAME",
|
VITE_APP_SERVER_PORT: "3006",
|
||||||
VITE_APP_VERSION: "$VITE_APP_VERSION",
|
VITE_APP_FILE_PORT: "8092",
|
||||||
|
VITE_APP_VERSION: "0.3.0",
|
||||||
|
VITE_APP_APP_NAME: "烽火慕课",
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<title>fhmooc</title>
|
<title>fhmooc</title>
|
||||||
<script type="module" crossorigin src="/assets/index-C6LPy0O3.js"></script>
|
<script
|
||||||
<link rel="stylesheet" crossorigin href="/assets/index-CjRG4jbI.css">
|
type="module"
|
||||||
</head>
|
crossorigin
|
||||||
|
src="/assets/index-C6LPy0O3.js"></script>
|
||||||
|
<link rel="stylesheet" crossorigin href="/assets/index-CjRG4jbI.css" />
|
||||||
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
Loading…
Reference in New Issue