Forums | Mahara Community
external media embed code issue
27 December 2016, 15:13
Merry Christmas and Happy New Year!
I found an issue while using the external media to embed a video. The embed code is as the below screenshot shows. This code is working fine in Moodle and other website. But in Mahara, the code is not working. On the page, the content area is empty.
Following screenshot shows the result of the above embed code:
I think maybe the "div" tag is not acceptable in Mahara, so I deleted the "div" code and only leave the "iframe" code there. The video content displayed, but only half the screen. See screenshot as below:
Could anyone help with this? Many thanks.
28 December 2016, 8:32
Happy holidays to you as well!
Is your video publicly accessible? If so, can you please post the embed code? I copied it from your screenshot, but can't get it to work after allowing the iframe.
28 December 2016, 15:00
The embed code in the screenshot is not a public video. Following is the embed code for a publicly accessible video:
<div style="position:relative;padding-bottom:56%;padding-top:20px;height:0;"><iframe src="https://media.xjtlu.edu.cn/player?autostart=n&fullscreen=y&width=0&height=0&videoId=5656&quality=lo&captions=n&chapterId=0" frameborder="0" scrolling="no" style="position:absolute;top:0;left:0;width:100%;height:100%;" allowfullscreen></iframe></div>
Many thanks for your kind help. I really appreciate it.
29 December 2016, 8:55
Thank you for the embed code. It doesn't work for me either with the div, but I do get it to show in full height when I change the height parameter from "100%" to say "460px". Then I see the full width. I assume that a percentage for the height might not be interpreted (correctly).
I created https://bugs.launchpad.net/mahara/+bug/1652997 so we can follow up on that in the new year.
30 December 2016, 14:44
Many thanks for creating the bug item for this. I really appreciate your kind help.
The embed code is generated by the video platform and the video can be displayed well in other system. We'll be looking forward to the follow up of this issue.
Happy New Year!