跳到主要内容

Share with On-Demand Website

BlendVision offers a on-demand website showroom for each of your VODs by default, which you can directly share with your audience for watching the videos.

You have capabilities to customize it as per your preferences, including:

sample

Here is a sample of a public BlendVision showroom website, feel free to explore it.


Obtain and Distribute the Showroom Website as Your Needs

The showroom will be public and accessible to all users who visit the website when the VOD's privacy is set to SECURITY_PRIVACY_TYPE_PUBLIC.

Use the following template to create the website URL for the VOD and distribute it to your audience:

https://showroom.one.blendvision.com/showroom?token=resource_token&lang=en&t=0&shareUrl=example.com
AttributesRequiredDescription
resource_tokenRequiredRefer to the steps to obtain the token.
langOptionalLocale (zh, ja, en).
tOptionalThe default timestampe (seconds) to start playback when player initiated.
shareUrlOptionalThe URL to share on social media. If no value is provided, the default URL will be set to https://showroom.one.blendvision.com?token=resource_token

Obtain Resource Token

Make a POST request to the API: POST /bv/cms/v1/resources/tokens

Query ParametersRequiredDescription
resource_idRequiredThe unique ID of your content.
resource_typeRequiredThe resource type of your content. (e.g., RESOURCE_TYPE_LIVE, RESOURCE_TYPE_VOD).
customer_idOptionalYour custom user ID for identifying the viewer. Required if the content's security privacy is set to SECURITY_PRIVACY_TYPE_TOKEN.
customer_nameOptionalYour custom user name for identifying the viewer.
expired_atOptionalSets the token to expire at the specified UTC time (format: YYYY-MM-DDTHH:MM:SSZ). Cannot be used with expires_in. If neither is set, the token does not expire.
expires_inOptionalSets the token to expire after a specified duration in seconds (e.g., 3600s for 1 hour). Cannot be used with expired_at. If neither is set, the token does not expire.

Here is an example of a request body:

{
"resource_id": "<resource-id>",
"resource_type": "<resource-type>",
"customer_id": "<customer-id>",
"customer_name": "<customer-name>",
"expired_at": "2024-05-08T08:27:42.882Z"
}

Note:

  1. In the example above, only the expired_at or expires_in parameter should be used, not both. If you choose to use expires_in, replace the expired_at parameter with expires_in": "3600s" to set a token that expires in 1 hour.
  2. If a request is made with an expired token, the API will respond with the error code ERROR_REASON_TOKEN_EXPIRED.

Verify Token and Retrieve Token Information

To validate the token and retrieve associated information, use the following API with the obtained resource token: GET /bv/playback/v1/resources/token-info

A successful response will include the UTC expiration time of the token under expired_at:

{
"expired_at": "2024-05-10T13:00:33.540Z"
}

The API will return a 400 BadRequest error under the following conditions:

  1. Invalid Token: If the token is invalid, the response will include an ERROR_REASON_TOKEN_INVALID error reason.
  2. Expired Token: If the token has expired, the response will include an ERROR_REASON_TOKEN_EXPIRED error reason.