I want to stream video to my users while they are chatting. I am wondering what should I do to add a button in the Header Section
of the chat panel so that the user can see a video in a modal dialog box when he clicks on the button?
I changed the template to add the button- that was not a problem. How can I configure the objects so that I can show the video from my server?
I also saw that there is a template called video.html
. Can I use this to launch and show my video content?
All help will be appreciated.
Asked
Active
Viewed 275 times
0

sonkhya
- 17
- 1
- 6
1 Answers
0
You'll have to write your own Converse plugin and then create a new modal instance that extends _converse.BootstrapModal
.
Take a look at the RoomDetailsModal as an example of how to do this.
To show the modal, you'll need to add an event handler to the ChatRoomView (or ChatBoxView). For example, here's the handler for the RoomDetailsModal.
If you're doing all of this in your own plugin (as you should), then you should add do all of that in the overrides section of the plugin.

JC Brand
- 2,652
- 18
- 18
-
I actually then emulated the process of telephone button in the toolbar section. Created a new
- link in toolbar.html and then added the necessary handlers in chat_view.js and built and and could invoke the popup of the box in the one -one chat window. however it is not working in the multichat room. Are there any specific events i should wait for in MUC case before loading my dialog in the initialize function of the plugin. I can post the codes here.
– sonkhya Oct 05 '18 at 14:07 -
The MUC has its own view, so you need to do the same for the ChatroomView. Read the source code, it'll become clear to you. – JC Brand Oct 06 '18 at 16:29
-
thanks for the lead. I solved the MUC case, its working fine now. I will look into the RoomsDetails Modal . if there are any issues will get back to you. – sonkhya Oct 07 '18 at 10:54