RocketChat / RocketChat/Rocket.Chat

Some tips if You Add New ringtones for calling ( For review )

Open
#5,813 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Rocket.Chat Version: 0.50.1 developer version
Running Instances: 1
DB Replicaset OpLog:
Node Version:4.7.2
<Description For My idea ( add ringtones for pubic A/V Conversation /P2P Conversation /Custom Ringtones for Audio call only / Custom Ringtones For Video Call only / Custom Ringtones For Public Channels ..etc ) >
<<<< im work in WebRTCClass.coffe and evry thing working as well >>>>
I f u want add ringtones in ur RC server just do like that

open WebRTCClass.coffe & Go to line 567 You will finde somthing like that

fromUsername = Meteor.users.findOne(data.from)?.username
subscription = ChatSubscription.findOne({rid: data.room})

	if data.monitor is true
		icon = 'eye'
		title = "Monitor call from #{fromUsername}"
	else if subscription?.t is 'd'
		if data.media?.video
			icon = 'videocam'
			title = "Direct video call from #{fromUsername}"
		else
			icon = 'phone'
			title = "Direct audio call from #{fromUsername}"
	else
		if data.media?.video
			icon = 'videocam'
			title = "Group video call from #{subscription.name}"
		else
			icon = 'phone'
			title = "Group audio call from #{subscription.name}"

Replace With My Custom code
""
fromUsername = Meteor.users.findOne(data.from)?.username
subscription = ChatSubscription.findOne({rid: data.room})

	if data.monitor is true
		icon = 'eye'
		title = "Monitor call from #{fromUsername}"
	else if subscription?.t is 'd'
		if data.media?.video
			icon = 'videocam'
			title = "Direct video call from #{fromUsername}"
			audio = new Audio('sounds/incomming-ringtone.ogg')
			audio.play()
		else
			icon = 'phone'
			title = "Direct audio call from #{fromUsername}"
			audio = new Audio('sounds/incomming-ringtone.ogg')
			audio.play()

	else
		if data.media?.video
			icon = 'videocam'
			title = "Group video call from #{subscription.name}"
			audio = new Audio('sounds/incomming-ringtone.ogg')
			audio.play()				
		else
			icon = 'phone'
			title = "Group audio call from #{subscription.name}"
			audio = new Audio('sounds/incomming-ringtone.ogg')
			audio.play()

""

I know its Very Standard but i hope from developer To Update My idea like add Repeat the ringtones even the user 2 answer or shutdown ringtone when the user cancel the calling Rqst
THis idea its very simple
audio = new Audio('sounds/incomming-ringtone.ogg') //the path for ringtones
audio.play()

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in WebRTCClass.coffe around line 567, where incoming call types are identified and the ringtone is created with the Audio API. Review the call-answer and cancellation paths, then define completion as making the ringtone repeat while the call is unanswered and stop when the call is answered or cancelled.

Written by the indexing model from the issue text.

Assessment

Tech stack
coffeescript
Domain
audio-video-rtc, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.