Skip to main content

x-callback-url

Every action also works as x-callback-url, so the calling app learns how it went:

yattee://x-callback-url/{action}?{parameters}&x-success={url}&x-error={url}&x-cancel={url}

{action} is any action from the URL scheme: play, play-next, queue, download, bookmark, subscribe, unsubscribe, or a player control such as player/pause or player/state. Opening links and screens (open, video, subscriptions…) isn't available as x-callback-url and reports unsupportedAction.

x-callback-url works on iPhone, iPad and Mac. Apple TV runs the action but can't open the callbacks.

x-success​

Opened when the action finishes, with these added to its query where they apply:

ParameterSent byValue
videoIDVideo actions, player controlsThe video's ID
titleVideo and playlist actions, player controlsThe video or playlist title
channelVideo actions, player controls, subscribe/unsubscribeThe channel name
channelIDsubscribe, unsubscribeThe channel's ID
playlistIDPlaylist linksThe playlist's ID
countPlaylist linksHow many videos the playlist has
statusdownloadpicking when the quality picker was shown instead of downloading
playingPlayer controlstrue or false. Only this is sent by player/state when nothing is playing
positionPlayer controlsCurrent time in whole seconds
durationPlayer controlsLength in whole seconds
ratePlayer controlsPlayback speed, such as 1.0

x-error​

Opened with errorCode and errorMessage when the action fails:

errorCodeMeans
noSourceNo source is set up that can load the video
notAVideoThe link isn't something Yattee can play
notAChannelsubscribe/unsubscribe got a link that isn't a channel
loadFailedThe video, channel or playlist couldn't be loaded, or the playlist is empty
queueDisabledThe queue is turned off in Settings
nothingPlayingA player control was sent with nothing playing
unsupportedRateplayer/rate got a speed Yattee doesn't offer
downloadFailedThe download couldn't start
subscribeFailed / unsubscribeFailedThe account couldn't change the subscription
unsupportedThe action isn't available on this device, such as downloading on Apple TV
unsupportedActionYattee doesn't know the action, or a parameter is missing or invalid
cancelledYou declined the confirmation and no x-cancel was given

x-cancel​

Opened when you decline a confirmation. Without it, x-error is opened with errorCode=cancelled.

Examples​

Get what's playing and pass it to a shortcut:

yattee://x-callback-url/player/state?x-success=shortcuts://x-callback-url/run-shortcut?name=Now%20Playing

Queue a video and hear back either way:

yattee://x-callback-url/queue?url=https%3A%2F%2Fyoutu.be%2FdQw4w9WgXcQ&x-success=myapp://queued&x-error=myapp://failed

On success Yattee opens myapp://queued?videoID=dQw4w9WgXcQ&title=…&channel=…; on failure myapp://failed?errorCode=…&errorMessage=….