Skip to main content

Mp4TextureProvider

APJS Script API reference for the Mp4TextureProvider class.

TypeNameInterface Description
VariablescurrentTime: number

Function: currentTime

Variablesduration: number

Function: duration

VariablesloopCount: number

Function: Gets the number of times the video will loop. -1 means infinite loop.

Functionspause(): void

Function: Pauses video playback at the current position.

Functionsplay(): void

Function: Starts video playback from the beginning.

Functionsresume(): void

Function: Resumes paused video playback.

Functionsstop(): void

Function: Stops video playback and resets to initial state.

Use Case

@component()
export class NewBehaviourScript extends APJS.BasicScriptComponent {
onStart() {
// TODO: instantiate / use Mp4TextureProvider here
}
onUpdate(deltaTime: number) {
}
}
Copyright © 2026 TikTok. All rights reserved.
About TikTokHelp CenterCareersContactLegalTerms of ServicePrivacy PolicyCookies