0
sailsアプリで以下のjsコードを使ってvedio呼び出しを適用しようとしていますが、 "nullのaddEventListener 'プロパティを読み取ることができません" 以下そのためのJSコードです:上記のためnullのプロパティ 'addEventListener'を読み取ることができません(JavaScript Sails App)
button.addEventListener('click', function() {
// Was on a call, so the button press means we are hanging up
if (onCall) {
onCall = false;
button.firstChild.nodeValue = 'video';
remoteRender.style.visibility = 'hidden';
session.bye();
session = null;
}
// Was not on a call, so the button press means we are ringing someone
else {
onCall = true;
button.firstChild.nodeValue = 'hang up';
remoteRender.style.visibility = 'visible';
session = makeCall(userAgent, target,
false, true,
remoteRender, null);
session.on('bye', function() {
onCall = false;
button.firstChild.nodeValue = 'video';
remoteRender.style.visibility = 'hidden';
session = null;
});
}
});
htmlコードさ:
<button id="alice-video-button" class="right" type="button">video</button>
plzのヘルプ。
感謝uは上記のコードを参照してくださいndは何が間違っていると言うPLできるのに役立ちます私は –
をDNGい
ホープそれはあなたのコードについて間違って何も思わないけど。あなたのコード 'button.addEventListenerを書くこの後' ... '; あなたの機能 ' VARボタン=のdocument.getElementById( 'アリス・ビデオ・ボタン')について書くことができます –