Path: csiph.com!weretis.net!feeder4.news.weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Thomas 'PointedEars' Lahn Newsgroups: comp.lang.javascript Subject: Re: Allow full screen Date: Mon, 01 Aug 2016 11:23:45 +0200 Organization: PointedEars Software (PES) Lines: 80 Message-ID: <11604253.uLZWGnKmhe@PointedEars.de> References: Reply-To: Thomas 'PointedEars' Lahn Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8Bit X-Trace: solani.org 1470043428 7873 eJwFwYEBwCAIA7CXhNIi50yU/09YQsjUGaKCw4FKa2sA8hgN/qrn4lt5e56fvSNY18JTC/4DBDAQGA== (1 Aug 2016 09:23:48 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Mon, 1 Aug 2016 09:23:48 +0000 (UTC) User-Agent: KNode/4.14.2 X-User-ID: eJwFwQkRwEAIBDBLLLA8cgrD+ZfQhBaITQ+G8/HhuBQ7zEfj1bTq2fVau4zuN08kUQlPdOm45aJGVEJ29gdBWxS1 Cancel-Lock: sha1:tUZwzdYfocqP0pew3Doa8U8clzg= X-NNTP-Posting-Host: eJwFwQkBwDAIA0BNDJJQOSuPfwm9g9NYCoKBxXpxr9ZHp7zHkBkn2gbjUHTz/0Y3LDlXqgckDBFP Xref: csiph.com comp.lang.javascript:31003 Andrew Poulos wrote: > I'm creating an elearning course which displays a YouTube video. When I > preview the course in my browser the video's full screen button is enable. > > If I load the course into a learning management system (LMS) the full > screen button is disabled. Dr Google tells me that's because the IFRAME > which contains the video or a parent frame does not have the attribute > allowfullscreen. > > When I look at the source the LMS creates when it displays the course I > can see that the video is within an IFRAME, which is within a HTML > document, within a FRAME, within a FRAMESET, within another FRAME, > within a another FRAMESET. > > I cannot directly edit the source that the LMS creates. I have added the > allowfullscreen attribute to the IFRAME that contains the video and I > tried > > var frm = window.frameElement; > while (frm) { > frm.setAttribute("allowfullscreen",""); > frm = frm.frameElement; > } > > but it appears that a FRAMESET returns null. Not “null”, but “undefined”. That appears to work as designed: ,- | | Returns the element (such as