Beispiel #1
0
        private static void OnVideoDetails(string guid)
        {
            if (guid == null)
            {
                VideoPlayer.CleanupPlayback();
                return;
            }
            VideoData videoData;

            if (!Service.Get <VideoDataManager>().VideoDatas.TryGetValue(guid, out videoData))
            {
                VideoPlayer.CleanupPlayback();
                return;
            }
            if (videoData == null)
            {
                VideoPlayer.CleanupPlayback();
                return;
            }
            Service.Get <VideoDataManager>().SearchSubCategory("official", new VideoDataManager.DataListQueryCompleteDelegate(VideoPlayer.OnOfficialVideoList));
        }
Beispiel #2
0
        private static void OnOfficialVideoList(List <string> videos)
        {
            if (!GameConstants.IsMakerVideoEnabled())
            {
                return;
            }
            string    guid = VideoPlayerKeepAlive.Instance.Guid;
            VideoData videoData;

            if (!Service.Get <VideoDataManager>().VideoDatas.TryGetValue(guid, out videoData))
            {
                VideoPlayer.CleanupPlayback();
                return;
            }
            int          num        = Math.Max(Screen.currentResolution.width, Screen.currentResolution.height);
            VideoQuality quality    = (num <= 1024) ? VideoQuality.LOW : VideoQuality.HIGH;
            string       videoURL   = videoData.GetVideoURL(quality);
            bool         isOfficial = videos != null && videos.Contains(guid);

            VideoPlayer.helper.Play(videoURL, isOfficial, VideoPlayer.videoId, VideoPlayer.action);
        }
Beispiel #3
0
 public unsafe static long $Invoke1(long instance, long *args)
 {
     VideoPlayer.CleanupPlayback();
     return(-1L);
 }