如何使用HTML或PHP在后台播放youtube视频. [英] How to play youtube video in background in HTML or PHP.

查看:155
本文介绍了如何使用HTML或PHP在后台播放youtube视频.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人,

我想在背景中播放youtube vedio(全屏),并且该视频上方想显示另一个html页面.但是首页html页面必须是tanseperent.

以下是我的HTML页面.但这有问题.但是在这种情况下,我无法在后台看到视频.

Dear All,

I want to play youtube vedio(Fullscreen) in background and above that video want to display another html page. But front html page must be tanseperent.

Below is my HTML page. But it has problem.But in this, I am not able to see Video in background.

<html>
<head>
 <style type="text/css">
    body{
      background: #000;
      margin:0;
      color:#fff;
      font-size:12px;
      font-family: tahoma, arial;
    }
   div.transbox
  {
  width:400px;
  height:400px;
  margin:130px 150px;
  background-color:black;
  border:1px solid black;
  opacity:0.9;
  filter:alpha(opacity=60); /* For IE8 and earlier */
  }
div.transbox p
  {
  margin:30px 40px;
  font-weight:bold;
  color:#000000;
  }
    .movie{
      display:none;
    }

    .content{
      width:900px;
      position:relative;
      top:100px;
      margin:0 auto;
    }

    p{
      margin-bottom:15px;
      padding:10px;
    }

    #bgndEl{
      position:relative;
      margin:0 auto;
      width:900px;
      height:400px;
      background: #000;
      opacity:0.4;
      filter:alpha(opacity=40);
    }

    h1{
      font-size:24px;
      font-weight:bold;
    }
  </style>

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="inc/jquery.metadata.js"></script>
<script type="text/javascript" src="inc/jquery.mb.YTPlayer.js"></script>
<script type="text/javascript">
    $(function(){
      $(".movie").mb_YTPlayer();
    });
</script>

 <div class="content">

 <div id="bgndEl" style="border:2px solid white;">
<p>
     <iframe src="C:\Documents and Settings\bidhu\Desktop\svg\1.html" width="400px" height="400px"></iframe>
</p>
 </div>
<a id="bgndVideo" href="http://www.youtube.com/watch?v=3xaG882IJ44" class="movie {opacity:.40, isBgndMovie:{width:900,mute:true}, ID:'bgndEl', ratio:'16/9',quality:'default'}">
        </a>
 </div>
 </body>
</html>




请帮助我,告诉我代码是否有错误.
提前谢谢.

Ranjeet Waje




Please help me and show me if there is any error in code.
Thanks in advance.

Ranjeet Waje

推荐答案

(function(){
(function(){


(.movie").mb_YTPlayer(); }); < /script > < div =" content" < div =" bgndEl" 样式 border:2px纯白色;" < p > < iframe =" C:\ Documents and Settings \ bidhu \ Desktop \ svg \ 1 .html" 宽度 400px" 高度 =" > < > < /p > < /div > < a =" bgndVideo" href http://www.youtube.com/watch?v=3xaG882IJ44" class =" < /a > < /div > < /body > < /html >
(".movie").mb_YTPlayer(); }); </script> <div class="content"> <div id="bgndEl" style="border:2px solid white;"> <p> <iframe src="C:\Documents and Settings\bidhu\Desktop\svg\1.html" width="400px" height="400px"></iframe> </p> </div> <a id="bgndVideo" href="http://www.youtube.com/watch?v=3xaG882IJ44" class="movie {opacity:.40, isBgndMovie:{width:900,mute:true}, ID:'bgndEl', ratio:'16/9',quality:'default'}"> </a> </div> </body> </html>




请帮助我,告诉我代码是否有错误.
提前谢谢.

Ranjeet Waje




Please help me and show me if there is any error in code.
Thanks in advance.

Ranjeet Waje


如何将YouTube视频设置为网站背景 [在Web设计中视频的创造性使用:背景视频 [ ^ ]
How to set a YouTube video as your website background[^]

Creative Use of Video in Web Design: Background Videos[^]


这篇关于如何使用HTML或PHP在后台播放youtube视频.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