GvrVideoPlayerTexture
Plays video using Exoplayer rendering it on the main texture.
Summary
Inheritance
Inherits from: MonoBehaviour
Public types |
|
---|---|
StereoMode{
|
enum Stereo mode formats. |
VideoEvents{
|
enum Video events. |
VideoPlayerState{
|
enum Video player state. |
VideoResolution{
|
enum Video resolutions which can be selected as the initial resolution when streaming begins. |
VideoType{
|
enum Video type. |
Public attributes |
|
---|---|
adjustAspectRatio
|
bool
Value
true indicates that the aspect ratio of the renderer needs adjusting. |
initialResolution = VideoResolution.Highest
|
The video resolution used when streaming begins.
|
statusText
|
Text
Attach a text component to get some debug status info.
|
useSecurePath
|
bool
Whether to use secure path for DRM protected video.
|
videoContentID
|
string
The video content ID.
|
videoProviderId
|
string
The video provider ID.
|
videoType
|
The type of the video.
|
videoURL
|
string
The video URL.
|
Properties |
|
---|---|
AspectRatio
|
float
Gets the aspect ratio of the texture.
|
BufferedPercentage
|
int
Gets the buffered percentage of the video stream.
|
BufferedPosition
|
long
Gets the buffered position in seconds of the video stream.
|
CurrentFrameTexture
|
Texture
Gets the current frame texture.
|
CurrentPosition
|
long
Gets or sets the current position in seconds in the video stream.
|
CurrentStereoMode
|
Gets the current stereo mode.
|
CurrentVolume
|
int
Gets or sets the current volume setting.
|
HasProjection
|
bool
Gets a value indicating whether the video has a projection.
|
Height
|
int
Gets the height of the texture.
|
IsPaused
|
bool
Gets a value indicating whether the video is paused.
|
MaxVolume
|
int
Gets the maximum volume value which can be set.
|
PlayerState
|
Gets the player state.
|
Screen
|
Renderer
Gets or sets the renderer for the video texture.
|
VideoDuration
|
long
Gets the duration in seconds of the video stream.
|
VideoReady
|
bool
Gets a value indicating whether the video is ready to be played.
|
Width
|
int
Gets the width of the texture.
|
Public functions |
|
---|---|
CleanupVideo()
|
void
Cleans up the current video player and texture.
|
Init()
|
bool
Initialize the video player.
|
Pause()
|
bool
Pauses video playback.
|
Play()
|
bool
Play the video.
|
ReInitializeVideo()
|
void
Reinitializes the current video player or creates one if there is no player.
|
RemoveOnVideoEventCallback(Action< int > callback)
|
void
Removes the callback for exceptions.
|
RestartVideo()
|
void
Resets the video player.
|
SetCurrentVolume(int val)
|
void
Set the volume level.
|
SetDisplayTexture(Texture texture)
|
void
Sets the display texture.
|
SetOnExceptionCallback(Action< string, string > callback)
|
void
Sets the callback for exceptions.
|
SetOnVideoEventCallback(Action< int > callback)
|
void
Sets the callback for video events.
|
Public types
StereoMode
StereoMode
VideoEvents
VideoEvents
Video events.
VideoPlayerState
VideoPlayerState
VideoResolution
VideoResolution
VideoType
VideoType
Public attributes
adjustAspectRatio
bool adjustAspectRatio
Value true
indicates that the aspect ratio of the renderer needs adjusting.
initialResolution
VideoResolution initialResolution = VideoResolution.Highest
The video resolution used when streaming begins.
For multi-rate streams like Dash and HLS, the stream used at the beginning of playback is selected such that its vertical resolution is greater than or equal to this value.
After streaming begins, the player auto-selects the highest rate stream the network connection is capable of delivering.
statusText
Text statusText
Attach a text component to get some debug status info.
useSecurePath
bool useSecurePath
Whether to use secure path for DRM protected video.
videoContentID
string videoContentID
The video content ID.
videoProviderId
string videoProviderId
The video provider ID.
videoURL
string videoURL
The video URL.
Properties
AspectRatio
float AspectRatio
Gets the aspect ratio of the texture.
The aspect ratio of the texture.
BufferedPercentage
int BufferedPercentage
Gets the buffered percentage of the video stream.
The buffered percentage of the video stream.
BufferedPosition
long BufferedPosition
Gets the buffered position in seconds of the video stream.
The buffered position in seconds of the video stream.
CurrentFrameTexture
Texture CurrentFrameTexture
Gets the current frame texture.
The current frame texture.
CurrentPosition
long CurrentPosition
Gets or sets the current position in seconds in the video stream.
The current position in seconds in the video stream.
CurrentStereoMode
StereoMode CurrentStereoMode
Gets the current stereo mode.
The current stereo mode.
CurrentVolume
int CurrentVolume
Gets or sets the current volume setting.
The current volume setting.
HasProjection
bool HasProjection
Gets a value indicating whether the video has a projection.
Value true
if the video has a projection, false
otherwise.
Height
int Height
Gets the height of the texture.
The height of the texture.
IsPaused
bool IsPaused
Gets a value indicating whether the video is paused.
Value true
if the video is paused, false
otherwise.
MaxVolume
int MaxVolume
Gets the maximum volume value which can be set.
The maximum volume value which can be set.
Screen
Renderer Screen
Gets or sets the renderer for the video texture.
The renderer for the video texture.
VideoDuration
long VideoDuration
Gets the duration in seconds of the video stream.
The duration in seconds of the video stream.
VideoReady
bool VideoReady
Gets a value indicating whether the video is ready to be played.
Value true
if the video is ready to be played.
Width
int Width
Gets the width of the texture.
The width of the texture.
Public functions
CleanupVideo
void CleanupVideo()
Cleans up the current video player and texture.
Init
bool Init()
Initialize the video player.
Details | |
---|---|
Returns |
Returns
true if successful. |
Pause
bool Pause()
Pauses video playback.
Details | |
---|---|
Returns |
Returns
true if the operation is successful, false otherwise. |
Play
bool Play()
Play the video.
Details | |
---|---|
Returns |
Returns
true if the video plays successfully, false otherwise. |
ReInitializeVideo
void ReInitializeVideo()
Reinitializes the current video player or creates one if there is no player.
RemoveOnVideoEventCallback
void RemoveOnVideoEventCallback( Action< int > callback )
Removes the callback for exceptions.
Details | |||
---|---|---|---|
Parameters |
|
RestartVideo
void RestartVideo()
Resets the video player.
SetCurrentVolume
void SetCurrentVolume( int val )
Set the volume level.
Details | |||
---|---|---|---|
Parameters |
|
SetDisplayTexture
void SetDisplayTexture( Texture texture )
Sets the display texture.
Details | |||
---|---|---|---|
Parameters |
|
SetOnExceptionCallback
void SetOnExceptionCallback( Action< string, string > callback )
Sets the callback for exceptions.
Details | |||
---|---|---|---|
Parameters |
|
SetOnVideoEventCallback
void SetOnVideoEventCallback( Action< int > callback )
Sets the callback for video events.
Details | |||
---|---|---|---|
Parameters |
|