Skip to main content
TikTok for DevelopersTikTok for Developers

Docs

Overview

Your app can now provide a seamless experience for users to apply the green-screen effect to videos shared to TikTok. Green-screen videos use one video/image as the background and the creator's figure is in the front. This way, creators can use arbitrary background for their videos. Previously, creators will need go to the TikTok app; open the camera and select the green-screen effect; then select the background video/image; trim the background video if needed; and finally start recording the video. With the new release of both SDK and TikTok, creators can go from your app to the TikTok camera, applying the green screen effect with the shared video/image as the background by using just one new field in the SDK api call.

iOS

Introduction

The iOS SDK release v5.0.15 starts to support Green Screen sharing. This means it will automatically use the shared video/image as background for the new recording.

Preparation

You need to complete all of the configurations listed in Getting Started with the TikTok SDK for iOS.

To enable this feature, we provided a new field, shareFormat, in the share request (TikTokOpenSDKShareFormatType in TikTokOpenSDKShareRequest). By default, it will be the regular video or image sharing we had previously. Set the enum value (TikTokOpenSDKShareFormatGreenScreen) to enable Green Screen sharing. Your users can now start recording the video without additional actions.

TikTokOpenSDKShareRequest *shareReq;
shareReq.shareFormat = TikTokOpenSDKShareFormatGreenScreen;

Note that:

  1. This feature is only supported on TikTok version 25.0.0 and later.
  1. This only applies to single video or image sharing. If multiple videos or images are shared, this field is ignored for this release. We may support Green Screen sharing for multiple images in a future release.
  1. For videos, an extra step is presented to users to trim the shared video if needed before the recording. This is the same experience we have when the Green Screen effect is used with a video background.
  1. If TikTok fails to apply the Green Screen effect, we'll present a dialog for users to continue with regular sharing.

Android

Introduction

The iOS SDK release v5.0.15 starts to support Green Screen sharing. This means it will automatically use the shared video/image as background for the new recording.

Preparation

You need to complete all of the configurations listed in Getting Started with the TikTok SDK for Android.

To enable this feature, we provided a new field, shareFormat, in the share request (Share.Format in Share.Request ). By default, it will be the regular video or image sharing we had previously. If the Green Screen enum value (GREEN_SCREEN on Android) is provided for single video or image sharing, TikTok will try to apply the Green Screen effect automatically and use the shared video or image as the Green Screen background. Your users can start recording the video seamlessly.


ShareRequest.Builder requestBuilder = ShareRequest.builder();
requestBuilder.shareFormat(Share.Format.GREEN_SCREEN);
requestBuilder.build();

Note that:

  1. This feature is only supported on TikTok version 25.0.0 and later.
  1. This only applies to single video or image sharing. If multiple videos or images are shared, this field is ignored for this release. We may support Green Screen sharing for multiple images in a future release.
  1. For videos, an extra step is presented to users to trim the shared video if needed before the recording. This is the same experience we have when the Green Screen effect is used with a video background.
  1. If TikTok fails to apply the Green Screen effect, we'll present a dialog for users to continue with regular sharing.