Class Setting of Cloud Recording, Website Live Broadcast and Webpage Replay(Multiple)
For class recording, live broadcasting and playback (multiple), SID, safekey, timeStamp, course ID and class information array (class information object includes class ID, recording, live broadcasting and playback) shall be provided.Modify any of the three parameters of recording, website live broadcast and webpage replay, and fill in the other two parameters. To modify the status of the recording of the on-the-spot scene, the three parameters of class cloud recording, website live broadcast and webpage replay are required. Note: if the current session has ended, the recording and live broadcasting functions cannot be set.Users can pass custom fields, and the interface returns the parameters as-is.No pass, no return.
Notes:
- If class recording is set (live streaming is not set), more_data returns the live streaming player address of the class, and the pull stream address is empty.
- More_data returns the live player address and pull stream address of the lecture if the lecture is recorded and streamed live.
- To enable the recording of the on-the-spot scene, please turn on the record function first, otherwise, the recording of the on-the-spot scene is not available.
URL
https://api.eeo.cn/partner/api/course.api.php?action=setClassVideoMultiple
HTTP Request Methods
- POST
Coding format
- UTF-8
Request data
key | Required | More Restrictions | Instructions | Description |
---|---|---|---|---|
SID | Yes | Null | School ID | It is available through the eeo.cn application |
safeKey | Yes | Fixed 32-bit all lowercase characters | School authentication security key | safeKey=MD5(SECRET+timeStamp) |
timeStamp | Yes | Null | imestamp used by safeKey | Unix Epoch timeStamp is the number of seconds passed by 00:00 (world standard time) on January 1, 1970 |
courseId | Yes | Null | Course ID | Null |
classJson | Yes | Null | Class information array | Null |
└ Class 1 information object | No | Null | Set up the class section information object | Null |
└ classId | Yes | Null | Class ID | Null |
└ record | No | Null | Record the class(0 close,1 open) | Null |
└ recordScene | No | Null | Record on-the-spot scene(0 deactivate,1 activate) | Null |
└ live | No | Null | Live stream(0 close,1 open) | Null |
└ replay | No | Null | playback(0 close,1 open) | Null |
└ customColumn | No | 1-50 words,no distinction between Chinese and English,more than 50 will automatically intercept 50 words | User custom identity | Do not return as empty,the field is not returned for empty |
└ ······ | No | Null | Set up the class section information object | Null |
└ classId | Yes | No | Class ID | Null |
└ record | No | Null | Record the class(0 close,1 open) | Null |
└ recordScene | No | Null | Record on-the-spot scene(0 deactivate,1 activate) | Null |
└ live | No | Null | Live stream(0 close,1 open) | Null |
└ replay | No | Null | Playback(0 close,1 open) | Null |
└ watchByLogin | No | No or no, default values are used | Only after logging into ClassIn account is allowed to watch, without logging in cannot watch,0=Did not open,1=open | Two or more items of course record, live and replay are not enabled, and this parameter is not used |
└ allowUnloggedChat | No | No or no, default values are used | Unlogged users are allowed to participate in live chat and thumb up,0=Don't allow,1=allow | Class record and live are not enabled. This parameter is not used |
└ customColumn | No | 1-50 words,no distinction between Chinese and English,more than 50 will automatically intercept 50 words | User custom identity | Do not return as empty,the field is not returned for empty |
Response data
key | Type | Sample value | meaning |
---|---|---|---|
data | array | Returns an array of data information, including the following fields | |
└ more_data | array | [] | Returns an array of Data information |
└ live_url | string | https://api.eeo.cn/live.php?lessonKey=0fdc12bc3558164d | Lesson live player address |
└ live_info | array | [] | Returns an array of Data information |
└ RTMP | string | "rtmp://liveplay.eeo.cn/eeolive/576f5a8c97d9-183291632119a96?txSecret=f4bfe1afcf2592de61c11af9e0954c00&txTime=7d8d37cd" | Live streaming's pull flow address |
└ HLS | string | "https://liveplay.eeo.cn/eeolive/576f5a8c97d9-183291632119a96.m3u8?txSecret=f4bfe1afcf2592de61c11af9e0954c00&txTime=7d8d37cd" | Live streaming's pull flow address |
└ FLV | string | "https://liveplay.eeo.cn/eeolive/576f5a8c97d9-183291632119a96.flv?txSecret=f4bfe1afcf2592de61c11af9e0954c00&txTime=7d8d37cd" | Live streaming's pull flow address |
└ errno | number | 1 | The error code |
└ error | string | "Routine execution" | Error details |
└ ...... | [] | {......} | Error message object, including the following fields |
└ more_data | array | [] | Returns an array of Data information |
└ live_url | string | https://api.eeo.cn/live.php?lessonKey=0fdc12bc3558164d | Lesson live player address |
└ live_info | array | [] | Returns an array of Data information |
└ RTMP | string | "rtmp://liveplay.eeo.cn/eeolive/576f5a8c97d9-183291632119a96?txSecret=f4bfe1afcf2592de61c11af9e0954c00&txTime=7d8d37cd" | Pull flow address |
└ HLS | string | "https://liveplay.eeo.cn/eeolive/576f5a8c97d9-183291632119a96.m3u8?txSecret=f4bfe1afcf2592de61c11af9e0954c00&txTime=7d8d37cd" | Pull flow address |
└ FLV | string | "https://liveplay.eeo.cn/eeolive/576f5a8c97d9-183291632119a96.flv?txSecret=f4bfe1afcf2592de61c11af9e0954c00&txTime=7d8d37cd" | Pull flow address |
└ errno | number | ... | The error code |
└ error | string | "Normal execution" | Error list |
error_info | object | Return message object | |
└ errno | number | 1 | The error code |
└ error | string | "Normal execution" | Error list |
Sample
- HTTP request
POST /partner/api/course.api.php?action=setClassVideoMultiple HTTP/1.1
Host: www.eeo.cn
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache
SID=2339736&safeKey=6b5e624027b981fc2da5b1787c974281&timeStamp=1494392466&courseId=523689&classJson=[{"classId":"1419691","record":"1","live":"","replay":"","customColumn":123},{"classId":"1419693","record":"1","live":"","replay":"","customColumn":123}]
- Shell cURL analog request instruction
curl -H "Content-Type: application/x-www-form-urlencoded" -X "POST" \
-d "SID=1234567" \
-d "safeKey=0f7781b3033527a8cc2b1abbf45a5fd2" \
-d "timeStamp=1484719085" \
-d "courseId=123456" \
-d 'classJson=[ \
{ \
"classId":"1234", \
"record":"1", \
"live":"0", \
"replay":"0" \
}, \
{ \
"classId":"1235", \
"record":"1", \
"live":"0", \
"replay":"0" \
} \
]' \
"https://api.eeo.cn/partner/api/course.api.php?action=setClassVideoMultiple"
Response sample(The normal return json
packet example)
{
"data": [
{
"customColumn": "123",
"more_data": {
"live_url": "https://api.eeo.cn/live.php?lessonKey=0fdc12bc3558164d",
"live_info": {
"RTMP": "rtmp://liveplay.eeo.cn/eeolive/576f5a8c97d9-183291632119a96?txSecret=f4bfe1afcf2592de61c11af9e0954c00&txTime=7d8d37cd",
"HLS": "https://liveplay.eeo.cn/eeolive/576f5a8c97d9-183291632119a96.m3u8?txSecret=f4bfe1afcf2592de61c11af9e0954c00&txTime=7d8d37cd",
"FLV": "https://liveplay.eeo.cn/eeolive/576f5a8c97d9-183291632119a96.flv?txSecret=f4bfe1afcf2592de61c11af9e0954c00&txTime=7d8d37cd"
}
},
"errno": 1,
"error": "程序正常执行"
},
{
"customColumn": "123",
"more_data": {
"live_url": "https://api.eeo.cn/live.php?lessonKey=0fdc12bc3558164d",
"live_info": {
"RTMP": "rtmp://liveplay.eeo.cn/eeolive/576f5a8c97d9-183291632119a96?txSecret=f4bfe1afcf2592de61c11af9e0954c00&txTime=7d8d37cd",
"HLS": "https://liveplay.eeo.cn/eeolive/576f5a8c97d9-183291632119a96.m3u8?txSecret=f4bfe1afcf2592de61c11af9e0954c00&txTime=7d8d37cd",
"FLV": "https://liveplay.eeo.cn/eeolive/576f5a8c97d9-183291632119a96.flv?txSecret=f4bfe1afcf2592de61c11af9e0954c00&txTime=7d8d37cd"
}
},
"errno": 1,
"error": "程序正常执行"
}
],
"error_info": {
"errno": 1,
"error": "程序正常执行"
}
}
Error code instruction
Error code | Instruction |
---|---|
1 | Expression successful execution. |
100 | Expression parameter not all or error. |
102 | Expression dont have permissions(Security verification failed). |
104 | Expression operation failed/unknown error. |
114 | Expression service abnormality. |
142 | Expression scourse does not have this class information. |
143 | Expression there is no information about this class. |
144 | Expression the school does not have this course. |
149 | Expression courses have been deleted. |
155 | Expression the class section array must not be empty. |
212 | Expression this class has been removed. |
251 | Expression only when you open the recording session can you open the live stream or playback. |
252 | Expression video、live broadcast state, only 20 minutes before the class can be changed. |
253 | Expression video service has problems, please try again later. |
369 | Expression open class does not support this operation. |