LightShaft.Scripts.YoutubePlayer Class Reference
Inheritance diagram for LightShaft.Scripts.YoutubePlayer:
LightShaft.Scripts.YoutubeSettings

Public Member Functions

override void Start ()
 summary>This function is callback only, only will be called when the on url are ready to use. More...
 
string GetVideoTitle ()
 summary>Load the url only, dont play!. More...
 
void LoadUrl (string url)
 summary>Load the video without play, good for when you want just to prepare the video to play later. More...
 
void PreLoadVideo (string url)
 summary>Play the loaded video from time. More...
 
void Play (int startTime)
 summary>Load and Play the video from youtube. More...
 
void Play (string url)
 summary>Load and Play a custom playlist. More...
 
void Play (string[] playlistUrls)
 summary>Play the loaded video. More...
 
override void Play ()
 summary>Load and Play the video from youtube, starting from desired second. More...
 
void Play (string url, int startFrom)
 summary>Play or Pause the active videoplayer. More...
 
void PlayPause ()
 summary>Change the video rendering to fullscreen or back to material renderer. More...
 
void ToogleFullsScreenMode ()
 summary>Called when the video end. More...
 
void OnVideoPlayerFinished ()
 summary>Just a simple callback function to know when the video is loaded and ready to hit play(), you can use the unity events too. More...
 
void CallNextUrl ()
 
void CallPreviousUrl ()
 
- Public Member Functions inherited from LightShaft.Scripts.YoutubeSettings
void YoutubeGeneratorSys (string _videoUrl, string _formatCode)
 
void OnYoutubeError (string errorType)
 
void DisableThumbnailObject ()
 
void EnableThumbnailObject ()
 
void ShowLoading ()
 
void HideLoading ()
 
void DecryptAudioDone (string url)
 
void DecryptVideoDone (string url)
 
IEnumerator DelayPlay ()
 
int GetMaxQualitySupportedByDevice ()
 
void Pause ()
 
void Seek (float time)
 
void Stop ()
 
void DecryptDownloadUrl (string encryptedUrlVideo, string encrytedUrlAudio, string html, bool videoOnly)
 
void ReadyForExtract (string r, bool audioExtract)
 
void WebGlGetVideo (string url)
 
IEnumerator WebGlRequest (Action< string > callback, string id, string host)
 
void TrySkip (PointerEventData eventData)
 
void SkipToPercent (float pct)
 
void ChacheSystem ()
 

Additional Inherited Members

- Public Types inherited from LightShaft.Scripts.YoutubeSettings
enum  YoutubeVideoQuality {
  YoutubeVideoQuality.STANDARD, YoutubeVideoQuality.HD, YoutubeVideoQuality.FULLHD, YoutubeVideoQuality.UHD1440,
  YoutubeVideoQuality.UHD2160
}
 
enum  VideoFormatType { VideoFormatType.MP4, VideoFormatType.WEBM }
 
enum  Layout3D { Layout3D.SideBySide, Layout3D.OverUnder, Layout3D.EAC }
 
- Static Public Member Functions inherited from LightShaft.Scripts.YoutubeSettings
static bool TryNormalizeYoutubeUrl (string url, out string normalizedUrl)
 
static void WriteLog (string filename, string c)
 
- Public Attributes inherited from LightShaft.Scripts.YoutubeSettings
YoutubeVideoController _controller
 
YoutubeVideoEvents _events
 
string youtubeUrl
 
YoutubeVideoQuality videoQuality
 
bool is360
 
bool autoPlayOnStart = true
 
bool startFromSecond = false
 
int startFromSecondTime = 0
 
bool showThumbnailBeforeVideoLoad = false
 
Renderer thumbnailObject
 
bool customPlaylist = false
 
bool autoPlayNextVideo
 
string [] youtubeUrls
 
VideoFormatType videoFormat
 
bool autoPlayOnEnable = false
 
bool playUsingInternalDevicePlayer = false
 
bool loadYoutubeUrlsOnly = false
 
GameObject [] objectsToRenderTheVideoImage
 
bool is3DLayoutVideo = false
 
Layout3D layout3d
 
Camera mainCamera
 
VideoPlayer videoPlayer
 
VideoPlayer audioPlayer
 
