实例demo
navigator.mediaDevices.getDisplayMedia需要在“https:”下才有效。传入的参数是一个json对象,video:true允许获取屏幕流,其他相关的参数可查看MDN上的文档说明。then方法中的stream为获取到的流媒体数据,使用video.srcObject = stream;可以显示在此页面中。
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>document<