VPKPreview

@interface VPKPreview : UIImageView

Drop-in replacement (subclass) for UIImageView

When the image property is assigned a suitably initialised VPKImage, the VPKPreview enables Veep Viewing and Veep Editing capabilities

If assigned a standard UIImage, (or a VPKImage that doesn’t use it’s custom initialisers) this class behaves as a standard UIImageView.

See

VPKImage
  • if set to YES the veep viewer will be presented regardless of whether the user has permissions to edit veeps. Default is NO.

    Declaration

    Objective-C

    @property (nonatomic) BOOL readonly;
  • Read-only veepId - obtained from the VPKImage if initalised with a veepId, or from the imageURL if there is a matching veep available.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly, nullable) NSString *veepId;
  • The optional touch delegate affords the host app full control over the invoking of Veep Viewer and Veep Editors. If not set, VPKPreview will handle the presenting and dismissing of Viewers and Editors. If set, the host app is responsible for VeepViewer and VeepEditor management using the touch delegate callback.

    Declaration

    Objective-C

    @property (nonatomic, weak, nullable) id<VPKPreviewDelegate> delegate;
  • The optional pass-through delegate sends tap gesture recogniser messages to the receiver. in the event that the VPKPreview doesn’t handle it’s tap. This is useful where the VPKPreview is view-only and the image has no associated veep content. and the host app wishes to respond to taps that the VPKPreview will ignore.

    Declaration

    Objective-C

    @property (nonatomic, weak, nullable) id<VPKPreviewPassThroughDelegate> passThroughDelegate;
  • Readonly UITapGesetureRecognizer - set cancelsTouchesInView to NO to continue to receive didSelect: messages in collection view cells.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly, nonnull) UITapGestureRecognizer *tapGR;
  • if YES touching a VPKPreview will invoke the VPKit image viewer for all images. If NO, viewer will be invoked only for Veep’d images. Default is NO.

    Declaration

    Objective-C

    @property (nonatomic) BOOL invokeViewerForAllImages;
  • if YES the preview will animate when touched for better touch feedback. Default is NO.

    Declaration

    Objective-C

    @property (nonatomic) BOOL animateTouch;
  • adjusts the size of the icon. Default is 50.

    Declaration

    Objective-C

    @property (nonatomic) CGFloat iconLength;
  • use short-term caching for VeepIds. Default is YES;

    Declaration

    Objective-C

    @property (nonatomic) BOOL useCache;
  • autoplay. Default is YES;

    Declaration

    Objective-C

    @property (nonatomic) BOOL autoplay;
  • optional video playlist

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) VPKPlaylist *playlist;
  • optional ad handler

    Declaration

    Objective-C

    @property (nonatomic, weak, nullable) id<VPKAdHandler> adHandler;
  • Shows the veep content icon.

    Declaration

    Objective-C

    - (void)showIcon;
  • Hides the veep content icon.

    Declaration

    Objective-C

    - (void)hideIcon;
  • Shows the veep content icon, optionally animated.

    Declaration

    Objective-C

    - (void)showIcon:(BOOL)animated;
    Parameters
    animated

    Enables (disables) icon animation.

  • Hides the veep content icon, optionally animated.

    Declaration

    Objective-C

    - (void)hideIcon:(BOOL)animated;
    Parameters
    animated

    Enables (disables) icon animation.

  • Reset the preview: sets the image, imageurl and corresponding veep metadata to nil.

    Declaration

    Objective-C

    - (void)reset;
  • Dismisses the veepviewer or veepeditor view controller, if it is currently presented.

    Declaration

    Objective-C

    - (void)dismiss:(BOOL)animated;
    Parameters
    animated

    Enables (disables) icon animation.

  • returns playback time if a video is currently playing in the VPKit SDK. Returns -1 if video not loaded.

    Declaration

    Objective-C

    - (Float64)currentPlaybackTime;
  • returns video duration if a video is currently loaded in the VPKit SDK. Returns -1 if video not loaded.

    Declaration

    Objective-C

    - (Float64)duration;
  • returns NSDictionary of Quality of Service data for currently playing video. Returns nil if video not loaded.

    Declaration

    Objective-C

    - (nullable NSDictionary *)qualityOfServiceDict;
  • returns a sessionId.

    Declaration

    Objective-C

    - (nullable NSString *)sessionIdentifier;
  • returns a mediaIdentifier.

    Declaration

    Objective-C

    - (nullable NSString *)mediaIdentifier;
  • returns a custom data dictionary.

    Declaration

    Objective-C

    - (nullable NSDictionary *)customData;
  • Utility method for preview of youtube veep (experimental).

    Declaration

    Objective-C

    + (nullable NSURL *)previewURLforYoutubeId:(nonnull NSString *)youtubeId;