Subversion Repositories qbpwcf-lib(archive)

Rev

Rev 910 | Rev 915 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<?php

#使用命名空間qbpwcf
namespace qbpwcf;

#匯入外部套件
include("/usr/lib/qbpwcf-devel/allInOne.php");

#end point
define("EndPoint","https://eu.distancelearning.cloud");

#SharedSecret
define("SharedSecret","gh0pXegXsmR9qVBQIcFPb2RCAfGESVirwU2zTGiK22Y");

/*

#getCheckSum test case - 1 - start

#函式說明:
#計算checksum
#回傳結果:
#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
#$reuslt["error"],執行不正常結束的錯訊息陣列.
#$result["function"],當前執行的函式名稱.
#$result["content"],內容.
#必填參數:
#$conf["input"],字串,要計算checksum的內容.
$conf["input"]="test input string";
#$conf["sharedSecret"],字串,SharedSecret.
$conf["SharedSecret"]=SharedSecret;
$getCheckSum=bigbluebutton::getCheckSum($conf);

var_dump($getCheckSum);

#getCheckSum test case - 1 - end

*/

/*

#listRooms test case - 1 - start

#函式說明:
#取得會議室清單
#回傳結果:
#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
#$reuslt["error"],執行不正常結束的錯訊息陣列.
#$result["function"],當前執行的函式名稱.
#$result["content"],內容.
#必填參數:
#$conf["fileArgu"],字串,變數__FILE__的內容.
$conf["fileArgu"]=__FILE__;
#$conf["bbbUrl"],字串,提供bbb服務的主機名稱.
$conf["bbbUrl"]=EndPoint;
#$conf["sharedSecret"],字串,SharedSecret.
$conf["SharedSecret"]=SharedSecret;
#可省略參數:
#無.
#備註:
#建構中...
$listRooms=bigbluebutton::listRooms($conf);

var_dump($listRooms);

#listRooms test case - 1 - end

*/

/*

#createRoom test case - 1 - start

#函式說明:
#建立會議室清單
#回傳結果:
#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
#$reuslt["error"],執行不正常結束的錯訊息陣列.
#$result["function"],當前執行的函式名稱.
#$result["content"],回應的xml物件.
#$result["res"]["returncode"],bbb server的回應,代表API的要求狀態識別.
#$result["res"]["meetingID"],bbb server的回應,會議室識別碼.
#$result["res"]["parentMeetingID"],bbb server的回應,父會議室識別碼
#$result["res"]["attendeePW"],bbb server的回應,vier password.
#$result["res"]["moderatorPW"],bbb server的回應,admin password.
#$result["res"]["createTime"],bbb server的回應,unix建立時間戳記.
#$result["res"]["voiceBridge"],bbb server的回應,voice id.
#$result["res"]["dialNumber"],bbb server的回應,phone call number.
#$result["res"]["hasUserJoined"],bbb server的回應,是否已經有使用者了.
#$result["res"]["duration"],bbb server的回應,會議室的時間長度限制.
#$result["res"]["hasBeenForciblyEnded"],bbb server的回應,是否已經結束會議了.
#$result["xml"],回應的xml格式內容.
#必填參數:
#$conf["fileArgu"],字串,變數__FILE__的內容.
$conf["fileArgu"]=__FILE__;
#$conf["bbbUrl"],字串,提供bbb服務的主機名稱.
$conf["bbbUrl"]=EndPoint;
#$conf["sharedSecret"],字串,SharedSecret.
$conf["SharedSecret"]=SharedSecret;
#$conf["meetingName"],字串,會議的名稱.
$conf["meetingName"]="qbpwcf";
#$conf["moderatorPW"],字串,管理者的密碼.
$conf["moderatorPW"]="superfedoralinux";
#$conf["attendeePW"],字串,訪客的密碼.
$conf["attendeePW"]="000000";
#可省略參數:
#$conf["autoStartRecording"],字串,預設為"true",代表要會議一開始就錄影反之為"false".
#$conf["autoStartRecording"]="true".
#參考資料
#https://docs.bigbluebutton.org/dev/api.html#usage
#https://docs.bigbluebutton.org/dev/api.html#getmeetings
$createRoom=bigbluebutton::createRoom($conf);
unset($conf);

var_dump($createRoom);

#createRoom test case - 1 - end

*/

