-
Notifications
You must be signed in to change notification settings - Fork 27
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/web 3039 ios notification undefined #3301
Closed
Closed
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
580d445
Release - 0.12.16 (#3116)
KaustubhKumar05 f185635
Release - 0.12.17
raviteja83 66b20cd
Release - 0.12.18
raviteja83 a015a71
Update README.md (#3222)
KaustubhKumar05 b1bdfdb
Release - 0.12.19
raviteja83 c094ee2
feat: apply policy settings to tracks added via addTrack
raviteja83 da50781
Release - 0.12.20
raviteja83 e2911e4
Merge branch 'dev'
raviteja83 5cee327
fix: add stats and websocket url
hdz-666 2b9eb75
fix: add new changes for undefined notif
hdz-666 b56b4c0
fix: add new changes for ios logging
hdz-666 bb132e3
fix: add new changes for undefined notif
hdz-666 65042d4
fix: add new changes for undefined notif
hdz-666 6fe8cc7
fix: add new changes for undefined notif
hdz-666 e606efd
fix: add new logs for verifying ios reference errorr
hdz-666 b2aa3ff
fix: added more debug logs
ygit 832cb65
fix: add new fix for browser
hdz-666 caf868b
fix: add new fix for browser
hdz-666 a405931
fix: remove console.log
hdz-666 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,20 +6,36 @@ import { useHMSVanillaStore } from '../primitives/HmsRoomProvider'; | |
// Do not prompt if preview is not available. Skips for beam | ||
export const useAwayNotifications = () => { | ||
const vanillaStore = useHMSVanillaStore(); | ||
// eslint-disable-next-line complexity | ||
const requestPermission = useCallback(async () => { | ||
// Headless check for beam | ||
if (navigator.webdriver) { | ||
return; | ||
} | ||
if (!Notification || Notification?.permission === 'granted' || Notification?.permission === 'denied') { | ||
return; | ||
} | ||
const unsubscribe = vanillaStore.subscribe(async role => { | ||
if (role && role !== '__internal_recorder') { | ||
await Notification.requestPermission(); | ||
unsubscribe?.(); | ||
|
||
try { | ||
if (navigator.webdriver) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. let us combine the 3 if blocks |
||
return; | ||
} | ||
if (!('Notification' in window)) { | ||
// Notifications not supported | ||
return; | ||
} | ||
}, selectLocalPeerRoleName); | ||
|
||
if (!Notification) { | ||
return; | ||
} | ||
|
||
if (Notification?.permission === 'granted' || Notification?.permission === 'denied') { | ||
return; | ||
} | ||
console.log('###### Requesting Notification Permission unsubscribe', Notification); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove test log. check with yogesh and 16.5.1 in browserstack |
||
const unsubscribe = vanillaStore.subscribe(async role => { | ||
if (role && role !== '__internal_recorder') { | ||
await Notification?.requestPermission(); | ||
unsubscribe?.(); | ||
} | ||
}, selectLocalPeerRoleName); | ||
} catch (e) { | ||
console.log(e); | ||
} | ||
}, [vanillaStore]); | ||
|
||
const showNotification = useCallback((title: string, options?: NotificationOptions) => { | ||
|
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
@hdz-666 can we make sure we create branches from proper base branches. always create from dev instead of another branches