我正在使用opentok并连接到广播服务并在页面底部获取flash播放器的对象.
我怎么能把它放在一个特定的div ..
这是我用来连接opentol API的代码
function initiatecall() {
if (session != undefined) {
if (!iscalled) {
session.addEventListener("sessionConnected", sessionConnectedHandler);
session.addEventListener("streamCreated", streamCreatedHandler);
session.connect("21457612", token_id); // Replace with your API key and token. See https://dashboard.tokbox.com/projects
// and https://dashboard.tokbox.com/projects
iscalled = true;
$.ajax({
data: '{"ChatId":"' + chat_id + '","NurseId":"' + nurse_id + '","DeviceType":"Browser"}',
type: "POST",
dataType: "json",
contentType: "application/json;charset=utf-8",
url: "someurl.asmx/MakeCall",
success: function (data) { initiatecall(chat_id, session_id, token_id); },
eror: function (a, b, c) { alert(a.responseText); }
});
}
} else {
alert("Session Expired!!"); …Run Code Online (Sandbox Code Playgroud)