原创

设置 uni app webview的标题显示

webview的update-title设为false
<template>
	<view>
		<web-view :webview-styles="webviewStyles" update-title="false" src="https://uniapp.dcloud.io/static/web-view.html"></web-view>
	</view>
</template>

pages.json的“globalStyle”中添加一行:"navigationStyle":"custom",

还可以在onReady中加

setTimeout(()=>{
uni.setNavigationBarTitle({
title:‘app中要设置的标题’
})
},2000)

 

    

音频降噪音,回声消除,自动增益代码示例

json

<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="utf-8">

  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
  <style>
    html, body{
      height: 100%;
      width: 100%;
    }
    #video{
      height: 300px;
      width: 300px;
    }
  </style>
  <script>
    $(() => {
      var constraints =  {
        audio: {
          echoCancellationType: 'system',//browser|system
          echoCancellation: true,
          noiseSuppression: 
        

nginx 流媒体服务器,nginx tcp http负载均衡,nginx 流转发,nginx 推流,nginx rtmp

用到了   https://github.com/winshining/nginx-http-flv-module

user www-data;
worker_processes auto;
pid /run/nginx.pid;
#worker_cpu_affinity  auto; #1.9.10 以及之后的版本

include /etc/nginx/modules-enabled/*.conf;

load_module modules/ngx_http_flv_live_module.so;


worker_rlimit_nofile 200000;


events {
  worker_connections 10240;
  #multi_accept on;
}

http {

  ##
  # Basic Settings
  ##

  sendfile on;
  tcp_nopush on;
  
    

socket.io使用示例–向指定客户端发消息

安装 node

创建一个目录例如socketio

在目录下执行

npm install socket.io
npm install redis

 

client:  代码如下:

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>socket.io</title>
<meta name="keywords" content="">
<meta name="description" content="">
</head>

<body>

    <script src="node_modules/socket.io/client-dist/socket.io.js"></script>
    <script>

const socket = io("ws://localhost:3000");

socket.on("connect", () => {
  console.log(socket.id);