BililiveRecorder/BililiveRecorder.Web/embeded/index.html

183 lines
3.8 KiB
HTML
Raw Normal View History

2022-06-04 03:39:33 +08:00
<!DOCTYPE html>
<html>
2022-06-04 03:39:33 +08:00
<head>
<meta charset=utf-8>
<meta content="width=device-width,initial-scale=1" name=viewport>
<title>B站录播姬</title>
<style>
a {
margin: 5px
}
textarea {
width: 300px;
height: 200px
}
</style>
</head>
<body>
<h1>B站录播姬</h1>
<p>
<span style="color:red;font-weight:700">录播姬管理界面</span>
<a href="/ui">WebUI</a>
</p>
<p>
<span style="color:red;font-weight:700">REST API 界面</span>
<a href="/swagger">Swagger</a>
</p>
<p>
<span style="color:red;font-weight:700">GraphiQL API 界面</span>
<a href="/graphql/graphiql">GraphiQL</a>
<a href="/graphql/playground">Playground</a>
<a href="/graphql/altair">Altair</a>
<a href="/graphql/voyager">Voyager</a>
</p>
<p>录播姬 API 里的 objectId 在重启后会重新生成,是不保存到配置文件里的</p>
<div>
<hr style="margin-top: 50px;">
<h2>GraphQL API 用法示例</h2>
<p>
graphql 的<b>语法</b>请查看官方文档
<a href="https://graphql.org/learn/">https://graphql.org/learn/</a>
或中文翻译镜像
<a href="https://graphql.cn/learn/">https://graphql.cn/learn/</a>
</p>x
<div>
<h3>列出所有直播间和基本信息</h3>
<textarea>
query {
rooms {
objectId
roomConfig {
roomId
autoRecord
}
shortId
name
streaming
title
areaNameParent
areaNameChild
}
2022-06-04 03:39:33 +08:00
}</textarea>
</div>
<div>
<h3>列出所有直播间的所有信息截至编写此页面时具体最新属性见API界面的文档</h3><textarea>
query {
rooms {
objectId
shortId
recording
roomConfig {
roomId
autoRecord
optionalRecordingQuality {
value
hasValue
}
optionalRecordMode {
value
hasValue
}
optionalRecordDanmakuSuperChat {
value
hasValue
}
optionalRecordDanmakuRaw {
value
hasValue
}
optionalRecordDanmakuGuard {
value
hasValue
}
optionalRecordDanmakuGift {
value
hasValue
}
optionalRecordDanmaku {
value
hasValue
}
optionalCuttingNumber {
value
hasValue
}
optionalCuttingMode {
value
hasValue
}
}
stats {
durationRatio
fileMaxTimestamp
networkMbps
sessionDuration
totalInputBytes
sessionMaxTimestamp
totalOutputBytes
}
streaming
title
name
danmakuConnected
autoRecordForThisSession
areaNameParent
areaNameChild
}
}
2022-06-04 03:39:33 +08:00
</textarea>
</div>
<div>
<h3>添加一个房间</h3><textarea>
mutation {
addRoom(roomId: 3, autoRecord: false) {
objectId
shortId
roomConfig {
roomId
autoRecord
}
}
}
2022-06-04 03:39:33 +08:00
</textarea>
</div>
<div>
<h3>添加一个房间,用变量传参版</h3><textarea>
mutation AddRoom($roomid: Int, $autoRecord: Boolean) {
addRoom(roomId: $roomid, autoRecord: $autoRecord) {
objectId
shortId
roomConfig {
roomId
autoRecord
}
}
}
2022-06-04 03:39:33 +08:00
</textarea> <textarea>{'roomid': 4, 'autoRecord': false}</textarea>
</div>
<div>
<h3>启用自动录制</h3><textarea>
mutation {
setRoomConfig(roomId: 3, config: { autoRecord: true }) {
objectId
shortId
recording
roomConfig {
roomId
autoRecord
}
}
}
2022-06-04 03:39:33 +08:00
</textarea>
</div>
<div>开始录制、结束录制、手动切分,都是 mutation在 graphql 文档页面里可以看到</div>
</div>
</body>
</html>