as

Settings
Sign out
Notifications
Alexa
亚马逊应用商店
Ring
AWS
文档
Support
Contact Us
My Cases
新手入门
设计和开发
应用发布
参考
支持
Skip to main content
Video是实现HTMLVideoElement接口的React Native组件,该接口可扩展HTMLMediaElement接口。

扩展

实现

构造函数

new Video()

new Video(props): Video

参数

props
any

返回值

Video

方法

componentDidMount()

componentDidMount(): void

componentDidUpdate()

componentDidUpdate(prevProps: any): void

参数

prevProps
any

componentWillUnmount()

componentWillUnmount(): void

destroyMediaPlayerSync()

destroyMediaPlayerSync(timeoutInMs: number): NativeInterfaces.MediaPlayerDeInitStatus 同步取消播放器初始化

参数

timeoutInMs
number 客户端设置的超时时间阈值

返回值

NativeInterfaces.MediaPlayerDeInitStatus MediaPlayerDeInitStatus

getVideoPlaybackQuality()

getVideoPlaybackQuality(): VideoPlaybackQuality 获取视频播放质量属性。

返回值

VideoPlaybackQuality

handleEvent()

handleEvent(event: NativeInterfaces.NativeMediaElementEvent): void

参数

event
NativeInterfaces.NativeMediaElementEvent

onSurfaceCreated()

onSurfaceCreated(surfaceHandle: string): void

参数

surfaceHandle
string

onSurfaceDestroyed()

onSurfaceDestroyed(surfaceHandle: string): void

参数

surfaceHandle
string

onSurfaceMounted()

onSurfaceMounted(): void

onSurfaceUnmounted()

onSurfaceUnmounted(): void

render()

render(): any

返回值

any
最后修改于 2026年10月26日