Browse Source

#297

feature/297
みてるぞ 5 days ago
parent
commit
83c801d8ce
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      frontend/src/pages/theatres/TheatreDetailPage.tsx

+ 6
- 2
frontend/src/pages/theatres/TheatreDetailPage.tsx View File

@@ -150,7 +150,7 @@ export default (() => {
} }


tick () tick ()
const interval = setInterval (() => tick (), 1_000)
const interval = setInterval (() => tick (), 5_000)


return () => { return () => {
cancelled = true cancelled = true
@@ -188,6 +188,9 @@ export default (() => {
}, [id, loading, theatreInfo.hostFlg, theatreInfo.postId]) }, [id, loading, theatreInfo.hostFlg, theatreInfo.postId])


useEffect (() => { useEffect (() => {
setPost (null)
setVideoLength (0)

if (theatreInfo.postId == null) if (theatreInfo.postId == null)
return return


@@ -209,7 +212,7 @@ export default (() => {
return () => { return () => {
cancelled = true cancelled = true
} }
}, [theatreInfo.postId, theatreInfo.postStartedAt])
}, [theatreInfo.postId])


const syncPlayback = (meta: NiconicoMetadata) => { const syncPlayback = (meta: NiconicoMetadata) => {
if (!(theatreInfo.postStartedAt)) if (!(theatreInfo.postStartedAt))
@@ -244,6 +247,7 @@ export default (() => {
{post ? ( {post ? (
<> <>
<PostEmbed <PostEmbed
key={post ? `${ post.id }:${ theatreInfo.postStartedAt ?? '' }` : 'empty'}
ref={embedRef} ref={embedRef}
post={post} post={post}
onLoadComplete={info => { onLoadComplete={info => {


Loading…
Cancel
Save