Class ThumbsPlugin

    • Constructor Detail

      • ThumbsPlugin

        public ThumbsPlugin​(boolean useDefaultView)
        Create a new instance of this plugin. You can specify if the default renderer view should be registered. If you want to use the default renderer view, see ThumbsPlugin.ThumbnailViewComponent for more information how to access and use the view.
        Parameters:
        useDefaultView - Register the default renderer view
    • Method Detail

      • setLoadingStrategy

        public void setLoadingStrategy​(@NonNull
                                       LoadingStrategy loadingStrategy)
        Sets the LoadingStrategy to use for loading thumbnails. Applies for VTT, JPG and DASH embedded thumbnails.
        Parameters:
        loadingStrategy - the strategy to use. Must be non null and contain at least one Wave.
        See Also:
        LoadingStrategy
      • createProvider

        @Nullable
        public static ThumbnailProvider createProvider​(@NonNull
                                                       PlayerController playerController,
                                                       @NonNull
                                                       ThumbnailDataTrack thumbnailData,
                                                       @NonNull
                                                       LoadingStrategy loadingStrategy,
                                                       @Nullable
                                                       String manifestUrl,
                                                       @Nullable
                                                       com.castlabs.sdk.thumbs.ThumbnailLoader loader)
        Create a thumbnail provider based on the type. If the type is unknown, it will be inferred from the extension (i.e. .bif, .vtt, or .jpg of the URL. If the type could not be inferred, an exception is raised.
        Parameters:
        playerController - The player controller instance
        thumbnailData - The thumbnail data
        loadingStrategy - The thumbnail loading strategy
        manifestUrl - URL to the manifest that is used to infer the absolute URL to the thumbnails in case url is relative
        loader - The thumbnail loader. If null the default loader will be generated
        Returns:
        The provider
        Throws:
        IllegalArgumentException - in case the type of the thumbnail format is not specified and could not be inferred.