finish user
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
import type { Route } from './+types'
|
||||
|
||||
import lzwCompress from 'lzwcompress'
|
||||
import { useBlocker, useFetcher } from 'react-router'
|
||||
|
||||
import { HttpMethod, request as req } from '@repo/util/request'
|
||||
import { useFetcher } from 'react-router'
|
||||
|
||||
import { ScormPlayer, type ScormVersion } from '@/components/scorm-player'
|
||||
// import { RrwebRecorder } from '@/components/rrweb-recorder'
|
||||
import { ScormPlayer } from '@/components/scorm-player'
|
||||
// import { useLocalStorage } from '@/hooks/useLocalStorage'
|
||||
// import SHA256 from 'crypto-js/sha256'
|
||||
|
||||
@@ -64,24 +63,32 @@ export default function Route({ loaderData: { data } }: Route.ComponentProps) {
|
||||
// console.log(d2?.progress?.p ?? null)
|
||||
|
||||
return (
|
||||
<ScormPlayer
|
||||
settings={{
|
||||
autocommit: true,
|
||||
throwExceptions: false,
|
||||
logLevel: 2,
|
||||
compatibilityMode: 1
|
||||
}}
|
||||
scormVersion="2004"
|
||||
scormState={scormState}
|
||||
scormContentPath={course.scormContentPath}
|
||||
className="w-full h-full border-0"
|
||||
onCommit={async (data) => {
|
||||
console.log(data)
|
||||
await fetcher.submit(JSON.stringify(data), {
|
||||
method: 'post',
|
||||
encType: 'application/json'
|
||||
})
|
||||
}}
|
||||
/>
|
||||
<>
|
||||
{/* <RrwebRecorder
|
||||
onEventBatch={(data) => {
|
||||
console.log(JSON.stringify(data))
|
||||
}}
|
||||
/>*/}
|
||||
|
||||
<ScormPlayer
|
||||
settings={{
|
||||
autocommit: true
|
||||
// throwExceptions: false,
|
||||
// logLevel: 2,
|
||||
// compatibilityMode: 1
|
||||
}}
|
||||
scormVersion="2004"
|
||||
scormState={scormState}
|
||||
scormContentPath={course.scormContentPath}
|
||||
className="w-full h-full border-0"
|
||||
onCommit={async (data) => {
|
||||
console.log(data)
|
||||
await fetcher.submit(JSON.stringify(data), {
|
||||
method: 'post',
|
||||
encType: 'application/json'
|
||||
})
|
||||
}}
|
||||
/>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user