This topic describes the protocols supported by different EdgeScript functions.

Note For stream pulling requests over Real-Time Messaging Protocol (RTMP), ApsaraVideo Live obtains parameters only from URLs.

√: supported. ×: not supported.

EdgeScript function Stream pulling over FLV Stream pulling over RTMP Stream pulling over HLS RTS signaling
Logical functions: and, or, not, eq, ne, null.
Numeric functions: add, sub, mul, div, mod, gt, ge, lt, le, floor, ceil.
String functions: substr, concat, upper, lower, len, byte, match_re, capture_re, gsub_re, split, split_as_key, tohex, tostring, tochar, reverse, find, format, tobin, trim.
Dictionary functions: set, get, foreach, del.
Array functions: arr_concat, arr_insert, arr_remove, arr_sort, arr_len.
Request processing functions: add_req_header, del_req_header, add_rsp_header, del_rsp_header, rewrite, say, print, exit. ×
Request processing functions: encode_args and decode_args.
Request logic functions: server_addr, server_port, client_addr, client_port, client_country, client_region, client_city, client_isp, ip_countryip_region, ip_cityip_isp, req_uri, req_uri_basename, req_uri_ext, req_uri_seg, req_uri_arg, req_uri_query_string, req_scheme, req_method, req_host, req_user_agent, req_referer, req_cookie, req_first_x_forwarded, req_header, req_id. ×
Time functions: today, time, now, localtime, utctime, cookie_time, http_time, parse_http_time, unixtime.
Cryptography functions: aes_new, aes_enc, aes_dec, sha1, sha2, hmac, hmac_sha1, md5, md5_bin.
JSON functions: json_enc, json_dec.
Miscellaneous functions: base64_enc, base64_dec, url_escape, url_unescape, rand, rand_hit, crc, tonumber, base64_enc_safe, base64_dec_safe, randomseed.