Interface VideoViewerUtil


@ProviderType @NotNullApi public interface VideoViewerUtil
This utility interface provides miscellaneous functions which are used to construct a VideoViewer object
  • Method Details

    • getPreviewUrlForVideoAssetResource

      @Nullable @Nullable String getPreviewUrlForVideoAssetResource(Resource resource)
      Constructs the preview url for the video asset resource
      Parameters:
      resource - Video asset sling resource
      Returns:
      Preview url for video asset resource. Returns null if preview url can't be found.
    • getS7FileHandleForVideoAssetResource

      @Nullable @Nullable String getS7FileHandleForVideoAssetResource(Resource resource)
      Retrieves the value of dam:scene7FileAvs property or dam:scene7File property of the video asset sling resource.
      Parameters:
      resource - Video asset Sling resource. Should be adaptable to Asset.
      Returns:

      The value of dam:scene7FileAvs property from the video asset metadata.

      If dam:scene7FileAvs property is not found, returns the value of dam:scene7File property.

      Returns null if the resource is not adaptable to Asset.

      Throws:
      IllegalArgumentException - If resource is null.
    • getS7ViewerPath

      String getS7ViewerPath(ResourceResolver resourceResolver) throws RepositoryException
      Constructs the Scene7 viewers' parent node path from viewer presets config in the JCR Repository.
      Parameters:
      resourceResolver - ResourceResolver object for accessing the JCR repository.
      Returns:
      The absolute JCR path to the Scene7 viewers parent node.
      Throws:
      RepositoryException - If the methods fails to read the repository.
      IllegalArgumentException - If resourceResolver is null.