The embed script lives alongside your player build at
https://cdn.pnplayer.com/<client>/<version>/embed.js. Find the URL for your latest build on your builds page. For full control over options, controls and events, use the JavaScript integration instead.Add the script
id must be exactly pnplayer-js-embed. The script reads its own attributes, builds the iframe and appends it to the end of the page body.
Attributes
string
required
HLS playlist URL of the video to play
string
default:"default"
Player theme:
default, netflix or glassystring
Comma-separated list of caption tracks in the form
language:label:format. Label and format are optional and default to the language code and vtt. Files are loaded from the captions folder next to the playlist, so en:English loads https://stream.pnplayer.com/<video-id>/captions/en.vtt.string
Set to
1 to load chapters.vtt from the same folder as the playlist and show chapter markers on the timelineEmbed the iframe directly
The script is a convenience wrapper aroundembed.html. You can point an iframe at it yourself when you need to control placement or size.
remote-playback and picture-in-picture in the allow attribute, otherwise AirPlay and Picture-in-Picture do not work from inside the iframe.
Query parameters
string
required
URL-encoded HLS playlist URL. Repeat the parameter to build a playlist.
string
One caption track as
language:label:format. Repeat the parameter for more tracks.string
1 to load chapters.vttstring
default:"0"
1 to start playback automaticallystring
default:"0"
1 to start mutedstring
default:"default"
default, netflix or glassy