예제 #1
0
        public static void ShareVideo(VideoSharingNetwork network, string videoGuid, string userMessage = null)
        {
            Service.Get <VideoDataManager>().GetVideoDetails(videoGuid, delegate(string guid)
            {
                VideoData videoData = null;
                Service.Get <VideoDataManager>().VideoDatas.TryGetValue(guid, out videoData);
                if (videoData == null)
                {
                    Service.Get <StaRTSLogger>().ErrorFormat("ShareVideo: could not find {0}", new object[]
                    {
                        guid
                    });
                    return;
                }
                VideoSharing videoSharing = new VideoSharing();
                switch (network)
                {
                case VideoSharingNetwork.FACEBOOK:
                    videoSharing.OnVideoDetailsFB(guid);
                    return;

                case VideoSharingNetwork.GOOGLEPLUS:
                    videoSharing.OnVideoDetailsGP(guid);
                    return;

                case VideoSharingNetwork.SQUAD:
                    videoSharing.OnVideoDetailsSquad(videoData, userMessage);
                    return;

                default:
                    return;
                }
            });
        }
예제 #2
0
 public unsafe static long $Invoke9(long instance, long *args)
 {
     VideoSharing.ShareVideo((VideoSharingNetwork)(*(int *)args), Marshal.PtrToStringUni(*(IntPtr *)(args + 1)), Marshal.PtrToStringUni(*(IntPtr *)(args + 2)));
     return(-1L);
 }
예제 #3
0
 public void ShareToFacebook()
 {
     VideoSharing.ShareVideo(VideoSharingNetwork.FACEBOOK, this.guid, null);
     this.TrackVideoSharing(VideoSharingNetwork.FACEBOOK);
 }
예제 #4
0
 public void ShareToGoogle()
 {
     VideoSharing.ShareVideo(VideoSharingNetwork.GOOGLEPLUS, this.guid, null);
     this.TrackVideoSharing(VideoSharingNetwork.GOOGLEPLUS);
 }
예제 #5
0
 public void ShareToSquad()
 {
     VideoSharing.ShareVideo(VideoSharingNetwork.SQUAD, this.guid, null);
     this.TrackVideoSharing(VideoSharingNetwork.SQUAD);
 }