github.com/pion/webrtc/v3@v3.2.24/settingengine_js.go (about) 1 // SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly> 2 // SPDX-License-Identifier: MIT 3 4 //go:build js && wasm 5 // +build js,wasm 6 7 package webrtc 8 9 // SettingEngine allows influencing behavior in ways that are not 10 // supported by the WebRTC API. This allows us to support additional 11 // use-cases without deviating from the WebRTC API elsewhere. 12 type SettingEngine struct { 13 detach struct { 14 DataChannels bool 15 } 16 } 17 18 // DetachDataChannels enables detaching data channels. When enabled 19 // data channels have to be detached in the OnOpen callback using the 20 // DataChannel.Detach method. 21 func (e *SettingEngine) DetachDataChannels() { 22 e.detach.DataChannels = true 23 }