随笔分类 -  js

js
摘要:image.png <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>map函数组延时写法</title> </head> <body> <script> async function doo(){ conso 阅读全文
posted @ 2020-08-14 14:59 zhishaofei3 阅读(542) 评论(0) 推荐(0)
摘要:// Simulate a call to Dropbox or other service that can// return an image as an ArrayBuffer.var xhr = new XMLHttpRequest();// Use JSFiddle logo as a s 阅读全文
posted @ 2020-08-14 13:39 zhishaofei3 阅读(703) 评论(0) 推荐(0)
摘要:我在尝试Deno 的渐进式 HTTP 服务器 Servest ,在运行示例时遇到错误: $ deno run Servest.ts error: Uncaught PermissionDenied: network access to "0.0.0.0:8899", run again with t 阅读全文
posted @ 2020-07-20 14:07 zhishaofei3 阅读(295) 评论(0) 推荐(0)
摘要:概述:template 和 style 跟以前的写法保持一致,只有 script 的变化 Vue三个TS封装库vue-class-component vue-class-component 对 Vue 组件进行了一层封装,让 Vue 组件语法在结合了 TypeScript 语法之后更加扁平化vue- 阅读全文
posted @ 2020-06-16 15:14 zhishaofei3 阅读(1267) 评论(0) 推荐(0)
摘要:1 function copyItem() { 2 const input = document.createElement('input') 3 input.type = 'text' 4 input.value = '' 5 document.body.appendChild(input) 6 阅读全文
posted @ 2020-06-04 16:27 zhishaofei3 阅读(209) 评论(0) 推荐(0)
摘要:I think the explanation from the Mozilla Docs describes it well: You can assign a different this object when calling an existing function. this refers 阅读全文
posted @ 2020-06-04 12:05 zhishaofei3 阅读(171) 评论(0) 推荐(0)
摘要:let triangle={ a:1, b:2, c:3 } function coloTriangle(){ this.color='red'; } coloTriangle.prototype=triangle; let color=new coloTriangle(); Object.defi 阅读全文
posted @ 2020-05-20 22:18 zhishaofei3 阅读(254) 评论(0) 推荐(0)
摘要:var obj = {}Reflect.defineProperty(obj, 'a', {value: 1, configurable: false, writable: true}) // 可以改,不能删 Reflect.defineProperty(obj, 'b', {value: 1, c 阅读全文
posted @ 2020-05-20 16:21 zhishaofei3 阅读(205) 评论(0) 推荐(0)
摘要:https://www.twilio.com/blog/2018/04/choosing-cameras-javascript-mediadevices-api.html 阅读全文
posted @ 2020-04-16 10:22 zhishaofei3 阅读(440) 评论(0) 推荐(0)
摘要:https://www.dr-lex.be/software/testsounds.html 阅读全文
posted @ 2020-03-12 00:38 zhishaofei3 阅读(2693) 评论(0) 推荐(0)
摘要:前言 上一章地址: web音频流转发之音频源下一张地址:web音频流转发之音视频直播在这一章我说几个我们需要用到的音频处理模块也就3个吧,包括我们转发流是需要用到的核心模块。更多模块请看MDN,或者看HTML5音频API Web Audio也有一些中文讲解,希望大家多多支持。 概述 AudioNod 阅读全文
posted @ 2020-03-11 21:43 zhishaofei3 阅读(786) 评论(0) 推荐(0)
摘要:1、概述 WebRTC是“网络实时通信”(Web Real Time Communication)的缩写,它主要用来让浏览器实时获取和交换视频、音频和数据。 WebRTC共分三个API。 MediaStream(又称getUserMedia) RTCPeerConnection RTCDataCha 阅读全文
posted @ 2020-03-11 20:47 zhishaofei3 阅读(2895) 评论(1) 推荐(0)
摘要:video/webm video/webm;codecs=vp8 video/webm;codecs=vp9 video/webm;codecs=vp8.0 video/webm;codecs=vp9.0 video/webm;codecs=h264 video/webm;codecs=H264 v 阅读全文
posted @ 2020-03-11 20:31 zhishaofei3 阅读(521) 评论(0) 推荐(0)
摘要:国内这方面的资料真少的可怜,翻出去一搜一大把,推荐一个github的插件库,非常强大,支持各种各样的录制方式. 下载完成之后,引用对应的js立即可以使用. <script src="RecordRTC/RecordRTC.js"></script> <script src="part-of-scre 阅读全文
posted @ 2020-03-11 20:02 zhishaofei3 阅读(1926) 评论(0) 推荐(0)
摘要:HTML5调用摄像头录制视频不支持ie,ie下不支持webrtc,无法使用navigator.getUserMedia调用摄像头 <!DOCTYPE html> <html> <head> <title>video recoder</title> <script src="fileSaver.js" 阅读全文
posted @ 2020-03-09 15:10 zhishaofei3 阅读(5944) 评论(1) 推荐(1)
摘要:以二次贝塞尔曲线的公式为例: js函数: Js代码 //p0、p1、p2三个点,其中p0为起点,p2为终点,p1为控制点 //它们的坐标用数组表示[x,y] //t的范围是0-1 function qBerzier(p0,p1,p2,t){ var x = (1 - t) * (1 - t) * p 阅读全文
posted @ 2019-10-30 15:13 zhishaofei3 阅读(1808) 评论(0) 推荐(0)
摘要:关于javascript的原型链有一个问题我一直很疑惑:为什么 Function instanceof Object 与 Object instanceof Function都为true呢? Function instanceof Object // ->trueObject instanceof 阅读全文
posted @ 2019-10-19 15:57 zhishaofei3 阅读(678) 评论(0) 推荐(0)
摘要:排序算法说明 1.1 排序的定义: 对一序列对象根据某个关键字进行排序。 1.2 属于说明: 稳定:如果a原本在b前面,而a=b,排序之后a仍然在b的前面; 不稳定:如果a原本在b的前面,而a=b,排序之后a可能会出现在b的后面; 内排序:所有排序操作都在内存中完成; 外排序:由于数据太大,因此把数 阅读全文
posted @ 2019-10-13 16:24 zhishaofei3 阅读(153) 评论(0) 推荐(0)
摘要:1. JSON Web Token是什么 JSON Web Token (JWT)是一个开放标准(RFC 7519),它定义了一种紧凑的、自包含的方式,用于作为JSON对象在各方之间安全地传输信息。该信息可以被验证和信任,因为它是数字签名的。 2. 什么时候你应该用JSON Web Tokens 下 阅读全文
posted @ 2019-08-12 18:51 zhishaofei3 阅读(167) 评论(0) 推荐(0)
摘要:https://juejin.im/post/5d2d19ccf265da1b7f29b05f 阅读全文
posted @ 2019-08-08 11:39 zhishaofei3 阅读(213) 评论(0) 推荐(0)