0

I want to create custom BBCode for Youtube that will allow the user to open a full-screen video on my website. When I hover over a "full-screen" button it says:

full screen is unavailable

I tried to add these attributes to my code: frameborder="0" allowfullscreen, and some other combinations, but to no avail.

 <object width="596" height="335">
     <param name="movie" value="https://www.youtube.com/v/WPni755-Krg">
     </param>
     <embed
         src="https://www.youtube.com/v/WPni755-Krg"
         type="application/x-shockwave-flash" width="596"
         height="335">
     </embed>
 </object>
2
  • Can you post the relevant code? It will make it much easier to answer your question. Commented Mar 27, 2019 at 5:32
  • @fin444 I posted the relevant code, can you please take a look Commented Mar 28, 2019 at 15:30

1 Answer 1

1

The issue is in the code you used to embed the video. Instead of using the built-in embed feature from Youtube, you attempted to add it to the page as a .swf using <object>. This code should work properly:

<iframe width="560" height="315" src="https://www.youtube.com/embed/WPni755-Krg" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
Sign up to request clarification or add additional context in comments.

2 Comments

If I can ask one more thing, I had try the same code with Twitch but It's doesn't work. '<iframe width="560" height="315" src="player.twitch.tv/?channel={playhearthstone}" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>'
dev.twitch.tv/docs/embed (why are you trying to embed the HCT?)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.