C# Class MediaPlayerCtrl

Inheritance: MonoBehaviour
Show file Open project: DiUS/3DiUS Class Usage Examples

Public Properties

Property Type Description
OnEnd VideoEnd
OnReady VideoReady
OnResize VideoResize
OnVideoError VideoError
OnVideoFirstFrameReady VideoFirstFrameReady
m_ScaleValue MEDIA_SCALE
m_TargetMaterial GameObject[]
m_bAutoPlay bool
m_bFullScreen bool
m_bInit bool
m_bLoop bool
m_bSupportRockchip bool
m_objResize GameObject[]
m_strFileName string

Public Methods

Method Description
Awake ( ) : void
DownloadStreamingVideoAndLoad ( string strURL ) : IEnumerator
DownloadStreamingVideoAndLoad2 ( string strURL ) : IEnumerator
GetCurrentSeekPercent ( ) : int
GetCurrentState ( ) : MEDIAPLAYER_STATE
GetDuration ( ) : int
GetSeekBarValue ( ) : float
GetSeekPosition ( ) : int
GetVideoHeight ( ) : int
GetVideoTexture ( ) : Texture2D
GetVideoWidth ( ) : int
Load ( string strFileName ) : void
OnApplicationPause ( bool bPause ) : void
OnApplicationQuit ( ) : void
OnDestroy ( ) : void
OnDisable ( ) : void
OnEnable ( ) : void
OnError ( MEDIAPLAYER_ERROR iCode, MEDIAPLAYER_ERROR iCodeExtra ) : void
Pause ( ) : void
Play ( ) : void
Resize ( ) : void
ResizeTexture ( ) : void
SeekTo ( int iSeek ) : void
SetSeekBarValue ( float fValue ) : void
SetSpeed ( float fSpeed ) : void

Sets the speed. Experimental API( PC&iOS support, support from Android version 6.0 or later)

SetVolume ( float fVolume ) : void
Start ( ) : void
Stop ( ) : void
UnLoad ( ) : void
Update ( ) : void

Private Methods

Method Description
Call_Destroy ( ) : void
Call_GetCurrentSeekPercent ( ) : int
Call_GetDuration ( ) : int
Call_GetError ( ) : int
Call_GetErrorExtra ( ) : int
Call_GetSeekPosition ( ) : int
Call_GetStatus ( ) : MEDIAPLAYER_STATE
Call_GetVideoHeight ( ) : int
Call_GetVideoWidth ( ) : int
Call_InitJniManager ( ) : void
Call_InitNDK ( ) : int
Call_IsUpdateFrame ( ) : bool
Call_Load ( string strFileName, int iSeek ) : bool
Call_Pause ( ) : void
Call_Play ( int iSeek ) : void
Call_RePlay ( ) : void
Call_Reset ( ) : void
Call_SetLooping ( bool bLoop ) : void
Call_SetNotReady ( ) : void
Call_SetRockchip ( bool bValue ) : void
Call_SetSeekPosition ( int iSeek ) : void
Call_SetSpeed ( float fSpeed ) : void
Call_SetSplitOBB ( bool bValue, string strOBBName ) : void
Call_SetUnityActivity ( ) : void
Call_SetUnityTexture ( int iTextureID ) : void
Call_SetVolume ( float fVolume ) : void
Call_SetWindowSize ( ) : void
Call_Stop ( ) : void
Call_UnLoad ( ) : void
Call_UpdateVideoTexture ( ) : void
CopyStreamingAssetVideoAndLoad ( string strURL ) : IEnumerator
EasyMovieTextureRender ( ) : IntPtr
GetJavaObject ( ) : AndroidJavaObject
InitNDK ( ) : void
VideoPlayerPluginCanOutputToTexture ( string videoURL ) : bool
VideoPlayerPluginCreateInstance ( ) : int
VideoPlayerPluginCurFrameTexture ( int iID ) : IntPtr
VideoPlayerPluginCurTimeSeconds ( int iID ) : float
VideoPlayerPluginDestroyInstance ( int iID ) : void
VideoPlayerPluginDurationSeconds ( int iID ) : float
VideoPlayerPluginError ( int iID ) : bool
VideoPlayerPluginExtents ( int iID, int &width, int &height ) : void
VideoPlayerPluginFinish ( int iID ) : bool
VideoPlayerPluginIsPlaying ( int iID ) : bool
VideoPlayerPluginLoadVideo ( int iID, string videoURL ) : void
VideoPlayerPluginPauseVideo ( int iID ) : void
VideoPlayerPluginPlayVideo ( int iID ) : void
VideoPlayerPluginPlayerReady ( int iID ) : bool
VideoPlayerPluginResumeVideo ( int iID ) : void
VideoPlayerPluginRewindVideo ( int iID ) : void
VideoPlayerPluginSeekToVideo ( int iID, float time ) : void
VideoPlayerPluginSetLoop ( int iID, bool bLoop ) : void
VideoPlayerPluginSetSpeed ( int iID, float fSpeed ) : void
VideoPlayerPluginSetTexture ( int iID, int iTextureID ) : void
VideoPlayerPluginSetVolume ( int iID, float fVolume ) : void
VideoPlayerPluginStopVideo ( int iID ) : void

