Share & Deeplinking(iOS)

Set shared base URL

If your website integrates our Web component, we suggest setting the website link (without query) as the shared base URL. For instance, if the link for the website integrating our Web component is https://example.com, you could set https://example.com as the shared base URL. For instructions on setting the shared base URL, please refer to Customize share base URL.

Once the share URL is configured as https://example.com, the sample video share URL will be: https://example.com?fw_video={video_encoded_id}&fw_channel={channel_name}&fw_playlist={playlist_encoded_id}. Users can share the video by clicking the share button.

For instance, if you set the shared base URL as https://example.com, you must ensure that links beginning with https://example.com function as universal links. This way, the user clicking the shared URL will trigger your app (if installed) to open. Please consult the following docs for more details:

Open video player

When a user clicks the share link, your app (if installed) will be opened. Then you can get the the share link and use openVideoPlayer API to open the video player.

VideoFeedViewController.openVideoPlayer(with: sharedLink, config, self, true) { result in
    print("Open VideoPlayer result \(result)")
}

Configuration for opening video player

Please consult Player configurations (iOS)

Customize the entire share URL

  1. Set FireworkVideoShareDelegate delegate:

FireworkVideoSDK.shareDelegate = <FireworkVideoShareDelegate delegate>
  1. Implement handleCustomizingShareURL(_:fromVideo:shareURLCompletionHandler:):

func handleCustomizingShareURL(
    _ shareURL: String?,
    fromVideo video: VideoDetails,
    shareURLCompletionHandler: @escaping ShareURLHandler
) {
    let originalUrl = shareURL
    let videoID = video.videoID
    let videoType = video.videoType
    let liveStreamStatus = video.liveStreamStatus


    let customizedShareUrl = "Your customized share URL"

    // Return the customized share URL using shareURLCompletionHandler.
    // You can also invoke shareURLCompletionHandler
    // after the completion of asynchronous operations.
    shareURLCompletionHandler(customizedShareUrl)
}

Last updated

Was this helpful?