diff --git a/Viagg-io/Assets/Packages/MyBT/BTC/Handlers/NamedDepthkitPlayer.cs b/Viagg-io/Assets/Packages/MyBT/BTC/Handlers/NamedDepthkitPlayer.cs index 1bb6859..f60966c 100644 --- a/Viagg-io/Assets/Packages/MyBT/BTC/Handlers/NamedDepthkitPlayer.cs +++ b/Viagg-io/Assets/Packages/MyBT/BTC/Handlers/NamedDepthkitPlayer.cs @@ -30,16 +30,36 @@ public class NamedDepthkitPlayer : ComponentHandler { public override string ContentLabel() { UpdateComponent(); - string filename = depthkitClip.metadataFilePath; - if (depthkitClip.metadataSourceType == MetadataSourceType.TextAsset) { - filename = depthkitClip.metadataFile.name; + // string filename = "dummy-metadatafilepath"; // depthkitClip.metadataFilePath; + // Debug.Log($"NamedDepthkitPlayer.ContentLabel metadataFilePath {depthkitClip.metadataFilePath}"); + // string filename = depthkitClip.metadataFilePath; + // Debug.Log($"NamedDepthkitPlayer.ContentLabel metadataFile {depthkitClip.metadataFile}"); + // Debug.Log($"NamedDepthkitPlayer.ContentLabel metadataFile {depthkitClip.metadataFile.name}"); + if (depthkitClip.metadataFile != null) { + return depthkitClip.metadataFile.name; } - return filename; + if (depthkitClip.poster != null) { + return depthkitClip.poster.name; + } + if (depthkitClip.player != null) { + return depthkitClip.player.GetVideoPath(); + } + return "undefined-contentlabel"; + // if (depthkitClip.metadataFile == null) { + // filename = depthkitClip.metadataFile.name; + // } + // if (depthkitClip.metadataSourceType == MetadataSourceType.TextAsset) { + // filename = depthkitClip.metadataFile.name; + // } + // return filename; } public override void UpdateComponent() { base.UpdateComponent(); depthkitClip = GetComponent(); + if (depthkitClip == null) { + Debug.Log($"NamedDepthkitPlayer.UpdateComponent depthkitClip is null"); + } } public Depthkit.Clip depthkitClip;