ソースを参照

Fixes issues in example.js

master
hristoterezov 9年前
コミット
490d825ef9
1個のファイルの変更10行の追加12行の削除
  1. 10
    12
      doc/example/example.js

+ 10
- 12
doc/example/example.js ファイルの表示

1
 var options = {
1
 var options = {
2
     hosts: {
2
     hosts: {
3
-        call_control: "callcontrol.chaos.hipchat.me",
4
-        focus: "focus.chaos.hipchat.me",
5
-        domain: 'chaos.hipchat.me',
6
-        muc: 'conference.chaos.hipchat.me', // FIXME: use XEP-0030
7
-        bridge: 'jitsi-videobridge.chaos.hipchat.me', // FIXME: use XEP-0030
3
+        domain: 'jitsi-meet.example.com',
4
+        muc: 'conference.jitsi-meet.example.com', // FIXME: use XEP-0030
5
+        bridge: 'jitsi-videobridge.jitsi-meet.example.com', // FIXME: use XEP-0030
8
     },
6
     },
9
-    bosh: '//chaos.hipchat.me/http-bind', // FIXME: use xep-0156 for that
7
+    bosh: '//jitsi-meet.example.com/http-bind', // FIXME: use xep-0156 for that
10
     clientNode: 'http://jitsi.org/jitsimeet', // The name of client node advertised in XEP-0115 'c' stanza
8
     clientNode: 'http://jitsi.org/jitsimeet', // The name of client node advertised in XEP-0115 'c' stanza
11
 }
9
 }
12
 
10
 
40
             });
38
             });
41
         if(localTracks[i].getType() == "video") {
39
         if(localTracks[i].getType() == "video") {
42
             $("body").append("<video autoplay='1' id='localVideo" + i + "' />");
40
             $("body").append("<video autoplay='1' id='localVideo" + i + "' />");
43
-            localTracks[i].attach($("#localVideo" + i ));
41
+            localTracks[i].attach($("#localVideo" + i)[0]);
44
         } else {
42
         } else {
45
             $("body").append("<audio autoplay='1' muted='true' id='localAudio" + i + "' />");
43
             $("body").append("<audio autoplay='1' muted='true' id='localAudio" + i + "' />");
46
-            localTracks[i].attach($("#localAudio" + i ));
44
+            localTracks[i].attach($("#localAudio" + i)[0]);
47
         }
45
         }
48
         if(isJoined)
46
         if(isJoined)
49
             room.addTrack(localTracks[i]);
47
             room.addTrack(localTracks[i]);
79
     } else {
77
     } else {
80
         $("body").append("<audio autoplay='1' id='" + participant + "audio" + idx + "' />");
78
         $("body").append("<audio autoplay='1' id='" + participant + "audio" + idx + "' />");
81
     }
79
     }
82
-    track.attach($("#" + id));
80
+    track.attach($("#" + id)[0]);
83
 }
81
 }
84
 
82
 
85
 /**
83
 /**
105
  * That function is called when connection is established successfully
103
  * That function is called when connection is established successfully
106
  */
104
  */
107
 function onConnectionSuccess(){
105
 function onConnectionSuccess(){
108
-    room = connection.initJitsiConference("conference11", confOptions);
106
+    room = connection.initJitsiConference("conference", confOptions);
109
     room.on(JitsiMeetJS.events.conference.TRACK_ADDED, onRemoteTrack);
107
     room.on(JitsiMeetJS.events.conference.TRACK_ADDED, onRemoteTrack);
110
     room.on(JitsiMeetJS.events.conference.TRACK_REMOVED, function (track) {
108
     room.on(JitsiMeetJS.events.conference.TRACK_REMOVED, function (track) {
111
         console.log("track removed!!!" + track);
109
         console.log("track removed!!!" + track);
175
                 function () {
173
                 function () {
176
                     console.log("local track stoped");
174
                     console.log("local track stoped");
177
                 });
175
                 });
178
-            localTracks[1].attach($("#localVideo1"));
176
+            localTracks[1].attach($("#localVideo1")[0]);
179
             room.addTrack(localTracks[1]);
177
             room.addTrack(localTracks[1]);
180
         }).catch(function (error) {
178
         }).catch(function (error) {
181
             console.log(error);
179
             console.log(error);
224
     connection.connect();
222
     connection.connect();
225
     JitsiMeetJS.createLocalTracks({devices: ["audio", "video"]}).
223
     JitsiMeetJS.createLocalTracks({devices: ["audio", "video"]}).
226
         then(onLocalTracks).catch(function (error) {
224
         then(onLocalTracks).catch(function (error) {
227
-            console.log(error);
225
+            throw error;
228
         });
226
         });
229
 }).catch(function (error) {
227
 }).catch(function (error) {
230
     console.log(error);
228
     console.log(error);

読み込み中…
キャンセル
保存