All Products
Search
Document Center

:Overview

Last Updated:Mar 11, 2024

EdgeScript is a script tool that Alibaba Cloud designs to support programmable configuration. EdgeScript allows you to create scripts to customize your ApsaraVideo Live service. If the standard configurations provided in the ApsaraVideo Live console cannot meet your business requirements, you can use EdgeScript to create scripts with ease.

Features

EdgeScript is a script tool that Alibaba Cloud designs to help you efficiently customize your ApsaraVideo Live service. EdgeScript provides simple syntax and diverse functions, which allows you to create complex scripts with ease. EdgeScript allows you to build a custom business system based on ApsaraVideo Live. Custom scripts can globally take effect in the ApsaraVideo Live service within several seconds. Agile and fast service releases and updates help you develop services in a more efficient manner.

The simple syntax and diverse functions of EdgeScript can help you build script blocks to customize the configurations of ApsaraVideo Live.

image

EdgeScript provides built-in variables that the points of presence (POPs) of ApsaraVideo Live can recognize. It also provides simple conditional statements and diverse functions encapsulated by ApsaraVideo Live. You can combine simple conditional statements and existing functions in EdgeScript to meet most of your requirements for custom configurations. For example, you can use EdgeScript to customize authentication and add fields to or remove fields from request headers. This helps you customize your configurations and provides agile and fast service updates.

Scenarios

EdgeScript can be applied in various business scenarios where custom configurations are required.

Scenario

Description

Authentication logic

Hotlink protection is typically required for live streaming. You can use EdgeScript to implement authentication based on request parameters, cookies, or complex algorithms. This way, you can protect your resources.

Request headers and response headers

You can use EdgeScript to customize filtering rules of request headers and response headers and fully control the requests sent to the live centers of ApsaraVideo Live.

Rewriting and redirection

If your website supports different languages, requests destined for the website are redirected to the URLs that point to content written in the requested language. For example, requests that require the English or German language are redirected from the China site to the English or German site.

A/B Testing

You may need to perform A/B testing on a new feature that is added to the origin server. In this case, custom configurations for ApsaraVideo Live are required. You can differentiate requests for different features of the origin server based on the request headers or URLs. This can help you perform end-to-end A/B testing.

M3U8 rewriting

In this scenario, EdgeScript applies to ApsaraVideo Live and ApsaraVideo VOD.

Blocking

EdgeScript allows you to run scripts to block requests from specified IP addresses. You can specify the regions or logic based on which requests are blocked. You can also create anti-bot policies to protect your resources from bots.

Billing

You can use EdgeScript free of charge.

References