/*

#createRoom test case - 2 - start

#函式說明:
#建立會議室清單
#回傳結果:
#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
#$reuslt["error"],執行不正常結束的錯訊息陣列.
#$result["function"],當前執行的函式名稱.
#$result["content"],回應的xml物件.
#$result["res"]["returncode"],bbb server的回應,代表API的要求狀態識別.
#$result["res"]["meetingID"],bbb server的回應,會議室識別碼.
#$result["res"]["parentMeetingID"],bbb server的回應,父會議室識別碼
#$result["res"]["attendeePW"],bbb server的回應,vier password.
#$result["res"]["moderatorPW"],bbb server的回應,admin password.
#$result["res"]["createTime"],bbb server的回應,unix建立時間戳記.
#$result["res"]["voiceBridge"],bbb server的回應,voice id.
#$result["res"]["dialNumber"],bbb server的回應,phone call number.
#$result["res"]["hasUserJoined"],bbb server的回應,是否已經有使用者了.
#$result["res"]["duration"],bbb server的回應,會議室的時間長度限制.
#$result["res"]["hasBeenForciblyEnded"],bbb server的回應,是否已經結束會議了.
#$result["xml"],回應的xml格式內容.
#必填參數:
#$conf["fileArgu"],字串,變數__FILE__的內容.
$conf["fileArgu"]=__FILE__;
#$conf["bbbUrl"],字串,提供bbb服務的主機名稱.
$conf["bbbUrl"]=EndPoint;
#$conf["sharedSecret"],字串,SharedSecret.
$conf["SharedSecret"]=SharedSecret;
#$conf["meetingName"],字串,會議的名稱.
$conf["meetingName"]="測試會議室";
#$conf["moderatorPW"],字串,管理者的密碼.
$conf["moderatorPW"]="superfedoralinux";
#$conf["attendeePW"],字串,訪客的密碼.
$conf["attendeePW"]="000000";
#可省略參數:
#$conf["autoStartRecording"],字串,預設為"true",代表要會議一開始就錄影反之為"false".
#$conf["autoStartRecording"]="true".
#參考資料
#https://docs.bigbluebutton.org/dev/api.html#usage
#https://docs.bigbluebutton.org/dev/api.html#getmeetings
$createRoom=bigbluebutton::createRoom($conf);
unset($conf);

var_dump($createRoom);

#createRoom test case - 2 - end

*/

/*

#enterRoom test case - 1 - start

#函式說明:
#加入會議室
#回傳結果:
#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
#$reuslt["error"],執行不正常結束的錯訊息陣列.
#$result["function"],當前執行的函式名稱.
#$result["content"],回應的xml物件.
#$result["res"]["returncode"],bbb server的回應,代表API的要求狀態識別.
#$result["res"]["url"],進入會議室的網址.
#$result["xml"],回應的xml格式內容.
#必填參數:
#$conf["fileArgu"],字串,變數__FILE__的內容.
$conf["fileArgu"]=__FILE__;
#$conf["bbbUrl"],字串,提供bbb服務的主機名稱.
$conf["bbbUrl"]=EndPoint;
#$conf["sharedSecret"],字串,SharedSecret.
$conf["SharedSecret"]=SharedSecret;
#$conf["name"],字串,你的名字.
$conf["name"]="主持人";
#$conf["meetingID"],字串,會議室識別碼.
$conf["meetingID"]=$createRoom["res"]["meetingID"];
#$conf["password"],字串,會議室密碼.
$conf["password"]=$createRoom["res"]["moderatorPW"];
#可省略參數:
#無.
#參考資料:
#https://docs.bigbluebutton.org/dev/api.html#join
#備註:
#無.
$enterRoom=bigbluebutton::enterRoom($conf);
unset($conf);

var_dump($enterRoom);

#enterRoom test case - 1 - end

*/

