Youtube player without the embeding

i want to stream links like this direct

https://www.youtube.com/watch?v=WDkg3h8PCVU

but i keep seeing only for embed

https://www.youtube.com/embed/WDkg3h8PCVU

is there any player out there that can play d video direct.

thanks

Well you could iframe the youtube page, but other than that, everything’s an embed. You’re trying to put the youtube player into a non-Youtube site, which is the definition of embedding.

1 Like

Yup. As m_hutley said. Trying to stream youtube into something like jw_video player with direct control over the presentation directly ain’t gonna happen.

https://support.jwplayer.com/articles/jw7-youtube-video-embed

JW Player uses the official iFrame player API from YouTube to play a video inside of JW Player. This means that HTML5 is the only supported method of Youtube playback in JW7.

Several YouTube features, like the preview image and quality selection, are supported as well. Note that since the video file is being hosted via Youtube, there are certain limitations. These limitations include…

That said, if your need is just for a few videos that are related to a specific company, better to get a virtual server and not some 10 bux a month godaddy account. You can get away with as little as $35 a month like I do and I have fantastic performance with that.

Hi there skyhighweb,

links will open a full page video. :winky:

For example…

 <a href="https://www.youtube.com/embed/WDkg3h8PCVU">Aquaman Trailer</a> 

coothead

Yh i bout dat was thinking there will b plsyer thst stream d link as it is whithout changing it to embed thats wat am asking

Er - can you say that again? More clearly?

1 Like

I want to b able to stream link like this

https://www.youtube.com/watch?v=WDkg3h8PCVU

Not like this

https://www.youtube.com/embed/WDkg3h8PCVU

Hope u understand now

Why you can link to any URL you like…

<a href="https://www.youtube.com/watch?v=WDkg3h8PCVU">stream link</a>

If however you want to embed the player on your page, then this is done with an iframe and that’s what the /embed links are for, as you’ll embed the complete YT page otherwise. But a link should generally point to the “real” page.

What kind of player do you even mean? If you’re looking for something like this

<video src="https://www.youtube.com/watch?v=WDkg3h8PCVU">

then this won’t work either way, the only way to reliably include a YT video on your page is via an iframe AFAIK.

PS: Or do you maybe want to replace a link with an embedded player? Then this can indeed be achieved like so:

<a href="https://www.youtube.com/watch?v=WDkg3h8PCVU" class="stream-link">stream link</a>
var streamLink = document.querySelector('.stream-link')

streamLink.addEventListener('click', function (event) {
  var target = event.target
  var params = new URLSearchParams(target.search)
  var iframe = document.createElement('iframe')

  iframe.src = 'https://www.youtube.com/embed/' + params.get('v') + '?autoplay=1'
  target.parentNode.replaceChild(iframe, target)
  event.preventDefault()
})

Here’s a fiddle.

Why do you want to use streaming instead of embedding the video?

Hi there skyhighweb,

if you really want total control of “YouTube” videos, then download them. :winky:

You will then be able to display them in the HTML “video element” and if
desired, you can control them with “JavaScript”. :sunglasses:

The video download in question weighs at 28.35 MB for HD or at 11.35 MB
for normal. website usage.

coothead

I guess i will just go with d embedding
Thanks

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.