mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-21 04:39:06 +00:00
minor refactor
This commit is contained in:
@@ -1,16 +1,17 @@
|
||||
import ast
|
||||
import asyncio
|
||||
import configparser
|
||||
import logging
|
||||
import time
|
||||
import uuid
|
||||
import threading
|
||||
import configparser
|
||||
|
||||
import httpx
|
||||
import pyaudio
|
||||
import requests
|
||||
import ast
|
||||
import stamina
|
||||
from aiortc import (RTCPeerConnection, RTCSessionDescription)
|
||||
from aiortc.contrib.media import (MediaPlayer, MediaRelay)
|
||||
|
||||
from utils.server_utils import Mutex
|
||||
|
||||
logger = logging.getLogger("pc")
|
||||
@@ -19,13 +20,14 @@ file_lock = Mutex(open("test_sm_6.txt", "a"))
|
||||
config = configparser.ConfigParser()
|
||||
config.read('config.ini')
|
||||
|
||||
|
||||
class StreamClient:
|
||||
def __init__(
|
||||
self,
|
||||
signaling,
|
||||
url="http://127.0.0.1:1250",
|
||||
play_from=None,
|
||||
ping_pong=False
|
||||
self,
|
||||
signaling,
|
||||
url="http://127.0.0.1:1250",
|
||||
play_from=None,
|
||||
ping_pong=False
|
||||
):
|
||||
self.signaling = signaling
|
||||
self.server_url = url
|
||||
@@ -103,7 +105,6 @@ class StreamClient:
|
||||
channel = pc.createDataChannel("data-channel")
|
||||
self.channel_log(channel, "-", "created by local party")
|
||||
|
||||
|
||||
async def send_pings():
|
||||
while True:
|
||||
self.channel_send(channel, "ping %d" % self.current_stamp())
|
||||
|
||||
Reference in New Issue
Block a user