小编Ümi*_*arı的帖子

在youtube上禁用blackbars嵌入iFrame

我将来自youtube的视频嵌入到我的网页中,我想让它在屏幕上100%拉伸,没有黑条.虽然我给它的宽度为100%,但它仍然在视频的两侧有一些黑条.我怎么能摆脱它?

截图:截图 摘录:https://jsfiddle.net/o3rp6an9/1/

<div id="video">
    <iframe width="100%" height="100%" src="https://www.youtube.com/embed/zWAiQJvwb8Q?autoplay=1&loop=1&controls=0&rel=0&showinfo=0&playlist=zWAiQJvwb8Q&modestbranding=1" frameborder="0" allowfullscreen="allowfullscreen"></iframe>
</div>

#video {
    height:100%;
    width:100% !important;
    background-size:100% 100%;
    position:relative;
    overflow:hidden;
}
Run Code Online (Sandbox Code Playgroud)

还有另一个问题,但它基本上没有帮助我.

html css youtube iframe

6
推荐指数
1
解决办法
2万
查看次数

javascript源代码更改检测

我想知道是否有办法检测我在我的网站上使用的javascript文件的源代码已更改?我在其中使用ajax,我觉得它应该更安全,因为代码可以很容易地改变.我可以做的事情就像每次php文件打开它可以下载js文件并手动检查代码是否在一些if else结构的帮助下发生了变化.但它会健康吗?

javascript security ajax web

3
推荐指数
1
解决办法
184
查看次数

nginx 上的代理传递 Socket.IO 连接不起作用

我正在尝试使用 nginx 代理传递 node.js-socket.io 应用程序。

客户端是一个 html 文件,其中包含一些 javascript;

<html>
<head>
<script src="socket.io.js"></script>
<script>
    var socket = io('http://localhost:80');
    socket.on('welcome', function(data){
        console.log('Server says:' + data);
        socket.emit('client-response', 'thank you!');
    });
</script>
</head>
<body>
Socket.io
</body>
</html>
Run Code Online (Sandbox Code Playgroud)

而应该在 nginx.conf 文件中代理传递的服务器块是这个;

server {
        listen       80;
        listen       [::]:80;
        #root         /usr/share/nginx/html;
        include /etc/nginx/default.d/*.conf;

        location / {
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "Upgrade";
            proxy_pass "http://localhost:2156";
        }

        error_page 404 /404.html;
            location = /40x.html {
        }

        error_page 500 502 503 504 /50x.html;
            location = /50x.html {
        } …
Run Code Online (Sandbox Code Playgroud)

nginx proxypass node.js socket.io

2
推荐指数
1
解决办法
4822
查看次数

标签 统计

ajax ×1

css ×1

html ×1

iframe ×1

javascript ×1

nginx ×1

node.js ×1

proxypass ×1

security ×1

socket.io ×1

web ×1

youtube ×1