Youtube player on website

  • (4 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »

56 Replies - 1343 Views - Last Post: 18 May 2014 - 02:21 AM Rate Topic: -----

#1 sprokls  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 29
  • Joined: 10-May 14

Youtube player on website

Posted 10 May 2014 - 04:55 AM

Posted Image
How can I make this fit? It only fits on my 17,5" monitor atm, I want it to autofill in the screen region for every browser, how?
Is This A Good Question/Topic? 0
  • +

Replies To: Youtube player on website

#2 TgaJava  Icon User is offline

  • D.I.C Head

Reputation: 10
  • View blog
  • Posts: 57
  • Joined: 28-April 14

Re: Youtube player on website

Posted 10 May 2014 - 05:04 AM

First I think dreamincode does not allow png images, so you better use JPEG for next time.

For your question you may use a Jquery plugin or do some CSS
Was This Post Helpful? 1
  • +
  • -

#3 sprokls  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 29
  • Joined: 10-May 14

Re: Youtube player on website

Posted 10 May 2014 - 05:09 AM

Thanks for the answer, I'm going to look in to it

Oh btw, I'm not using a theme, it's just a picture as background
Was This Post Helpful? 0
  • +
  • -

#4 astonecipher  Icon User is offline

  • Major DIC Head
  • member icon

Reputation: 705
  • View blog
  • Posts: 3,032
  • Joined: 03-December 12

Re: Youtube player on website

Posted 10 May 2014 - 05:41 AM

Posted Image

You are just using the tags wrong.

How are you planning on filling the screen?

Html5 has a video tag that you can set the width just as you would on a normal webpage.
Was This Post Helpful? 1
  • +
  • -

#5 sprokls  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 29
  • Joined: 10-May 14

Re: Youtube player on website

Posted 10 May 2014 - 05:45 AM

That's the thing I need help with, how do I fill the screen?
Was This Post Helpful? 0
  • +
  • -

#6 astonecipher  Icon User is offline

  • Major DIC Head
  • member icon

Reputation: 705
  • View blog
  • Posts: 3,032
  • Joined: 03-December 12

Re: Youtube player on website

Posted 10 May 2014 - 05:46 AM

You set the height and width attributes to 100% inside of a defined size div.
Was This Post Helpful? 1
  • +
  • -

#7 sprokls  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 29
  • Joined: 10-May 14

Re: Youtube player on website

Posted 10 May 2014 - 05:59 AM

Help me out :<
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Media</title>
</head>
<body>
    <nav>
      <ul>
        <li>
            <a href="/home.php">Home</a>
        </li>
        <li>
            <a href="/about.php">About</a>
        </li>
        <li>
            <a href="/teams.php">Teams</a>
        </li>
        <li>
            <a href="#">Media</a>
        </li>
        <li>
            <a href="/contact.php">Contact</a>
        </li>
      </ul>
    </nav>
    </body>
<style>
ul
{
list-style-type:none;
margin:0;
padding:0;
overflow:hidden;
}
li
{
float:left;
}
a:link,a:visited
{
display:block;
width:120px;
font-weight:bold;
color:#FFFFFF;
background-color:#98bf21;
text-align:center;
padding:4px;
text-decoration:none;
text-transform:uppercase;
}
a:hover,a:active
{
background-color:#7A991A;
}

html, body {
margin: 0;
padding: 0;
height: 100%;
}

body {
color: #000;
background: #B9DDE0 url(backg3.jpg) no-repeat center;
}

/* Some px values below will have to be adjusted, but leave the 50% as is. */
iframe {
	height: 422px;
	width: 1160px;
	position: absolute;
	top: 238px;
	margin-top: -175px;
	left: 16px;
	margin-left: 80px;
}
body
{ 
background-image:url('http://i.imgur.com/zNmPtwU.png');
background-repeat:no-repeat;
background-attachment:fixed;
background-size: contain;
background-position:center; 
}
</style>
<iframe id="ytplayer" type="text/html" width="800" height="400" align="right"
  src=""
  frameborder="0"/>
</html>


This is my code

Note that i'm new to css
Was This Post Helpful? 0
  • +
  • -

#8 astonecipher  Icon User is offline

  • Major DIC Head
  • member icon

Reputation: 705
  • View blog
  • Posts: 3,032
  • Joined: 03-December 12

Re: Youtube player on website

Posted 10 May 2014 - 06:02 AM

For one get rid of the iframe. Switch to a doctype
iframes are a poor choice for anything and deprecated in html5.
<!DOCTYPE HTML>

that is html5.

Then use

<video width="100%" height="100%" controls>
  <source src="your video source address will go here">
</video>


This post has been edited by astonecipher: 10 May 2014 - 06:03 AM

Was This Post Helpful? 1
  • +
  • -

#9 sprokls  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 29
  • Joined: 10-May 14

Re: Youtube player on website

Posted 10 May 2014 - 06:10 AM

I can't get it to work it just says "can't find any video with a format or a mme-type supported"
Was This Post Helpful? 0
  • +
  • -

#10 astonecipher  Icon User is offline

  • Major DIC Head
  • member icon

Reputation: 705
  • View blog
  • Posts: 3,032
  • Joined: 03-December 12

Re: Youtube player on website

Posted 10 May 2014 - 06:12 AM

What is the video?
Was This Post Helpful? 1
  • +
  • -

#11 sprokls  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 29
  • Joined: 10-May 14

Re: Youtube player on website

Posted 10 May 2014 - 06:12 AM

What's youtubes format? I want to use this: https://www.youtube....h?v=MyXWalwFqyE
Was This Post Helpful? 0
  • +
  • -

#12 astonecipher  Icon User is offline

  • Major DIC Head
  • member icon

Reputation: 705
  • View blog
  • Posts: 3,032
  • Joined: 03-December 12

Re: Youtube player on website

Posted 10 May 2014 - 06:19 AM

Try this version,

<embed
width="420" height="345"
src="https://www.youtube.com/watch?v=MyXWalwFqyE"
type="application/x-shockwave-flash">
</embed>


Try it first, then you can change the size.
Was This Post Helpful? 0
  • +
  • -

#13 sprokls  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 29
  • Joined: 10-May 14

Re: Youtube player on website

Posted 10 May 2014 - 06:21 AM

It's just a whitebox :)
Was This Post Helpful? 0
  • +
  • -

#14 astonecipher  Icon User is offline

  • Major DIC Head
  • member icon

Reputation: 705
  • View blog
  • Posts: 3,032
  • Joined: 03-December 12

Re: Youtube player on website

Posted 10 May 2014 - 07:18 AM

Let me test some things. I can't get their embed or iframe code to work on my server. I need to figure out what is different from the other videos.
Was This Post Helpful? 1
  • +
  • -

#15 sprokls  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 29
  • Joined: 10-May 14

Re: Youtube player on website

Posted 10 May 2014 - 07:40 AM

Thanks for helping me out
Was This Post Helpful? 0
  • +
  • -

  • (4 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »