Skip to content

Commit

Permalink
fix: video replay
Browse files Browse the repository at this point in the history
  • Loading branch information
pobu168 committed Nov 4, 2024
1 parent 1993c5f commit be42ae6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ui/public/replay-page.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
</head>
<body>
<div id="app"></div>
<script>
<script src="./replay-page.js"></script>
<!-- <script>
const fileId = localStorage.getItem('fileId')
const token = localStorage.getItem('replayToken')
var headers = new Headers({
Expand All @@ -18,6 +19,6 @@
req,
div
)
</script>
</script> -->
</body>
</html>
10 changes: 10 additions & 0 deletions ui/public/replay-page.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const fileId = localStorage.getItem('fileId')
const token = localStorage.getItem('replayToken')
var headers = new Headers({
Authorization: 'Bearer ' + token
})
var req = new Request(`/terminal/v1/session-records/${fileId}/file`, { method: 'GET', headers: headers, mode: 'cors' })
const div = document.getElementById('app')
// eslint-disable-next-line no-undef
const player = new XtermPlayer.XtermPlayer(req, div)
console.log(player)

0 comments on commit be42ae6

Please sign in to comment.