Interface VideoViewerUtil


  • public interface VideoViewerUtil
    This utility interface provides miscellaneous functions which are used to construct a VideoViewer object
    • Method Detail

      • getPreviewUrlForVideoAssetResource

        java.lang.String getPreviewUrlForVideoAssetResource​(@Nonnull
                                                            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

        java.lang.String getS7FileHandleForVideoAssetResource​(@Nonnull
                                                              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:
        java.lang.IllegalArgumentException - If resource is null.
      • getS7ViewerPath

        java.lang.String getS7ViewerPath​(@Nonnull
                                         ResourceResolver resourceResolver)
                                  throws javax.jcr.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:
        javax.jcr.RepositoryException - If the methods fails to read the repository.
        java.lang.IllegalArgumentException - If resourceResolver is null.