-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Feature/enhance typings #2518
Feature/enhance typings #2518
Changes from 4 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
declare namespace JanusJS { | ||
interface Dependencies { | ||
adapter: any; | ||
adapter: import('webrtc-adapter').IAdapter; | ||
WebSocket: (server: string, protocol: string) => WebSocket; | ||
isArray: (array: any) => array is Array<any>; | ||
extension: () => boolean; | ||
httpAPICall: (url: string, options: any) => void; | ||
} | ||
interface DependenciesResult { | ||
} | ||
|
||
interface DependenciesResult { | ||
adapter: any; | ||
newWebSocket: (server: string, protocol: string) => WebSocket; | ||
isArray: (array: any) => array is Array<any>; | ||
|
@@ -20,7 +20,7 @@ declare namespace JanusJS { | |
Debug = 'debug', | ||
Log = 'log', | ||
Warning = 'warn', | ||
Error = 'error' | ||
Error = 'error', | ||
} | ||
|
||
interface JSEP {} | ||
|
@@ -52,7 +52,7 @@ declare namespace JanusJS { | |
Stopped = 'stopped', | ||
SlowLink = 'slow_link', | ||
Preparing = 'preparing', | ||
Refreshing = 'refreshing' | ||
Refreshing = 'refreshing', | ||
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. See above. |
||
} | ||
|
||
interface Message { | ||
|
@@ -127,6 +127,9 @@ declare namespace JanusJS { | |
handleRemoteJsep(params: { jsep: JSEP }): void; | ||
dtmf(params: any): void; | ||
data(params: any): void; | ||
isAudioMuted(): boolean; | ||
muteAudio(): void; | ||
unmuteAudio(): void; | ||
Comment on lines
+130
to
+132
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. This is the reason why this pr was created. And I also noticed that adapter has |
||
isVideoMuted(): boolean; | ||
muteVideo(): void; | ||
unmuteVideo(): void; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ | |
}, | ||
"devDependencies": { | ||
"rollup": "^0.50.0", | ||
"rollup-plugin-replace": "^2.0.0" | ||
"rollup-plugin-replace": "^2.0.0", | ||
"webrtc-adapter": "^7.7.0" | ||
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. While 7.7.0 is indeed the latest version, the demos still only ship 7.4.0, as that's the latest you can find on cdnjs. Not sure if this is meant for server-side usage of janus.js, or for embedding in other frameworks, but maybe it would be best to stick to 7.4.0 here too? (unless this dependency downloads the right version independently of what the web page does). |
||
} | ||
} |
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.
Why did you add a comma here? It's the last item in the list.
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.
prettier
did it for me( sorry, I'll fix