mirror of
https://github.com/pion/webrtc.git
synced 2025-10-30 02:12:03 +08:00
Update examples
TestNonFatalRead now has an timeout. Examples now use Mime types, instead of raw strings. Fixes #839
This commit is contained in:
committed by
Sean DuBois
parent
8a0df90831
commit
7e049ec5ec
@@ -133,19 +133,22 @@ func main() {
|
||||
|
||||
if connectionState == webrtc.ICEConnectionStateConnected {
|
||||
fmt.Println("Ctrl+C the remote client to stop the demo")
|
||||
} else if connectionState == webrtc.ICEConnectionStateFailed ||
|
||||
connectionState == webrtc.ICEConnectionStateDisconnected {
|
||||
closeErr := oggFile.Close()
|
||||
if closeErr != nil {
|
||||
} else if connectionState == webrtc.ICEConnectionStateFailed {
|
||||
if closeErr := oggFile.Close(); closeErr != nil {
|
||||
panic(closeErr)
|
||||
}
|
||||
|
||||
closeErr = ivfFile.Close()
|
||||
if closeErr != nil {
|
||||
if closeErr := ivfFile.Close(); closeErr != nil {
|
||||
panic(closeErr)
|
||||
}
|
||||
|
||||
fmt.Println("Done writing media files")
|
||||
|
||||
// Gracefully shutdown the peer connection
|
||||
if closeErr := peerConnection.Close(); closeErr != nil {
|
||||
panic(closeErr)
|
||||
}
|
||||
|
||||
os.Exit(0)
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user