mirror of
https://github.com/BililiveRecorder/BililiveRecorder.git
synced 2024-12-26 20:26:00 +08:00
183 lines
3.8 KiB
HTML
183 lines
3.8 KiB
HTML
<!DOCTYPE html>
|
||
<html>
|
||
|
||
<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
|
||
}
|
||
}</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
|
||
}
|
||
}
|
||
</textarea>
|
||
</div>
|
||
<div>
|
||
<h3>添加一个房间</h3><textarea>
|
||
mutation {
|
||
addRoom(roomId: 3, autoRecord: false) {
|
||
objectId
|
||
shortId
|
||
roomConfig {
|
||
roomId
|
||
autoRecord
|
||
}
|
||
}
|
||
}
|
||
</textarea>
|
||
</div>
|
||
<div>
|
||
<h3>添加一个房间,用变量传参版</h3><textarea>
|
||
mutation AddRoom($roomid: Int, $autoRecord: Boolean) {
|
||
addRoom(roomId: $roomid, autoRecord: $autoRecord) {
|
||
objectId
|
||
shortId
|
||
roomConfig {
|
||
roomId
|
||
autoRecord
|
||
}
|
||
}
|
||
}
|
||
</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
|
||
}
|
||
}
|
||
}
|
||
</textarea>
|
||
</div>
|
||
<div>开始录制、结束录制、手动切分,都是 mutation,在 graphql 文档页面里可以看到</div>
|
||
</div>
|
||
</body>
|
||
|
||
</html>
|