月度归档: 2021年8月

CentOS 7 安装 certbot 证书 The ‘urllib3<1.23,>=1.21.1′ distribution was not found and is required by requests

安装 certbot 证书,错误信息 Traceback (most recent call last): File “/usr/bin/certbot”, line 5, in <module> from pkg_resources import load_entry_point File “/usr/lib/python2.7/site-packages/pkg_resources/__init__.py”, line 3138, in <module> @_call_aside File “/usr/lib/python2.7/site-packages/pkg_ …

inline-block 的间隙问题

在CSS布局中,如果我们想要将一些元素在同一行显示,其中的一种方法就是把要同行显示的元素设置display属性为inline-block。但是你会发现这些同行显示的inline-block元素之间经常会出现一定的空隙,这是“换行符/空格间隙问题”。 <!DOCTYPE html> <html> <head>   <title>display:inline-block元素之间空隙的产生原因和解决办法</title>   <style type=“text/css”>     .parent .chil …

WebSocket发送音频流

原始每包数据过于大,后台不能接收,需要分包处理,每包最大1024 原始采样率为48000;通过合并压缩为自己所需采样率,本例中最终采样率为8000 <!DOCTYPE html> <html>     <head>         <meta charset=“utf-8”>         <meta name=“viewport” content=“width=device-width, user-scalable=no, initial-scale=1.0, maximum- …

WebRTC通信原理

WebRTC需要通过长链接查找到通信双方,然后通过 peer to peer 的方式传输音频数据。 PeerConnection PeerConnection是WebRTC中封装的对象。每一路的音视频会话都会有唯一的一个PeerConnection对象,WebRTC通过这个PeerConnection对象进行视频的发起、传输、接收和挂断等操作。 PeerConnection中包含的属性如下: localDescription:本地描述信息,类型:RTCSessionDescription remoteDescription:远端描述信息,类型:RTCSessionDescription oni …