Global

Type Definitions

GetOrCreateFolderResponse

Properties:
Name Type Description
fid integer the folder's ID; pass it as the `fid` metadata field to put a new video in this folder
created boolean true if this call created the folder, false if it already existed

PartnerAccountInfo

Properties:
Name Type Description
is4K boolean whether your partner account may upload video above 1080p. Without 4K, PB Vision does not analyze such a video.

PlayerForTagging

A player to tag, identified by a name, an email, or both. At least one of the two is required.
Properties:
Name Type Attributes Description
name string <optional>
what to call the player: 1 to 64 characters after trimming. Shown unless the email belongs to a PB Vision account, in which case that account's own name is shown.
email string <optional>
the player's email address. The player is emailed that they were tagged. If the address belongs to a PB Vision account, the game is added to that account's library; if not, the game joins their library when they sign up with this address.

PlayersForTagging

The players to tag automatically once the video is processed, identified by their role at the start of the first game. The team that serves first supplies `server` (its first server) and `serverPartner`. The other team's first server is `receiver`: they start on the right and receive the first serve. Their partner is `receiverPartner`. Omit both partners for singles. Each email may be given for only one player.
Properties:
Name Type Attributes Description
server PlayerForTagging the player who served the first point
receiver PlayerForTagging the player who received the first point
serverPartner PlayerForTagging <optional>
the server's partner (omit for singles)
receiverPartner PlayerForTagging <optional>
the receiver's partner (omit for singles)
Properties:
Name Type Description
vid string the ID of the video the recording will upload to
uid string the ID of your partner account, which owns the video
url string the link that opens the PB Vision app to record the game

RecordingLinkOptions

The video's details and camera settings for makeRecordingLink(). The details are the same as in VideoMetadata, except that there is no gameStartEpoch: the game's time comes from its recording.
Properties:
Name Type Attributes Default Description
userEmails Array.<string> <optional>
the email addresses of up to 4 players in the game (see VideoMetadata)
name string <optional>
the title of the game
desc string <optional>
a longer description of the game
facility string <optional>
the facility where the game is played
court string <optional>
the court where the game is played
fid integer <optional>
the ID of the folder in your partner account's library to add the video to (see getOrCreateFolder())
playersForTagging PlayersForTagging <optional>
the players to tag automatically once processing completes
nonce string <optional>
identifies the game, e.g. your own ID for it: every call with the same nonce returns the same video and link (see makeVideoId())
resolution string <optional>
'1080p' the resolution to record at: '1080p' or '4k'. 4K requires your partner account to have 4K enabled; otherwise PB Vision rejects the upload.
fps integer <optional>
30 the frame rate to record at: 30 or 60
mayChangeResolution boolean <optional>
false whether the person recording may choose a different resolution in the app
mayChangeFPS boolean <optional>
false whether the person recording may choose a different frame rate in the app

VideoMetadata

Information about the Video that can be set prior to it being uploaded.
Properties:
Name Type Attributes Description
userEmails Array.<string> a list of email addresses of up to 4 players who were playing in the game; they will also be notified when the video processing is complete (unless they have these notifications disabled)
name string <optional>
the title of the game (if omitted, we'll use the time of the game, or if that isn't provided then the time of the upload)
desc string <optional>
a longer description of the game
gameStartEpoch integer <optional>
the epoch at which the game started
facility string <optional>
the facility where the game was recorded (e.g., "Cool Club #3 - Barcelona")
court string <optional>
the court where the game was recorded (e.g., "11A")
fid integer <optional>
the ID of the folder in your partner account's library to add this video to (see getOrCreateFolder()). A fid that is not one of your folders is refused.
playersForTagging PlayersForTagging <optional>
the players to tag automatically once processing completes, each by a name, an email, or both. Identify players by their role at the start of the first game. Honored by uploadVideo(), sendVideoUrlToDownload(), makeVideoId(), and makeRecordingLink().

VideoUrlToDownloadResponse

Properties:
Name Type Attributes Description
vid string the ID of the new video
hasCredits boolean <optional>
for passthrough partners, this field will be present and indicate whether the first user has any credits available