UI界面设置

1. 修改 share.html 内容如下:

<!DOCTYPE html>

<html>
<head>
    <meta charset="utf-8">
    <title>1v1屏幕共享示例</title>

    <style type="text/css">
        video {
      
      
            width: 320px;
            height: 240px;
            border: 1px solid black;
        }
        
        button {
      
      
            background-color: #d84a38;
            border: none;
            color: white;
            margin: 0 1em 0 0;
            padding: 0.5em 0.7em 0.6em 0.7em;
        }

    </style>

</head>

<body>
    <h3>1v1屏幕共享示例</h3>
    
    <div>
        <video id="localVideo" autoplay controls></video>
        <video id="remoteVideo" autoplay controls></video>
    </div>
    
    <button id="btnStartPush">开始推流</button>
    <button id="btnStopPush">停止推流</button>
    <button id="btnStartPull">开始拉流</button>
    <button id="btnStopPull">停止拉流</button>

</body>
</html>

2. 修改 html 文件格式为 utf-8

照着点就行,不能截下来那个选项图
在这里插入图片描述

3.保存,运行程序

在这里插入图片描述

4. 访问页面

在这里插入图片描述

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/Redmoon955331/article/details/132336684
今日推荐