bool debug
 
bool ignoreTimeout = false
 
bool _skipOnDrop = false
 
string videoUrl
 
string audioUrl
 
bool ForceGetWebServer = false
 
bool progressStartDrag
 
bool pauseCalled = false
 
bool isSyncing = false
 
string encryptedSignatureVideo
 
string encryptedSignatureAudio
 
bool decryptedUrlForVideo = false
 
bool decryptedUrlForAudio = false
 
string decryptedVideoUrlResult = ""
 
string decryptedAudioUrlResult = ""
 
List< VideoInfoyoutubeVideoInfos
 
string EncryptUrlForVideo
 
string EncryptUrlForAudio
 
string jsonForHtmlVersion = ""
 
bool checkIfSync = false
 
- Static Public Attributes inherited from LightShaft.Scripts.YoutubeSettings
static string SignatureQuery = "sig"
 
- Protected Member Functions inherited from LightShaft.Scripts.YoutubeSettings
void Skybox3DSettup ()
 
void FixCameraEvent ()
 
string CheckVideoUrlAndExtractThevideoId (string url)
 
void PlayYoutubeVideo (string _videoId)
 
IEnumerator PreventFinishToBeCalledTwoTimes ()
 
- Protected Attributes inherited from LightShaft.Scripts.YoutubeSettings
string UserAgent = "Mozilla/5.0 (Linux; Android 8.0.0; SM-G960F Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.84 Mobile Safari/537.36"
 
bool prepareVideoToPlayLater = false
 
string thumbnailVideoID
 
int currentUrlIndex = 0
 
bool youtubeUrlReady = false
 
bool fullscreenModeEnabled = false
 
bool noAudioAtacched = false
 
string videoTitle = ""
 
bool startedFromTime = false
 
bool finishedCalled = false
 
string logTest = "/"
 

Member Function Documentation

◆ CallNextUrl()

void LightShaft.Scripts.YoutubePlayer.CallNextUrl ( )

◆ CallPreviousUrl()

void LightShaft.Scripts.YoutubePlayer.CallPreviousUrl ( )

◆ GetVideoTitle()

string LightShaft.Scripts.YoutubePlayer.GetVideoTitle ( )

summary>Load the url only, dont play!.

◆ LoadUrl()

void LightShaft.Scripts.YoutubePlayer.LoadUrl ( string  url)

summary>Load the video without play, good for when you want just to prepare the video to play later.

◆ OnVideoPlayerFinished()

void LightShaft.Scripts.YoutubePlayer.OnVideoPlayerFinished ( )

summary>Just a simple callback function to know when the video is loaded and ready to hit play(), you can use the unity events too.

◆ Play() [1/5]

void LightShaft.Scripts.YoutubePlayer.Play ( int  startTime)

summary>Load and Play the video from youtube.

◆ Play() [2/5]

void LightShaft.Scripts.YoutubePlayer.Play ( string  url)

summary>Load and Play a custom playlist.

◆ Play() [3/5]

void LightShaft.Scripts.YoutubePlayer.Play ( string []  playlistUrls)

summary>Play the loaded video.

◆ Play() [4/5]

override void LightShaft.Scripts.YoutubePlayer.Play ( )
virtual

summary>Load and Play the video from youtube, starting from desired second.

Reimplemented from LightShaft.Scripts.YoutubeSettings.

◆ Play() [5/5]

void LightShaft.Scripts.YoutubePlayer.Play ( string  url,
int  startFrom 
)

summary>Play or Pause the active videoplayer.

◆ PlayPause()

void LightShaft.Scripts.YoutubePlayer.PlayPause ( )

summary>Change the video rendering to fullscreen or back to material renderer.

◆ PreLoadVideo()

void LightShaft.Scripts.YoutubePlayer.PreLoadVideo ( string  url)

summary>Play the loaded video from time.

◆ Start()

override void LightShaft.Scripts.YoutubePlayer.Start ( )
virtual

summary>This function is callback only, only will be called when the on url are ready to use.

Reimplemented from LightShaft.Scripts.YoutubeSettings.

◆ ToogleFullsScreenMode()

void LightShaft.Scripts.YoutubePlayer.ToogleFullsScreenMode ( )

summary>Called when the video end.


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