function withJsApi
withJsApi(url: string): string

Returns url with the parameters the IFrame Player API needs to drive the embed. enablejsapi can't be turned on after the iframe loads, so GlobalPlayer adds it to every playlist embed, whether or not the API script loads.

Parameters

url: string

Return Type

string

Usage

import { withJsApi } from "src/utils/player/youtube.ts";