/*

#enterRoom test case - 2 - start

#函式說明:
#加入會議室
#回傳結果:
#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
#$reuslt["error"],執行不正常結束的錯訊息陣列.
#$result["function"],當前執行的函式名稱.
#$result["content"],回應的xml物件.
#$result["res"]["returncode"],bbb server的回應,代表API的要求狀態識別.
#$result["res"]["url"],進入會議室的網址.
#$result["xml"],回應的xml格式內容.
#必填參數:
#$conf["fileArgu"],字串,變數__FILE__的內容.
$conf["fileArgu"]=__FILE__;
#$conf["bbbUrl"],字串,提供bbb服務的主機名稱.
$conf["bbbUrl"]=EndPoint;
#$conf["sharedSecret"],字串,SharedSecret.
$conf["SharedSecret"]=SharedSecret;
#$conf["name"],字串,你的名字.
$conf["name"]="與會者";
#$conf["meetingID"],字串,會議室識別碼.
$conf["meetingID"]=$createRoom["res"]["meetingID"];
#$conf["password"],字串,會議室密碼.
$conf["password"]=$createRoom["res"]["attendeePW"];
#可省略參數:
#無.
#參考資料:
#https://docs.bigbluebutton.org/dev/api.html#join
#備註:
#無.
$enterRoom=bigbluebutton::enterRoom($conf);
unset($conf);

var_dump($enterRoom);

#enterRoom test case - 2 - end

*/

/*

#getRecord test case - 1 - start

#函式說明:
#取得會議室的錄影資料
#回傳結果:
#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
#$reuslt["error"],執行不正常結束的錯訊息陣列.
#$result["function"],當前執行的函式名稱.
#$result["content"],回應的xml物件.
#$result["xml"],回應的xml格式內容.
#必填參數:
#$conf["fileArgu"],字串,變數__FILE__的內容.
$conf["fileArgu"]=__FILE__;
#$conf["bbbUrl"],字串,提供bbb服務的主機名稱.
$conf["bbbUrl"]=EndPoint;
#$conf["sharedSecret"],字串,SharedSecret.
$conf["SharedSecret"]=SharedSecret;
#可省略參數:
#$conf["meetingID"],字串,會議室識別碼,有的話可以找特定的會議室錄影資料.
#$conf["meetingID"]="";
#$conf["recordID"],字串,有的話可以指定要找的特定一個錄影.
#$conf["recordID"]="";
#參考資料:
#https://docs.bigbluebutton.org/dev/api.html#getrecordings
#備註:
#無.
$getRecord=bigbluebutton::getRecord($conf);
unset($conf);

var_dump($getRecord);

#getRecord test case - 1 - end

*/

/*

#getRecord test case - 2 - start

#函式說明:
#取得會議室的錄影資料
#回傳結果:
#$result["status"],執行是否正常,"true"代表正常,"false"代表不正常.
#$reuslt["error"],執行不正常結束的錯訊息陣列.
#$result["function"],當前執行的函式名稱.
#$result["content"],回應的xml物件.
#$result["xml"],回應的xml格式內容.
#必填參數:
#$conf["fileArgu"],字串,變數__FILE__的內容.
$conf["fileArgu"]=__FILE__;
#$conf["bbbUrl"],字串,提供bbb服務的主機名稱.
$conf["bbbUrl"]=EndPoint;
#$conf["sharedSecret"],字串,SharedSecret.
$conf["SharedSecret"]=SharedSecret;
#可省略參數:
#$conf["meetingID"],字串,會議室識別碼,有的話可以找特定的會議室錄影資料.
$conf["meetingID"]="e6969fe2-450e-11ec-8cbc-525411123501";
#$conf["recordID"],字串,有的話可以指定要找的特定一個錄影.
#$conf["recordID"]="";
#參考資料:
#https://docs.bigbluebutton.org/dev/api.html#getrecordings
#備註:
#無.
$getRecord=bigbluebutton::getRecord($conf);
unset($conf);

var_dump($getRecord);

#getRecord test case - 2 - end

*/

?>