Skip to content

$movie

12 natives. Read-only natives only look things up; the rest change something. Parameter types use the language's names (Types).

configure_audio

$movie.configure_audio(movie: Reference, input_buffer_size: int, input_buffer_count: int, frame_count: int)

Configures various properties about audio playback. Any configuration parameter not included or set to 0 will not change the relevant value. Must be called prior to any play functions.

ParameterTypeMeaning
movieReferenceThe movie playback object.
input_buffer_sizeintThe number of bytes to take as input per request.
input_buffer_countintThe number of input buffers to run in parallel.
frame_countintThe number of output audio frames to allocate.

configure_video

$movie.configure_video(movie: Reference, input_buffer_size: int, input_buffer_count: int, frame_count: int)

Configures various properties about video playback. Any configuration parameter not included or set to 0 will not change the relevant value. Must be called prior to any play functions.

ParameterTypeMeaning
movieReferenceThe movie playback object.
input_buffer_sizeintThe number of bytes to take as input per request.
input_buffer_countintThe number of input buffers to run in parallel.
frame_countintThe number of output video frames to allocate.

get

$movie.get(unique_id: int, dying: bool) -> Reference

Will get/create movie playback object. Must be called every frame (with dying=false) to keep playback alive.

ParameterTypeMeaning
unique_idintOptional unique identifier for multiple playback objects within a single component.
dyingboolIf true, this call will not create or keep alive playback objects but will return dying playback objects if not yet released. Do not use in draw functions.

Returns Reference: Movie object.

get_audio_frame_pending_count

$movie.get_audio_frame_pending_count(movie: Reference) -> int

Gets the number of audio frames ready to be output.

ParameterTypeMeaning
movieReferenceThe movie playback object.

Returns int: Number of audio frames ready to output.

get_is_finished

$movie.get_is_finished(movie: Reference) -> bool

Gets if all frames have been displayed and playback is complete.

ParameterTypeMeaning
movieReferenceThe movie playback object.

Returns bool: True if all frames have been displayed and playback is complete.

get_video_frame_pending_count

$movie.get_video_frame_pending_count(movie: Reference) -> int

Gets the number of video frames ready to be displayed.

ParameterTypeMeaning
movieReferenceThe movie playback object.

Returns int: Number of video frames ready to display.

set_is_looping

$movie.set_is_looping(movie: Reference, value: bool)

Determines if the movie will repeat when it gets to the end of playback. Must be called prior to any play functions.

ParameterTypeMeaning
movieReferenceThe movie playback object.
valueboolTrue to loop, false to end at the end of playback.

set_playback_asset

$movie.set_playback_asset(movie: Reference, asset: Reference)

Starts movie playback of a loaded asset. If called again, will switch the playback source.

ParameterTypeMeaning
movieReferenceThe movie playback object.
assetReferenceA pointer of type vmovie_asset_t to a loaded movie asset.

set_playback_file

$movie.set_playback_file(movie: Reference, path: string, source_type: int)

Starts movie playback of a local file. If called again, will switch the playback source.

ParameterTypeMeaning
movieReferenceThe movie playback object.
pathstringThe path to the movie.
source_typeintA value from vmovie_source_type_t representing what type of movie the file contains.

set_playback_url

$movie.set_playback_url(movie: Reference, url: string, source_type: int)

Starts movie playback of a file over the internet. If called again, will switch the playback source.

ParameterTypeMeaning
movieReferenceThe movie playback object.
urlstringThe url to the movie.
source_typeintA value from vmovie_source_type_t representing what type of movie the file contains.

set_restore_textures_after_last_video_frame

$movie.set_restore_textures_after_last_video_frame(movie: Reference, value: bool)

Determines if the final frame of the video should be held or if the original texture should be restored after video playback is complete. Must be called prior to any play functions.

ParameterTypeMeaning
movieReferenceThe movie playback object.
valueboolTrue to restore textures, false to hold last video frame.

was_created_this_frame

$movie.was_created_this_frame(movie: Reference) -> bool

Returns true if the movie playback object was created this frame.

ParameterTypeMeaning
movieReferenceThe movie playback object.

Returns bool: True if just created.