private void EveryplayThumbnailReadyAtTextureId(string jsonMsg) { #pragma warning disable 612, 618 if (ThumbnailReadyAtTextureId != null || ThumbnailTextureReady != null) { Dictionary <string, object> dict = EveryplayDictionaryExtensions.JsonToDictionary(jsonMsg); int textureId; bool portrait; if (EveryplayDictionaryExtensions.TryGetValue(dict, "textureId", out textureId) && EveryplayDictionaryExtensions.TryGetValue(dict, "portrait", out portrait)) { if (ThumbnailReadyAtTextureId != null) { ThumbnailReadyAtTextureId(textureId, portrait); } #if !UNITY_3_5 if (ThumbnailTextureReady != null && currentThumbnailTargetTexture != null) { if (currentThumbnailTargetTexture.GetNativeTextureID() == textureId) { ThumbnailTextureReady(currentThumbnailTargetTexture, portrait); } } #endif } } #pragma warning restore 612, 618 }
private void EveryplayFaceCamRecordingPermission(string jsonMsg) { if (FaceCamRecordingPermission != null) { Dictionary <string, object> dict = EveryplayDictionaryExtensions.JsonToDictionary(jsonMsg); bool granted; if (EveryplayDictionaryExtensions.TryGetValue(dict, "granted", out granted)) { FaceCamRecordingPermission(granted); } } }
private void EveryplayReadyForRecording(string jsonMsg) { if (ReadyForRecording != null) { Dictionary <string, object> dict = EveryplayDictionaryExtensions.JsonToDictionary(jsonMsg); bool enabled; if (EveryplayDictionaryExtensions.TryGetValue(dict, "enabled", out enabled)) { ReadyForRecording(enabled); } } }
private void EveryplayUploadDidComplete(string jsonMsg) { if (UploadDidComplete != null) { Dictionary <string, object> dict = EveryplayDictionaryExtensions.JsonToDictionary(jsonMsg); int videoId; if (EveryplayDictionaryExtensions.TryGetValue(dict, "videoId", out videoId)) { UploadDidComplete(videoId); } } }
private void EveryplayFileReady(string jsonMsg) { Dictionary <string, object> dict = EveryplayDictionaryExtensions.JsonToDictionary(jsonMsg); string videoURL; if (EveryplayDictionaryExtensions.TryGetValue(dict, "videoURL", out videoURL)) { if (FileReady != null) { FileReady(videoURL); } } }
private void EveryplayUploadDidProgress(string jsonMsg) { if (UploadDidProgress != null) { Dictionary <string, object> dict = EveryplayDictionaryExtensions.JsonToDictionary(jsonMsg); int videoId; double progress; if (EveryplayDictionaryExtensions.TryGetValue(dict, "videoId", out videoId) && EveryplayDictionaryExtensions.TryGetValue(dict, "progress", out progress)) { UploadDidProgress(videoId, (float)progress); } } }
private void EveryplayThumbnailTextureReady(string jsonMsg) { #if !UNITY_3_5 if (ThumbnailTextureReady != null) { Dictionary <string, object> dict = EveryplayDictionaryExtensions.JsonToDictionary(jsonMsg); long texturePtr; bool portrait; if (currentThumbnailTargetTexture != null && EveryplayDictionaryExtensions.TryGetValue(dict, "texturePtr", out texturePtr) && EveryplayDictionaryExtensions.TryGetValue(dict, "portrait", out portrait)) { long currentPtr = (long)currentThumbnailTargetTexture.GetNativeTexturePtr(); if (currentPtr == texturePtr) { ThumbnailTextureReady(currentThumbnailTargetTexture, portrait); } } } #endif }