Chaning size (height/width) of an embedded video
Dec 07, 2017
Hi, I have embedded a video on to my project using iframe. The issue is the video is not changing its size based on the height, width specified in the embed code. There is also a scroll bar appears within the frame for height which shouldn't be there. Here is the code I am using -
<iframe src='url' style='width:1333;height:750' allowfullscreen="" frameborder="0" scrolling='none'></iframe>
I have experimented with scrolling 'none' and frameborder but its working. Is it due to player that the source uses? The original code that the player suggested was - <iframe allowtransparency='true' frameborder='0' sandbox='allow-same-origin allow-forms allow-scripts' scrolling='auto' src='url' style='width:100%;height:100%'></iframe>
This was however giving a flash update warning so I changed it.
6 Replies
Hi Nivedita, happy to help here! First, what version of Storyline are you using?
I tested this embed code on a Storyline 360 slide with a Story Size of 1343 x 760 (this creates a 10 pixel wide border around the video).
<iframe src='https://www.youtube.com/embed/AAvP-V2vgng' style='width:1333;height:750' allowfullscreen="" frameborder="0" scrolling='none'></iframe>
Are you using a Slide Size that is larger than the embedded video dimensions?
Hi Alyssa,
I am using Storyline 2, so I am not able to open your file. My slide size is the same as 1333 by 750 and yes its bigger than the video size. Although, usually when I embed the videos, the video size that I specify for in the iframe code snippet, the video take up that size or fits in it. Does the original video size affect things, if yes then I'll look into the source?
Hi Nivedita,
Would you be able to share the full embed code with me, including the URL? That way I can insert it in a Storyline 2 file to get a better idea of what you're seeing.
No unfortunately, I cannot share the URL as it is on my company's intranet. I have attached the screenshot of what I am seeing. As you can see, I see a scrollbar on the left and the video size is considerably smaller. I am viewing this on IE.
Nivedita,
I had major issues with embed code in SL2 where nothing seemed to size appropriately onscreen. For example, I'd make the video smaller, but it would appear larger on the slide in SL2. It wasn't until I published the course that I could see exactly how the video was rendering. You might want to publish frequently to determine what the settings need to be in your embed code. Good luck!
Hi Nivedita,
Thanks for that screenshot. Do you see the same thing when you view the output on other browsers besides Internet Explorer? Also, are you viewing the published content locally, or it is hosted on a web server or LMS?
This discussion is closed. You can start a new discussion or contact Articulate Support.