Hulian UIv0.93.5413 components0 components
  • Start
  • Components
  • Blocks
  • Pages
  • Demos
  • Changelog
ChineseEnglish
  • ComponentsComponents
  • ThemeTheme

Collections

  • QuestionCard
  • Table
  • Book3D
  • ProTable
  • PricingTable
  • JsonViewer
  • EditableTable
  • List
  • Descriptions
  • RowActions
  • Tree
  • Card
  • Carousel
  • Video
  • Audio
  • BentoGrid
  • Image
  • MagicCard
  • AnimatedList
  • Marquee
  • Sortable
  • Kanban
  • DesignCanvas
  • LayerTree
  • StageDraw
  • SlideDeck
  • PresenterView
  • ComponentPicker
  • EventStream
  • QueueLane
  • DocumentSheet
  • Novel reader
  • Scheduler
  • Org classroom
  • Danmaku
  • LiveChat
  • LivePlayer
  • LogViewer
  • FileTree
  • CodeReviewThread
  • VirtualList
  • InfiniteScroll
  • LogoLoop
  • BounceCards
  • CardSwap
  • ChromaGrid
  • CircularGallery
  • DomeGallery
  • FlyingPosters
  • InfiniteMenu
  • MagicBento
  • ScrollStack
  • ProfileCard
  • TiltedCard
  • PixelCard
  • DecayCard
  • ReflectiveCard
  • Folder

Charts and Diagrams

  • Flow
  • Diagram
  • Paper
  • SequenceDiagram
  • Sankey
  • Sparkline
  • Funnel
  • Treemap
  • Gantt
  • Heatmap
  • ContributionGraph
  • Legend
  • Chart
  • WorldMap

Information

  • ImageViewer
  • LiveProductCard
  • DiffStat
  • ScoreRing
  • ScoreScale
  • Badge
  • Dot
  • StatusDot
  • Chip
  • FilterChip
  • Coupon
  • Tag
  • Annotation
  • Avatar
  • AvatarCircles
  • User
  • QRCode
  • Comment
  • RelativeTime
  • GitCommit
  • DeployStatus
  • ShieldBadge
  • AwardBadge
  • CreditCard
  • IconTile

Metrics

  • Stat
  • Statistic
  • Meter
  • Timeline
  • NumberTicker

Placeholders

  • Empty
  • Skeleton
  • Watermark

LivePlayer

live-player

Presents a live video surface with status, viewer count, controls, and overlays.

Usage

Basic usage

Pass src and play (internally fixed muted/loop/autoPlay); LIVE breathing logo is turned on by default.

LIVE0
tsx
<div className="w-full max-w-xl">
  <LivePlayer src="/stream.mp4" viewers={12840} />
</div>

Anchor strip + follow

host incoming anchor information; when onFollow is used, the follow button is rendered, and followed is switched to "Followed".

H
Hanxuan Premium·Anchor A Nan
Followers 28.6w
LIVE0
tsx
<LivePlayer
  src="/stream.mp4"
  viewers={12840}
  host={{
    name: "Excellent products·Anchor Anan",
    meta: "Fan 28.6w",
    onFollow: () => follow(),
  }}
/>

Clarity menu + bottom interactive bar

qualities rendering resolution switching menu; footer slot for interactive bar. A full controlled example can be found below.

H
Hanxuan Premium·Anchor A Nan
Followers 28.6w
LIVE0
Say something...
tsx
<LivePlayer
  src="/stream.mp4"
  viewers={12840}
  qualities={["Blu-ray", "UHD", "HD", "SD"]}
  quality={quality}
  onQualityChange={setQuality}
  host={{ name: "Anchor Anan", meta: "Fans 28.6w", followed, onFollow }}
  footer={<div className="bg-gradient-to-t from-black/50 to-transparent p-3 text-xs text-white/80">Say something...</div>}
/>

Vertical screen immersion

orientation="portrait" Lock 9/16 vertical screen ratio, for mobile live broadcast room.

H
Hanxuan Premium·Anchor A Nan
Followers 28.6w
LIVE0
Say something...
tsx
<div className="w-56">
  <LivePlayer src="/stream.mp4" orientation="portrait" viewers={12840} />
</div>

When to use

Use LivePlayer for livestream semantics without VOD scrubber controls. Use Video for seekable playback. Pair overlay with Danmaku.

Import

ts
import { LivePlayer } from "@hulianui/ui"

Props

NameTypeDefaultDescription
srcstring-Video source played muted, looping, autoplay, and inline.
posterstring-Poster image.
livebooleantrueShows the LIVE badge.
viewersnumber-Animated viewer count.
qualitiesstring[]-Quality options.
qualitystring-Controlled current quality.
hostLivePlayerHost-Host row.
orientation"portrait" | "landscape""landscape"Layout orientation.
aspectRatiostring-CSS ratio; defaults to 16/9 or 9/16, while "fill" fills the parent.
classNamestring-Container class.

Events

EventTypeDescription
onQualityChange(q: string) => voidQuality selection.

Slots

SlotTypeDescription
surfaceReactNodeCustom scene taking precedence over src.
overlayReactNodeDanmaku, reactions, or gifts above the scene.
footerReactNodeInteraction bar.

LivePlayerHost is { name; avatar?; followed?; onFollow?; meta? }; the follow control appears only with onFollow.

Example

tsx
<LivePlayer src="/stream.mp4" viewers={12840}
  qualities={["Blu-ray", "Ultra", "HD"]} quality={quality} onQualityChange={setQuality}
  host={{ name: "Host Nan", meta: "286K followers", followed, onFollow: () => setFollowed(true) }}
  overlay={<Danmaku items={items} />} footer={<InteractionBar />} />

Usage notes

  • Quality is controlled; write changes back.
  • Omit host.onFollow for display-only host details.
  • Surface overrides src. The built-in video intentionally exposes no VOD controls.
  • Follow-state copy follows ConfigProvider locale; enUS provides “+ Follow / Following”, and the no-provider fallback remains Chinese.

Related

Table · Book3D · ProTable · PricingTable · JsonViewer · EditableTable

PreviousLiveChatData DisplayNextLiveProductCard

On this page

  • Usage
  • Documentation
    • When to use
    • Import
    • Props
    • Events
    • Slots
    • Example
    • Usage notes
    • Related