Skip to main content
A site can play videos from the workspace’s own library, or finished videos made in Goosy. These calls take the optional workspace argument (Which workspace). Which calls need approval. On a member’s own key, each call runs in one call. On a key with no member behind it (a service account), the calls that cost something answer confirmation_required first, and the same call repeated with the confirmation_id does it. There is no call that deletes a hosted video; do that in Goosy.

Read the videos

page.videos takes site_id. It lists the videos the site plays and the workspace videos it could play, each with whether it is ready. A video on the site carries the player address the page embeds, how it starts, whether captions show, and its thumbnail. placements lists each page that plays a video, in order. A finished video made in Goosy that is not hosted yet is listed under finished with the video_id page.video_attach takes.

Upload your own file

page.video_upload works in steps, named by action:
  1. start with filename, mime_type and byte_size. The answer is one upload address, or parts to sign.
  2. sign_parts with the upload_id and part_numbers, for a file sent in parts. Send the parts in order.
  3. complete records the video (give it a title). Name captions here to buy them at the same time.
  4. abort abandons an upload.
The video is stored and never hosted until you attach it to a site. Storage is charged per month. Captions are charged per language minute, so on a service-account key, start and a complete that names captions answer confirmation_required first.

Attach a video

page.video_attach takes site_id and video_id, plus optional captions, playback_mode (preview, opening_frame or thumbnail), show_captions, and replace_attachment_id to swap one attachment for another. playback_mode and show_captions are stored as the video’s default on this site once it is attached. The video_id is one of the workspace’s videos, or a finished video made in Goosy. While a finished video’s file is still being prepared, the answer is copying; make the same call again and it attaches. A video with no approved cut yet is refused by name. Attaching a video that isn’t hosted yet starts hosting it, which charges the workspace for encoding. Captions are charged only when you name them.

Captions

page.video_captions takes site_id, video_id and languages, short tags such as en or pt-BR. Captions are off until you call it. Each language is charged per minute of video, once, when the captions are ready. Only the workspace’s own videos can be captioned, not a template’s.

How a video starts

page.video_set_playback takes site_id and the attachment_id from page.videos. The live page plays the new setting from its next view. Nothing is published and nothing is charged. A setting fixed in the page’s own embed address still wins.

The thumbnail

page.video_set_thumbnail takes video_id and image_id, the id of an image file in the workspace. The thumbnail belongs to the video, so every site that plays it shows the same picture. It costs nothing, and a template’s video keeps its own thumbnail.

Take a video off

page.video_detach takes the attachment_id. It is refused by name while the live version of the site still plays the video, so remove it from the site and publish first. When no site plays the video any more, its hosting ends after a short grace period and the original stays in the workspace.

Where to go next