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:
- The website and player template design
- The website's availability (Public, Access Code Protection, Token Integration)
- Membership integration
Here is a sample of a public BlendVision showroom website, feel free to explore it.
Obtain and Distribute the Showroom Website as Your Needs
- Public
- Access Code Protection
- Token Integration
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
Attributes | Required | Description |
---|---|---|
resource_token | Required | Refer to the steps to obtain the token. |
lang | Optional | Locale (zh , ja , en ). |
t | Optional | The default timestampe (seconds) to start playback when player initiated. |
shareUrl | Optional | The 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 Parameters | Required | Description |
---|---|---|
resource_id | Required | The unique ID of your content. |
resource_type | Required | The resource type of your content. (e.g., RESOURCE_TYPE_LIVE , RESOURCE_TYPE_VOD ). |
customer_id | Optional | Your custom user ID for identifying the viewer. Required if the content's security privacy is set to SECURITY_PRIVACY_TYPE_TOKEN . |
customer_name | Optional | Your custom user name for identifying the viewer. |
expired_at | Optional | Sets 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_in | Optional | Sets 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:
- In the example above, only the
expired_at
orexpires_in
parameter should be used, not both. If you choose to useexpires_in
, replace theexpired_at
parameter withexpires_in": "3600s"
to set a token that expires in 1 hour. - 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:
- Invalid Token: If the token is invalid, the response will include an
ERROR_REASON_TOKEN_INVALID
error reason. - Expired Token: If the token has expired, the response will include an
ERROR_REASON_TOKEN_EXPIRED
error reason.
The showroom will only be accessible with an authorized token when the VOD's privacy
is set to SECURITY_PRIVACY_TYPE_TOKEN
.
BlendVision offers the Access Code
feature, allowing you to generate multiple unique token-authorized access codes, which serve as unique passwords when users visit the showroom website.
The Access Code
is token-based, so the device limit will comply with the privacy
settings of your VOD.
To utilize the showroom website with access codes, you will distribute the same website URL along with different unique Access Code to your audience:
Showroom Website URL
https://showroom.one.blendvision.com/?lang=en
Attributes | Required | Description |
---|---|---|
lang | Optional | Locale (zh , ja , en ). |
Access Codes
To generate access codes, make a POST request to the API: POST /bv/cms/v1/redeem-codes
The required parameters are:
id
: The ID of the Livestream or VOD for which you want to generate redeem codes.type
:RESOURCE_TYPE_VOD
.amount
: The number of access codes you want to generate. The maximum is 1000.
Here's an example of generating 5 access codes for a VOD with ID of 12345
:
{
"id":"12345",
"type":"RESOURCE_TYPE_VOD",
"amount":5
}
After making the request, you will receive a response containing an array of access codes. Here is an example response:
{
"redeem_codes": [
{
"code":"ABC123"
},
{
"code":"DEF456"
},
{
"code":"GHI789"
},
{
"code":"JKL012"
},
{
"code":"MNO345"
}
]
}
The showroom will only be accessible with an authorized token when the VOD's privacy
is set to SECURITY_PRIVACY_TYPE_TOKEN
.
You can manage user authorization in your system by issuing tokens only to users who are authorized according to your business requirements.
To generate the VOD showroom website URLs for your authorized users, use the following template:
https://showroom.one.blendvision.com/showroom?token=resource_token&lang=en&t=0&shareUrl=example.com
Attributes | Required | Description |
---|---|---|
resource_token | Required | Refer to the steps to obtain the token. |
lang | Optional | Locale (zh , ja , en ). |
t | Optional | The default timestampe (seconds) to start playback when player initiated. |
shareUrl | Optional | The URL to share on social media. If no value 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 Parameters | Required | Description |
---|---|---|
resource_id | Required | The unique ID of your content. |
resource_type | Required | The resource type of your content. (e.g., RESOURCE_TYPE_LIVE , RESOURCE_TYPE_VOD ). |
customer_id | Optional | Your custom user ID for identifying the viewer. Required if the content's security privacy is set to SECURITY_PRIVACY_TYPE_TOKEN . |
customer_name | Optional | Your custom user name for identifying the viewer. |
expired_at | Optional | Sets 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_in | Optional | Sets 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:
- In the example above, only the
expired_at
orexpires_in
parameter should be used, not both. If you choose to useexpires_in
, replace theexpired_at
parameter withexpires_in": "3600s"
to set a token that expires in 1 hour. - 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:
- Invalid Token: If the token is invalid, the response will include an
ERROR_REASON_TOKEN_INVALID
error reason. - Expired Token: If the token has expired, the response will include an
ERROR_REASON_TOKEN_EXPIRED
error reason.