My Project
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Properties | List of all members
ProGifPlayer Class Reference

Public Member Functions

void Play (ProGifRecorder recorder, UnityEngine.UI.Image destination, bool optimizeMemoryUsage)
 Play gif frames in the specified recorder, display with image.
 
void Play (ProGifRecorder recorder, Renderer destination, bool optimizeMemoryUsage)
 Play gif frames in the specified recorder, display with renderer.
 
void Play (ProGifRecorder recorder, RawImage destination, bool optimizeMemoryUsage)
 Play gif frames in the specified recorder, display with RawImage.
 
void Pause ()
 
void Resume ()
 
void Stop ()
 
int Reverse ()
 Reverse the gif texture list. You can use this method to implement a reverse playback mode. Call this again to set back to normal playback direction. Also make sure all textures imported/loaded to the player first.
 
void PingPong ()
 Sets the target gif player to play with ping-pong play mode. This method utilizes the OnPlayingCallback. Please make sure not to override the callback. Also make sure all textures imported/loaded to the player first.
 
void CancelPingPong ()
 
void SetLoadingCallback (Action< float > onLoading)
 Set the callback for checking the texture import progress for gif instant preview.
 
void SetOnFirstFrameCallback (Action< ProGifPlayerComponent.FirstGifFrame > onFirstFrame)
 Set the callback to be fired when the first gif frame ready. If using a recorder source for playback, this becomes a loading-complete callback with the first GIF frame returned.
 
void SetOnPlayingCallback (Action< GifTexture > onPlaying)
 Set the callback to be fired on every frame during play gif.
 
void ChangeDestination (UnityEngine.UI.Image destination)
 Change the destination image for displaying gif.
 
void ChangeDestination (Renderer destination)
 Change the destination renderer for displaying gif.
 
void AddExtraDestination (UnityEngine.UI.Image destination)
 Add an extra destination image for displaying gif.
 
void AddExtraDestination (Renderer destination)
 Add an extra destination renderer for displaying gif.
 
void RemoveFromExtraDestination (UnityEngine.UI.Image destination)
 Remove a specific extra destination image from the extra list.
 
void RemoveFromExtraDestination (Renderer destination)
 Remove a specific extra destination renderer from the extra list.
 
void Clear ()
 Clear this instance, clear all textures/sprites.
 

Public Attributes

ImageRotator.Rotation rotation = ImageRotator.Rotation.None
 
string savePath = ""
 
bool isReversed = false
 
bool isPingPong = false
 

Properties

ProGifPlayerComponent playerComponent [get]
 
ProGifPlayerComponent.PlayerState State [get]
 
int width [get]
 Gif width (only available after the first gif frame is loaded)
 
int height [get]
 Gif height (only available after the first gif frame is loaded)
 
List< GifTexturegifTextures [get]
 Decoded gif texture list (get all the gif textures at the decoding process finished)
 

Member Function Documentation

◆ CancelPingPong()

void ProGifPlayer.CancelPingPong ( )
inline

Cancel the ping-pong play mode if any. This method will clear the OnPlayingCallback.

◆ Reverse()

int ProGifPlayer.Reverse ( )
inline

Reverse the gif texture list. You can use this method to implement a reverse playback mode. Call this again to set back to normal playback direction. Also make sure all textures imported/loaded to the player first.

Returns

◆ SetLoadingCallback()

void ProGifPlayer.SetLoadingCallback ( Action< float >  onLoading)
inline

Set the callback for checking the texture import progress for gif instant preview.

Parameters
onLoadingOn loading callback, returns the texture import progress(float).

◆ SetOnFirstFrameCallback()

void ProGifPlayer.SetOnFirstFrameCallback ( Action< ProGifPlayerComponent::FirstGifFrame onFirstFrame)
inline

Set the callback to be fired when the first gif frame ready. If using a recorder source for playback, this becomes a loading-complete callback with the first GIF frame returned.

Parameters
onFirstFrameOn first frame callback, returns the first gifTexture and related data.

◆ SetOnPlayingCallback()

void ProGifPlayer.SetOnPlayingCallback ( Action< GifTexture onPlaying)
inline

Set the callback to be fired on every frame during play gif.

Parameters
onPlayingOn playing callback, returns the gifTexture of the current playing frame.

The documentation for this class was generated from the following file: