mirror of
https://github.com/pion/webrtc.git
synced 2025-10-05 15:16:52 +08:00

committed by
Michiel De Backker

parent
bd7c6ffc25
commit
e906728df3
19
apiobject.go
Normal file
19
apiobject.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package webrtc
|
||||
|
||||
// API is a repository for semi-global settings to WebRTC objects
|
||||
// In the simplest case, the DefaultAPI object should be used
|
||||
// rather then constructing a new API object.
|
||||
type API struct {
|
||||
settingEngine settingEngine
|
||||
mediaEngine MediaEngine
|
||||
}
|
||||
|
||||
var defaultAPI = NewAPI()
|
||||
|
||||
// NewAPI Creates a new API object for keeping semi-global settings to WebRTC objects
|
||||
func NewAPI() *API {
|
||||
a := new(API)
|
||||
initSettingEngine(&a.settingEngine)
|
||||
InitMediaEngine(&a.mediaEngine)
|
||||
return a
|
||||
}
|
Reference in New Issue
Block a user