Method Details

Awake() public method

public Awake ( ) : void
return void

DownloadStreamingVideoAndLoad() public method

public DownloadStreamingVideoAndLoad ( string strURL ) : IEnumerator
strURL string
return IEnumerator

DownloadStreamingVideoAndLoad2() public method

public DownloadStreamingVideoAndLoad2 ( string strURL ) : IEnumerator
strURL string
return IEnumerator

GetCurrentSeekPercent() public method

public GetCurrentSeekPercent ( ) : int
return int

GetCurrentState() public method

public GetCurrentState ( ) : MEDIAPLAYER_STATE
return MEDIAPLAYER_STATE

GetDuration() public method

public GetDuration ( ) : int
return int

GetSeekBarValue() public method

public GetSeekBarValue ( ) : float
return float

GetSeekPosition() public method

public GetSeekPosition ( ) : int
return int

GetVideoHeight() public method

public GetVideoHeight ( ) : int
return int

GetVideoTexture() public method

public GetVideoTexture ( ) : Texture2D
return UnityEngine.Texture2D

GetVideoWidth() public method

public GetVideoWidth ( ) : int
return int

Load() public method

public Load ( string strFileName ) : void
strFileName string
return void

OnApplicationPause() public method

public OnApplicationPause ( bool bPause ) : void
bPause bool
return void

OnApplicationQuit() public method

public OnApplicationQuit ( ) : void
return void

OnDestroy() public method

public OnDestroy ( ) : void
return void

OnDisable() public method

public OnDisable ( ) : void
return void

OnEnable() public method

public OnEnable ( ) : void
return void

OnError() public method

public OnError ( MEDIAPLAYER_ERROR iCode, MEDIAPLAYER_ERROR iCodeExtra ) : void
iCode MEDIAPLAYER_ERROR
iCodeExtra MEDIAPLAYER_ERROR
return void

Pause() public method

public Pause ( ) : void
return void

Play() public method

public Play ( ) : void
return void

Resize() public method

public Resize ( ) : void
return void

ResizeTexture() public method

public ResizeTexture ( ) : void
return void

SeekTo() public method

public SeekTo ( int iSeek ) : void
iSeek int
return void

SetSeekBarValue() public method

public SetSeekBarValue ( float fValue ) : void
fValue float
return void

SetSpeed() public method

Sets the speed. Experimental API( PC&iOS support, support from Android version 6.0 or later)
public SetSpeed ( float fSpeed ) : void
fSpeed float video playback speed.
return void

SetVolume() public method

public SetVolume ( float fVolume ) : void
fVolume float
return void

Start() public method

public Start ( ) : void
return void

Stop() public method

public Stop ( ) : void
return void

UnLoad() public method

public UnLoad ( ) : void
return void

Update() public method

public Update ( ) : void
return void

Property Details

OnEnd public property

public VideoEnd OnEnd
return VideoEnd

OnReady public property

public VideoReady OnReady
return VideoReady

OnResize public property

public VideoResize OnResize
return VideoResize

OnVideoError public property

public VideoError OnVideoError
return VideoError

OnVideoFirstFrameReady public property

public VideoFirstFrameReady OnVideoFirstFrameReady
return VideoFirstFrameReady

m_ScaleValue public property

public MEDIA_SCALE m_ScaleValue
return MEDIA_SCALE

m_TargetMaterial public property

public GameObject[] m_TargetMaterial
return GameObject[]

m_bAutoPlay public property

public bool m_bAutoPlay
return bool

m_bFullScreen public property

public bool m_bFullScreen
return bool

m_bInit public property

public bool m_bInit
return bool

m_bLoop public property

public bool m_bLoop
return bool

m_bSupportRockchip public property

public bool m_bSupportRockchip
return bool

m_objResize public property

public GameObject[] m_objResize
return GameObject[]

m_strFileName public property

public string m_strFileName
return string