Jump to content

Embed a custom video to youtube player

Lucifer

How to embed a video to YouTube player without it being on YouTube.

 

 

Thank You.

Evil's Advocate Approved.

Link to comment
Share on other sites

Link to post
Share on other sites

 

Hello there,

I usually use wamp server for my offline testing.Now I have a video which I want to embed it with a YouTube video player which isn't uploaded to YouTube.

This is my basic code just for test,

 

------------------------------------

 
<body>
<div id="ytplayer"></div>
 
<script>
  // Load the IFrame Player API code asynchronously.
  var tag = document.createElement('script');
  var firstScriptTag = document.getElementsByTagName('script')[0];
  firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
 
  // Replace the 'ytplayer' element with an <iframe> and
  // YouTube player after the API code downloads.
  var player;
  function onYouTubePlayerAPIReady() {
    player = new YT.Player('ytplayer', {
      height: '720',
      width: '1280',
      videoId: 'VIDEO_ID'
    });
  }
</script>
 
___________________
 
now if the video's on YouTube I can use it, but it's not so how can use the video with YouTube player?

PS: I don't want to upload it on upload it on youtube so please

Thank You

 

could you maybe edit your post so its readable?

CPU:Intel Core i7-4770 Motherboard:SUPERMICRO​ C7Z97-OCE RAM:Corsair Vengeance Pro 8GB GPU:Zotac GeForce GTX 980 Ti 6GB ArcticStorm Case Case:Phanteks PH-ES614PC_BK ATX Full Tower Case PSU:Corsair RM 650W 80+ Gold Cooling:Corsair H60 Keyboard:Logitech G710+ Mouse:FinalMouse 2015 Sound:Sennheiser HD 598 Operating System: Windows 7 Ultimate

Link to comment
Share on other sites

Link to post
Share on other sites

^ good enough?

Evil's Advocate Approved.

Link to comment
Share on other sites

Link to post
Share on other sites

^ good enough?

si?

CPU:Intel Core i7-4770 Motherboard:SUPERMICRO​ C7Z97-OCE RAM:Corsair Vengeance Pro 8GB GPU:Zotac GeForce GTX 980 Ti 6GB ArcticStorm Case Case:Phanteks PH-ES614PC_BK ATX Full Tower Case PSU:Corsair RM 650W 80+ Gold Cooling:Corsair H60 Keyboard:Logitech G710+ Mouse:FinalMouse 2015 Sound:Sennheiser HD 598 Operating System: Windows 7 Ultimate

Link to comment
Share on other sites

Link to post
Share on other sites

I do not think their API has support for this, even with some "creative" methods. They stat track everything, so stuff would error out their end. The easiest solution for this is to use the JavaScript media control API built into browsers and create your own custom player resembling YouTube. You obviously won't be as functionality rich, but even if you could get a video file to work with the YouTube player, the player would have reduced functionality anyway.

I am good at computer

Spoiler

Motherboard: Gigabyte G1 sniper 3 | CPU: Intel 3770k @5.1Ghz | RAM: 32Gb G.Skill Ripjaws X @1600Mhz | Graphics card: EVGA 980 Ti SC | HDD: Seagate barracuda 3298534883327.74B + Samsung OEM 5400rpm drive + Seatgate barracude 2TB | PSU: Cougar CMX 1200w | CPU cooler: Custom loop

Link to comment
Share on other sites

Link to post
Share on other sites

Thanks ^ 

 

By the way if you're going to self-host videos the connection needs to be fast - if too many people are watching the same thing at the same time, it will slow down a considerable amount and start buffering (dry.png grr)

Speedtests

WiFi - 7ms, 22Mb down, 10Mb up

Ethernet - 6ms, 47.5Mb down, 9.7Mb up

 

Rigs

Spoiler

 Type            Desktop

 OS              Windows 10 Pro

 CPU             i5-4430S

 RAM             8GB CORSAIR XMS3 (2x4gb)

 Cooler          LC Power LC-CC-97 65W

 Motherboard     ASUS H81M-PLUS

 GPU             GeForce GTX 1060

 Storage         120GB Sandisk SSD (boot), 750GB Seagate 2.5" (storage), 500GB Seagate 2.5" SSHD (cache)

 

Spoiler

Type            Server

OS              Ubuntu 14.04 LTS

CPU             Core 2 Duo E6320

RAM             2GB Non-ECC

Motherboard     ASUS P5VD2-MX SE

Storage         RAID 1: 250GB WD Blue and Seagate Barracuda

Uses            Webserver, NAS, Mediaserver, Database Server

 

Quotes of Fame

On 8/27/2015 at 10:09 AM, Drixen said:

Linus is light years ahead a lot of other YouTubers, he isn't just an average YouTuber.. he's legitimately, legit.

On 10/11/2015 at 11:36 AM, Geralt said:

When something is worth doing, it's worth overdoing.

On 6/22/2016 at 10:05 AM, trag1c said:

It's completely blown out of proportion. Also if you're the least bit worried about data gathering then you should go live in a cave a 1000Km from the nearest establishment simply because every device and every entity gathers information these days. In the current era privacy is just fallacy and nothing more.

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×