class_docstr: WebGear_RTC is similar to WeGear API in many aspects but utilizes WebRTC technology under the hood instead of Motion JPEG, which
  makes it suitable for building powerful video-streaming solutions for all modern browsers as well as native clients available on
  all major platforms.
  
  WebGear_RTC is implemented with the help of aiortc library which is built on top of asynchronous I/O framework for Web Real-Time
  Communication (WebRTC) and Object Real-Time Communication (ORTC) and supports many features like SDP generation/parsing, Interactive
  Connectivity Establishment with half-trickle and mDNS support, DTLS key and certificate generation, DTLS handshake, etc.
  
  WebGear_RTC can handle multiple consumers seamlessly and provides native support for ICE (Interactive Connectivity Establishment)
  protocol, STUN (Session Traversal Utilities for NAT), and TURN (Traversal Using Relays around NAT) servers that help us to easily
  establish direct media connection with the remote peers for uninterrupted data flow. It also allows us to define our custom Server
  as a source to transform frames easily before sending them across the network(see this doc example).
  
  WebGear_RTC API works in conjunction with Starlette ASGI application and can also flexibly interact with Starlette's ecosystem of
  shared middleware, mountable applications, Response classes, Routing tables, Static Files, Templating engine(with Jinja2), etc.
  
  Additionally, WebGear_RTC API also provides internal wrapper around VideoGear, which itself provides internal access to both
  CamGear and PiGear APIs.
class_docstr_tok: ["WebGear_RTC","is","similar","to","WeGear","API","in","many","aspects","but","utilizes","WebRTC","technology","under","the","hood","instead","of","Motion","JPEG",",","which","makes","it","suitable","for","building","powerful","video-streaming","solutions","for","all","modern","browsers","as","well","as","native","clients","available","on","all","major","platforms",".","WebGear_RTC","is","implemented","with","the","help","of","aiortc","library","which","is","built","on","top","of","asynchronous","I\/O","framework","for","Web","Real-Time","Communication","(","WebRTC",")","and","Object","Real-Time","Communication","(","ORTC",")","and","supports","many","features","like","SDP","generation\/parsing",",","Interactive","Connectivity","Establishment","with","half-trickle","and","mDNS","support",",","DTLS","key","and","certificate","generation",",","DTLS","handshake",",","etc",".","WebGear_RTC","can","handle","multiple","consumers","seamlessly","and","provides","native","support","for","ICE","(","Interactive","Connectivity","Establishment",")","protocol",",","STUN","(","Session","Traversal","Utilities","for","NAT",")",",","and","TURN","(","Traversal","Using","Relays","around","NAT",")","servers","that","help","us","to","easily","establish","direct","media","connection","with","the","remote","peers","for","uninterrupted","data","flow",".","It","also","allows","us","to","define","our","custom","Server","as","a","source","to","transform","frames","easily","before","sending","them","across","the","network","(","see","this","doc","example",")",".","WebGear_RTC","API","works","in","conjunction","with","Starlette","ASGI","application","and","can","also","flexibly","interact","with","Starlette","'s","ecosystem","of","shared","middleware",",","mountable","applications",",","Response","classes",",","Routing","tables",",","Static","Files",",","Templating","engine","(","with","Jinja2",")",",","etc",".","Additionally",",","WebGear_RTC","API","also","provides","internal","wrapper","around","VideoGear",",","which","itself","provides","internal","access","to","both","CamGear","and","PiGear","APIs","."]
docstr: Gracefully shutdown video-server
docstr_tok: ["Gracefully","shutdown","video-server"]
code: def shutdown(self):
      """
      Gracefully shutdown video-server
      """
      if not (self.__default_rtc_server is None):
          self.__logging and logger.debug("Closing Video Server.")
          self.__default_rtc_server.terminate()
          self.__default_rtc_server = None
      # terminate internal server aswell.
      self.__default_rtc_server = None
  
file_path: vidgear/vidgear/gears/asyncio/webgear_rtc.py
imports: import os
  import time
  import fractions
  import asyncio
  import logging
  from os.path import expanduser
  from .helper import reducer, generate_webdata, create_blank_frame
  from ..helper import logger_handler, retrieve_best_interpolation, import_dependency_safe, logcurr_vidgear_ver
  from ..videogear import VideoGear
label_desc: Use image node_id 3 for calling the WebGear_RTC obj's underlying member method code with example usage: obj.shutdown() without return types