最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - how to fix issue with youtube embed video fullscreen button not showing up? - Stack Overflow

programmeradmin2浏览0评论

Below is my embed code. The full screen button doesn't show up at the width of 305 pixels. Any help will be appreciated.

<iframe width="305" height="200" src="//www.youtube/embed/HMUDVMiITOU" frameborder="0" allowfullscreen></iframe>

fiddle

Below is my embed code. The full screen button doesn't show up at the width of 305 pixels. Any help will be appreciated.

<iframe width="305" height="200" src="//www.youtube./embed/HMUDVMiITOU" frameborder="0" allowfullscreen></iframe>

fiddle

Share Improve this question edited Jan 21, 2015 at 18:47 Darkmouse 1,9495 gold badges28 silver badges52 bronze badges asked Jan 21, 2015 at 17:18 YoiMCodingYoiMCoding 752 silver badges10 bronze badges 3
  • 1 can you just make it wider? it's like one of those questions about where i put my luggage on a motorcycle... – dandavis Commented Jan 21, 2015 at 17:20
  • i have responsive design so it does work fine when using desktop browser but on mobile browser the video shows up but not the full screen button – YoiMCoding Commented Jan 21, 2015 at 17:22
  • if you are looking for a responsive way. see this: stackoverflow./a/27015413/3448527 – dippas Commented Jan 21, 2015 at 17:25
Add a ment  | 

2 Answers 2

Reset to default 2

I've been struggling with the same problem and for me the key was allowfullscreen="1" as an attribute in the iframe.

use this one for the fullscreen button:

<object width="305" height="200">
  <param
    name="movie"
    value="http://www.youtube./v/HMUDVMiITOU">
  </param>
  <param
    name="allowscriptaccess"
    value="always">
  </param>
  <param
    name="allowFullScreen"
    value="true">
  </param>
  <embed
    src="http://www.youtube./v/HMUDVMiITOU"
    type="application/x-shockwave-flash"
    allowscriptaccess="always"
    allowfullscreen="true"
    width="305"
    height="200">
  </embed>
</object>
发布评论

评论列表(0)

  1. 暂无评论