This repository has been archived by the owner on May 29, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
364 additions
and
121 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export class BlobMock implements Blob { | ||
size = 0; | ||
type = ''; | ||
slice = () => this; | ||
} |
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import {FactoryProvider} from '@angular/core'; | ||
import {USER_AGENT} from '@ng-web-apis/common'; | ||
import {LOCATION} from '@ng-web-apis/common'; | ||
import {SSR_LOCATION} from '../tokens/ssr-location'; | ||
import {identity} from '../utils/functions'; | ||
|
||
export const UNIVERSAL_LOCATION: FactoryProvider = { | ||
provide: USER_AGENT, | ||
provide: LOCATION, | ||
deps: [SSR_LOCATION], | ||
useFactory: identity, | ||
}; |
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
20 changes: 10 additions & 10 deletions
20
projects/universal/src/constants/universal-speech-synthesis.ts
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 |
---|---|---|
@@ -1,23 +1,23 @@ | ||
import {ValueProvider} from '@angular/core'; | ||
import {SPEECH_SYNTHESIS} from '@ng-web-apis/common'; | ||
import {alwaysFalse, empty, emptyArray} from '../utils/functions'; | ||
import {alwaysFalse, emptyArray, emptyFunction} from '../utils/functions'; | ||
|
||
const MOCK: SpeechSynthesis = { | ||
export const SPEECH_SYNTHESIS_MOCK: SpeechSynthesis = { | ||
paused: false, | ||
pending: false, | ||
speaking: false, | ||
onvoiceschanged: empty, | ||
addEventListener: empty, | ||
removeEventListener: empty, | ||
onvoiceschanged: emptyFunction, | ||
addEventListener: emptyFunction, | ||
removeEventListener: emptyFunction, | ||
dispatchEvent: alwaysFalse, | ||
cancel: empty, | ||
pause: empty, | ||
resume: empty, | ||
speak: empty, | ||
cancel: emptyFunction, | ||
pause: emptyFunction, | ||
resume: emptyFunction, | ||
speak: emptyFunction, | ||
getVoices: emptyArray, | ||
}; | ||
|
||
export const UNIVERSAL_SPEECH_SYNTHESIS: ValueProvider = { | ||
provide: SPEECH_SYNTHESIS, | ||
useValue: MOCK, | ||
useValue: SPEECH_SYNTHESIS_MOCK, | ||
}; |
Oops, something went wrong.