Open
Conversation
Member
Author
|
title属性にユーザー名を付加した。表示するにはスタイル調整する必要あり |
Member
Author
|
trms-devに音声チャット、フルスクリーン、画像と名前の関連付けまでデプロイした |
Member
Author
|
presenceチャンネルの接続ユーザー情報にuser_infoとあって、webrtc接続更新時にuser_infoをwebrtc接続後に再度pusher側のユーザーをログインし直して更新してユーザー名との関連付けを実現しようとしているが、Pusherのuser_infoが、最初にクライアントから登録されたuser_infoを使い続けるような状態になっている。 class PusherController < ApplicationController
protect_from_forgery :except => :auth
def auth
if session[:user_name].present?
session[:user_id] = request.session_options[:id]
response = Pusher[params[:channel_name]].authenticate(params[:socket_id], {
:user_id => request.session_options[:id],
:user_info => {
:name => session[:user_name],
:webrtc_id => session[:webrtc_id]
}
})
render :json => response
else
render :text => "Forbidden", :status => '403'
end
end
end |
Member
Author
|
Pusher presenceは残念ながら情報更新に弱かったので常にwebrtc IDとuser IDを関連づけるクライアントイベントをポーリングするようにした。 setInterval(function () {
channel.trigger('client-webrtc_info', {
user_id: channel.members.me.id,
webrtc_id: rtc._me,
});
}, 2000); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
どの映像が誰かを対応付ける