-
Notifications
You must be signed in to change notification settings - Fork 11.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FIX] Admin panel custom sounds, multiple sound playback fix and added single play/pause button #16215
Conversation
@sampaiodiego @tassoevan Would you please review :) |
Hey! Really cool what you did, works better in my opinion. Just make it so when the sound finishes playing it on its own resets to the play button. |
@gabriellsh I have done the requested changes. But doing so I encountered some more corner case issues. I have solved them too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could just add this block inside the play event.
document.getElementById(this._id).onended = function() { t.isPlayingId.set(''); this.onended = null; };
Then you don't have to work with settimeout and the process is straightforward.
Obs.: don't forget to remove the event once the audio is stopped.
@gabriellsh Thank you very much. This reduced lots of code and also I don't have to worry about end cases which I faced using the settimeout. 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
…users_and_rooms * 'develop' of github.com:RocketChat/Rocket.Chat: [FIX] Omnichannel SMS / WhatsApp integration errors due to missing location data (#17288) [FIX] User search on directory not working correctly (#17299) [FIX] Can not save Unread Tray Icon Alert user preference (#16288) (#16313) [FIX] Variable rendering problem on Import recent history page (#15997) [FIX] Admin panel custom sounds, multiple sound playback fix and added single play/pause button (#16215) [FIX] Discussions created from inside DMs were not working (#17282) [FIX] translation for nl (#16742) [FIX] No maxlength defined for custom user status (#16534) [FIX] Directory users email sort button (#16606) [FIX] In Create a New Channel, input should be focused on channel name instead of invite users (#16405) [FIX] Email not verified message (#16236) [FIX] Directory default tab (#17283) Update ru.i18n.json (#16869) [FIX] Avatar on sidebar when showing real names (#17286) Update Apps-Engine to stable version (#17287) [NEW][ENTERPRISE] Auto close abandoned Omnichannel rooms (#17055) Static props for Administration route components (#17285) [NEW] Default favorite channels (#16025) Apply $and helper to message template (#17280)
…mailer * 'develop' of github.com:RocketChat/Rocket.Chat: (93 commits) [FIX] Red color error outline is not removed after password update (#16536) [FIX] Change wording to start DM from info panel (#8799) New hooks for RouterContext (#17305) [FIX] SAML assertion signature enforcement (#17278) [FIX] LDAP users lose session on refresh (#17302) [NEW] Add MMS support to Voxtelesys (#17217) [FIX] Popover component doesn't have scroll (#17198) [FIX] Omnichannel SMS / WhatsApp integration errors due to missing location data (#17288) [FIX] User search on directory not working correctly (#17299) [FIX] Can not save Unread Tray Icon Alert user preference (#16288) (#16313) [FIX] Variable rendering problem on Import recent history page (#15997) [FIX] Admin panel custom sounds, multiple sound playback fix and added single play/pause button (#16215) [FIX] Discussions created from inside DMs were not working (#17282) [FIX] translation for nl (#16742) [FIX] No maxlength defined for custom user status (#16534) [FIX] Directory users email sort button (#16606) [FIX] In Create a New Channel, input should be focused on channel name instead of invite users (#16405) [FIX] Email not verified message (#16236) [FIX] Directory default tab (#17283) Update ru.i18n.json (#16869) ...
…dm/mailer * 'adm/mailer' of github.com:RocketChat/Rocket.Chat: (79 commits) removed unecessary prop Fixed sendMail function Removed Log, Success message Permissions added route component [FIX] "Invalid Invite" message when registration is disabled (#17226) Added route, error handling. [FIX] Red color error outline is not removed after password update (#16536) [FIX] Change wording to start DM from info panel (#8799) New hooks for RouterContext (#17305) [FIX] SAML assertion signature enforcement (#17278) [FIX] LDAP users lose session on refresh (#17302) [NEW] Add MMS support to Voxtelesys (#17217) [FIX] Popover component doesn't have scroll (#17198) [FIX] Omnichannel SMS / WhatsApp integration errors due to missing location data (#17288) [FIX] User search on directory not working correctly (#17299) [FIX] Can not save Unread Tray Icon Alert user preference (#16288) (#16313) [FIX] Variable rendering problem on Import recent history page (#15997) [FIX] Admin panel custom sounds, multiple sound playback fix and added single play/pause button (#16215) [FIX] Discussions created from inside DMs were not working (#17282) ...
…nto view-logs * 'develop' of https://github.com/RocketChat/Rocket.Chat: (31 commits) Fixed componentes width (#17322) [IMPROVE] Administration -> Mailer Rewrite to React. (#17191) Regression: Storybook added flowrouter group mock (#17321) [NEW] Feature/custom oauth mail field and interpolation for mapped fields (#15690) [FIX] "Invalid Invite" message when registration is disabled (#17226) [FIX] Red color error outline is not removed after password update (#16536) [FIX] Change wording to start DM from info panel (#8799) New hooks for RouterContext (#17305) [FIX] SAML assertion signature enforcement (#17278) [FIX] LDAP users lose session on refresh (#17302) [NEW] Add MMS support to Voxtelesys (#17217) [FIX] Popover component doesn't have scroll (#17198) [FIX] Omnichannel SMS / WhatsApp integration errors due to missing location data (#17288) [FIX] User search on directory not working correctly (#17299) [FIX] Can not save Unread Tray Icon Alert user preference (#16288) (#16313) [FIX] Variable rendering problem on Import recent history page (#15997) [FIX] Admin panel custom sounds, multiple sound playback fix and added single play/pause button (#16215) [FIX] Discussions created from inside DMs were not working (#17282) [FIX] translation for nl (#16742) [FIX] No maxlength defined for custom user status (#16534) ...
Closes #16213 #16208
Before changes
(1) All sounds can be played simultaneously which overlaps with the other ones.
(2) There are seperate buttons for play and pause.
After changes:
(1) One sound can be played at a time.
(2) There is a single button for play and pause which looks consistent with most of the media players and is more handy for admins than having seperate buttons for play and pause.