Skip to main content
Question

Acquiring File Preview Stream or making a Preview Playlist

  • May 22, 2025
  • 1 reply
  • 20 views

Forum|alt.badge.img

I'm trying to figure out if this is possible with the Box API. I don't see anything in the documentation that suggest it is. 

 

From playing with Box when working with video files I see that a lower bitrate/resolution stream is available in the preview.  Great!

I want to do something similar using the Box API. My users will upload several videos , using my UI they will specify some order for them to generate a playlist, and then I want them to see how their playlist looks. If I use the Playlist API it returns a URI that can be displayed in an IFRAME to show a video preview of a single file on box. Is there someway to either 

  1. Produce a Preview window that will automatically continue to another video among a list of videos
  2. Acquire a URI to the reduced bitrate preview stream

 

Thanks. 

1 reply

Forum|alt.badge.img

Hello! Try taking a look at our representations API, which allows you to work directly with converted representations of a file: https://developer.box.com/reference#representations

 

Fetching the exact low-res video representation you see in the Box web application won't be straight forward since we use the MPEG-DASH protocol (https://en.wikipedia.org/wiki/Dynamic_Adaptive_Streaming_over_HTTP) and an open source library called Shaka Player (https://github.com/google/shaka-player) to fetch and play DASH segments. However, you should be able to leverage the simple MP4 representation, which should be 480p by sending an X-Rep-Hints value of [mp4] (see the documentation for how to use X-Rep-Hints).