Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

REST queries and response states

REST query

Body example

Response example

Response states

Description

/cdn/stream/access_list/add

Code Block
languagejs
themeRDark
{
 "name":"test",
 "
authorizedKeys
keys":["key1","key2","key3"]
}



200 – OK

400 - Bad request

404 - Stream not found

500 – Internal Server Error

Add keys to stream ACL

/cdn/stream/access_list/remove
Code Block
languagejs
themeRDark
{
 "name":"test",
 "
authorizedKeys
keys":["key1"]
}

200 – OK

400 - Bad request

404 - Stream not found

500 – Internal Server Error

Remove keys from stream ACL

/cdn/stream/access_list/
cleanup
delete
Code Block
languagejs
themeRDark
{
 "name":"test"
}

200 – OK

400 - Bad request

404 - Stream not found

500 – Internal Server Error

Clean stream ACL

/cdn/stream/access_list/print
Code Block
languagejs
themeRDark
{
 "name":"test"
}
Code Block
languagejs
themeRDark
[
    "key1"
]

200 – OK

404 - ACL not found

500 – Internal Server Error

Show stream ACL

...

Parameters

Name

Description

Example

name
Имя потока в

CDN stream name

test
authorizedKeysСписок ключей доступа к потоку
keysStream access keys list
["key1","key2","key3"]

Access to stream for subscribers

...

Passing the key using WebSDK to play stream via WebRTC

To play stream via WebRTC stream access key should be passed as custom parameter to createSession function

...

Parameter name should match to configuration setting, aclAuth in this case aclAuthcase

Passing the key as connection parameter to play stream via RTMP

...

Code Block
themeRDark
rtmp://edge1.flashphoner.com:1935/live?aclAuth=key1/test

Where

  • edge1.flashphoner.com - server name
  • aclAuth - parameter name as set in configuration
  • test - stream name

Passing the key as stream parameter to play stream via RTMP

To pass access key in stream parameters, the following setting in flashphoner.properties file on all Edge servers should be set

Code Block
themeRDark
rtmp_use_stream_params_as_connection=true

In this case access key can be passed as follows

Code Block
themeRDark
rtmp://edge1.flashphoner.com:1935/live/test?aclAuth=key1

Passing a key to play stream via HLS

To play stream as HLS, access key should be passed in stream URL

Code Block
themeRDark
https://edge1.flashphoner.com:8445/test/test.m3u8?aclAuth=key1

Where

When HLS ABR is used, access key should be passed in master playlist URL

Code Block
themeRDark
https://edge1.flashphoner.com:8445/test/index.m3u8?aclAuth=key1

In this case access key will be set to master playlist for every variant

Code Block
themeRDark
#EXTM3U
#EXT-X-STREAM-INF:BANDWIDTH=1000000,RESOLUTION=1280x720,CODECS="avc1.42e01f,mp4a.40.2"
../test-720p/test-720p.m3u8?aclAuth=key1
#EXT-X-STREAM-INF:BANDWIDTH=1000000,RESOLUTION=852x480,CODECS="avc1.42e01f,mp4a.40.2"
../test-480p/test-480p.m3u8?aclAuth=key1
#EXT-X-STREAM-INF:BANDWIDTH=400000,RESOLUTION=426x240,CODECS="avc1.42e01f,mp4a.40.2"
../test-240p/test-240p.m3u8?aclAuth=key1

Passing a key to play stream via RTSP

Since build 5.2.1008 access key should be passed in stream URL to play stream as RTSP

Code Block
themeRDark
rtsp://edge1.flashphoner.com:5554/test?aclAuth=key1

Where

Note that some players, VLC for example, pass a key in uppercase only. Use the following parameter to play stream via RTSP in such player

Code Block
themeRDark
case_sensitive_auth_match=false

Passing the key using Android SDK to play stream via WebRTC

To play stream via WebRTC in Android application, access key should be passed to Connection.setCustom method while connection establishing

Code Block
languagejava
themeRDark
private Session session;
private Connection connection;
...
connection = new Connection();
connection.setCustom("aclAuth", "key1");
session.connect(connection);

Parameter name should match to configuration setting, aclAuth in this case

Backward compatibility

CDN 2.2 is compatible to CDN 2.0 and 2.1, only streams with clean ACL (as just published) can be played.

Known limits

1. It is strongly not recommended to publish streams with same name to two Origin servers in the same CDN.

2. A stream published to one of Origin servers should be played on the same Origin server or any Edge server (through Transcoder server if necessary), but should not be played from another Origin server in the same CDN.

3. ACL can be set to a stream only on Origin server where this stream is published.