Lấy địa chỉ URL ghi hình lớp học

Mục lục

ClassIn cung cấp trình phát video hỗ trợ đa nền tảng, cho phép xem các lớp học được ghi hình từ ClassIn theo liên kết có sẵn. Nhận địa chỉ URL của trình phát để phát trực tiếp và phát lại video ghi hình theo ID khóa học và ID lớp học. Truyền các tham số SID, safekey, timestamp, ID lớp học, ID khóa học.

Lưu ý: Địa chỉ URL của khóa học hoặc lớp học là cố định và không cần phải lấy nhiều lần.

Chúng tôi đã tích hợp chức năng trò chuyện trực tuyến vào trang phát trực tiếp. Để thuận tiện cho việc thu thập thông tin khách hàng tiềm năng, tất cả người dùng cần điền số điện thoại di động và đăng nhập trước khi có thể trò chuyện, như hình dưới đây. Tất nhiên, để thuận tiện hơn cho bạn khi sử dụng chức năng này, chúng tôi vẫn cho phép thiết lập không cần đăng nhập. Vui lòng tham khảo cách thiết lập bên dưới.

livechat

Thiết lập miễn đăng nhập cho khung chat tại trang Livestream

  • Sau khi bạn có link phát trực tiếp
    • Ví dụ:https://www.eeo.cn/live.php?lessonKey=1ca102d29e61175f
    • Bạn cần thêm account、nickname、checkCode vào cuối đường link https://live.eeo.cn/live_partner.html?lessonKey=00d1c98a91c52568
    • Lưu ý: link miễn đăng nhập này khác với link phát trực tiếp
  • Các tham số cụ thể và quy tắc như sau
    • Các tham số secret, lessonKey, account, nickname, checkCode
    • secret là dãy SECRET xem tại Trang quản lý classin.com trong mục API
    • lessonKey lấy từ link phát trực tiếp
    • account là tài khoản của học sinh,nickname là biệt danh của học sinh
    • checkCode = md5(secret+lessonKey+account+nickname)
  • Link mẫu
    • https://live.eeo.cn/live_partner.html?
    • lessonKey=00d1c98a91c52568&account=13700000000&nickname=classin&checkCode=d8c57caf088529b4ddd15b0f694d847b

We provide you with a multi-platform support player to get the live or playback of the player address according to the course ID or class ID. Need to provide SID, safekey, timeStamp, course ID, class ID, and return to the player address and description after success.

Note: course or class url adress is fixed, so you just have to get it one time.

We have embedded a chat room function on the live page. To facilitate your collection of potential customer information, all users need to fill in their mobile phone numbers and log in before they can chat, as shown below. Of course, in order to make it more convenient for you to use this function, we provide an operation for all students in your institution to log in without logging in. Please refer to the following instructions

The live chat room will be free of second login #

  • When you are through Get the live replay player address after getting the player link
    • Example:https://www.eeo.cn/webcast.php?courseKey=xxx&lessonid=xxx
    • You can get from get the live replay player address courseKey、lessonid
    • You need add account、nickname、checkCode Joining together in https://live.eeo.cn/webcast_partner.html behind the address. Pay attention to:No need second time login address and Get the live replay player address not the same address
  • Specific parameters and rules are as follows::
    • Specific parameters have courseKey、lessonid、account、nickname、checkCode
    • Among them lessonid is selectable,All other parameters are required
    • account length is less than 32 characters,nickname length is less than 16 characters
    • checkCode = md5(secret+courseKey+account+nickname)
    • secret is SECRET,at EEO.cn API Docking the secret key there you can get
  • URL splicing sample
    • https://live.eeo.cn/webcast_partner.html?courseKey=7be856f28907f1a2&lessonid=123456&account=18600123456&nickname=eeo&checkCode=febe50cd50ba4d3af506bfa118a3845b

URL #

https://api.eeo.cn/partner/api/course.api.php?action=getWebcastUrl

HTTP Request Methods #

  • POST

Coding format #

  • UTF-8
 

Request data #

KeyBắt buộcYêu cầu thêmMô tảHướng dẫn
SIDBắt buộcID của trườngXem dữ liệu này tại Trang quản lý classin.com trong mục API
safeKeyBắt buộcFixed 32-bit all lowercase charactersKhóa bảo mật xác thực trường họcsafeKey=MD5(SECRET+timeStamp)
timeStampBắt buộcTheo Unix Epoch timestamp & có hiệu lực trong vòng 20 phútUnix Epoch timeStamp is the number of seconds passed by 00:00 (world standard time) on January 1, 1970
courseIdBắt buộcID khóa học
classIdID lớp học (lesson)

 

Response data #

KeyĐịnh dạngPhản hồiÝ nghĩa
datastringhttps://www.eeo.cn/webcast.php?courseKey=xxx&lessonid=xxxReturn live replay page address
error_infoobject Return message object
└ errnonumber1Mã lỗi
└ errorstring“Normal execution”Chi tiết lỗi

 

Sample #

  • HTTP request
POST /partner/api/course.api.php?action=getWebcastUrl HTTP/1.1
Host: www.eeo.cn
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache

SID=2339736&safeKey=c23f15a4382fd1da7e91a9697955b9bf&timeStamp=1493901829&courseId=536317&classId=1432593
  • 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 "classId=9876" \
    "https://api.eeo.cn/partner/api/course.api.php?action=getWebcastUrl"

Response sample(The normal return json packet example) #

{
  "data": "https://www.eeo.cn/webcast.php?courseKey=4fe1167f8060e809&lessonid=123456",
  "error_info": {
    "errno": 1,
    "error": "程序正常执行"
  }
}

Error code instruction #

Error codeInstruction
1Thành công
100Parameters sai định dạng hoặc không hoàn chỉnh
102Không có quyền thao tác (Xác thực bảo mật thất bại)
142Không có thông tin về khóa học này
143 Không có thông tin về lớp học này
144Không có khóa học này trong trường
149Khóa học này đã bị xóa
212Lớp học này đã bị xóa
369Lớp học công khai không hỗ trợ điều chỉnh