Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Can you edit the web object iframe HTML produced by Captivate?

New Here ,
Mar 07, 2016 Mar 07, 2016

Hello Everyone,

Is there a way to edit the HTML code of the web object iframes produced by Captivate? We are using Vimeo video embeds inside our Captivate projects, which has been a great solution to our video needs until recently when Vimeo changed their coding and the FULLSCREEN button became disabled when the embeds were inside an iframe produced by other software (Captivate, in this case). Vimeo provided us with the following advice, as well as a screenshot of one of our published Captivate project's source code, which I've included:skitch.png

As you can see, the Vimeo player embed (indicated lower in that page’s code) is found within a second containing iframe (indicated higher in the page’s code).

When this is the case, the containing iframe must also include the following fullscreen attributes: “mozallowfullscreen,” “webkitallowfullscreen,” and “allowfullscreen.” Please add these three attributes to the containing iframe, and let me know if you still do not see the fullscreen option.

We use a two-step process that involved placing the Vimeo embed inside a Tumult Hype-produced OAM file for use in Captivate, but we have found a way to get fullscreen to work in the Hype file. We just need a way to add the fullscreen HTML code ("mozallowfullscreen webkitallowfullscreen allowfullscreen") to the iframe produced by Captivate, as pointed out by the top green arrow in the screenshot. Where can this code be found and can we edit it manually to include the fullscreen attributes?

Thank you very much for your time and attention!

SkillQ Team

2.9K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Mar 07, 2016 Mar 07, 2016

The iframe is created at runtime within the CPM.js

You can get a reference to the iframe with JavaScript.

var getIframes = document.getElementsByTagName( 'iframe' );

then you an access each within a loop based on the length of getIframes

i.e. getIframes[0] is the first iframe

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 07, 2016 Mar 07, 2016

Thank you very much for your reply.

The iframe being created at runtime makes more sense. Unfortunately, I have quite little experience with Javascript. Can you provide more set-by-step guidance on how and where I can implement your js code in the CPM.js file and use that to find and edit the iframe HTML I'm looking for? I know this is pretty basic stuff for experienced coders, but the process is a bit of a puzzle for me.

Thanks again!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 18, 2016 Mar 18, 2016

I'm having the exact same issue.  If someone could respond with a simple step by step process for those of us who are not programmers that would be fantastic.

Thanks!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 02, 2016 Jun 02, 2016

This worked for me.

1. Open the CPM.js file in a text editor.

2. Hit Crtl+F and search for this in the file:  allowtransparency:"true",

3. Add the following after the comma:  webkitallowfullscreen:"true",mozallowfullscreen:"true",allowfullscreen:"true",

4. save the file.

Maybe a bit late, but I found this thread looking for a way to modify captivate so I wouldn't have to do this for every project I produce.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 04, 2017 Jan 04, 2017

I have the exact same problem as the original question.  I am trying to include an HTML5 version of a video player from Ooyala.com and it has the same restriction as the original Vimeo player where if the player is in an iframe, you have to add the webkitallowfullscreen:"true",mozallowfullscreen:"true",allowfullscreen:"true", parameters to the enclosing iframe.

This is a request to the Captivate Development Team: 

Having to add your own JavaScript to every project to add these parameters to the "generated" iframe is not a viable option for this type of tool.  Most of your Captivate developers are not JavaScript programmers.  And having to go into and edit the generated HTML every time you publish the project (especially if you need to publish to a zip format file) is a recipe for disaster.

This appears to be more and more of an issue as major video hosting sites convert over from Flash Video Players to HTML5 Video players.  We as a company are also on track to convert our online courses from Flash applications to HTML5-based applications.

Therefore I would like to recommend that you (a.) create a user-friendly way of allowing parameters to be added and updated to auto-generated iframe code when inserting a web object into a course, (b.) add a checkbox to the web object to add the

webkitallowfullscreen:"true",mozallowfullscreen:"true",allowfullscreen:"true", parameters to the enclosing iframe, or (c.) create another web object to be used exclusively for loading HTML5 Video Player html and/or Javascript which automatically includes the parameters:

webkitallowfullscreen:"true",mozallowfullscreen:"true",allowfullscreen:"true",

Randy

(Captivate Developer and JavaScript Programmer)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 04, 2017 Jan 04, 2017

Randy, this is the Captivate USER forum, not Adobe Support or a direct interface with the Captivate design and development team.

For enhancement requests, you need to log via this form:

Adobe Captivate

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 18, 2017 Jul 18, 2017
LATEST

Thanks James, this resolved the issue for me.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Mar 18, 2016 Mar 18, 2016

You can out this in the head of the index.html or included in a js file. Not that sometimes you need a delay (setTimout) before the frame is available.

var interfaceObj, eventEmitterObj;

window.addEventListener( 'moduleReadyEvent', function ( e )
{
interfaceObj = e.Data;
eventEmitterObj = interfaceObj.getEventEmitter();
    initializeEventListeners();
});

function initializeEventListeners()
{
if ( interfaceObj )
{
     if ( eventEmitterObj )
  {
         eventEmitterObj.addEventListener( 'CPAPI_SLIDEENTER', function ( e )
   { 
    document.addEventListener( 'DOMNodeInserted', function ( e )
    {
        if ( e.target.nodeName == 'IFRAME' )
     {   
      var frame = document.getElementsByTagName( 'iframe' )[ 0 ];
   
      if ( frame != null )
      {
       for ( var i = 0; i < frame.length; i++ )
       {
        frame.setAttribute('allowFullScreen', 'true')
       }
      }
   
     }
    }, false);   
            }); 
  }
}
}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 18, 2016 Mar 18, 2016

Hello,

Thanks for answering my post. I pasted this code into my index.html file

right after the initial tag. Was that what you are suggesting? It

did not make a difference. I've pasted the code from my index.html file

below. If you have a minute to look at it and let me know if I've followed

your instructions correctly I'd really appreciate it. I've also attached a

zip file with a sample of my captivate output in case it would be useful.

I appreciate any and all help with this.

Thanks,

Pete

Pete Barbella

Training Manager – S2 Security Corporation

www.s2sys.com | +1 508.663.2425 (office) | +1 508.663.2512 (fax)

Follow Us LinkedIn

var interfaceObj, eventEmitterObj;

window.addEventListener( 'moduleReadyEvent', function ( e )

{

interfaceObj = e.Data;

eventEmitterObj = interfaceObj.getEventEmitter();

  • initializeEventListeners();*

});

function initializeEventListeners()

{

if ( interfaceObj )

{

  • if ( eventEmitterObj )*

  • {*

  • eventEmitterObj.addEventListener( 'CPAPI_SLIDEENTER', function (

e )*

  • { *

  • document.addEventListener( 'DOMNodeInserted', function ( e ) *

  • {*

  • if ( e.target.nodeName == 'IFRAME' )*

  • { *

  • var frame = document.getElementsByTagName( 'iframe' )[ 0 ];*

  • if ( frame != null )*

  • { *

  • for ( var i = 0; i < frame.length; i++ )*

  • {*

  • frame.setAttribute('allowFullScreen', 'true')*

  • }*

  • }*

  • }*

  • }, false); *

  • }); *

  • }*

}

*} *

#initialLoading

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Mar 18, 2016 Mar 18, 2016

You need to put it in between the <script> and function initializeCP()

<script>

function initializeCP()

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 18, 2016 Mar 18, 2016

Thank you very much for the assistance.

Pete

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Mar 18, 2016 Mar 18, 2016

Did it work?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 18, 2016 Mar 18, 2016

Unfortunately, I was unable to get this solution to work.

Thanks,

Pete

Pete Barbella

Training Manager – S2 Security Corporation

www.s2sys.com | +1 508.663.2425 (office) | +1 508.663.2512 (fax)

Follow Us LinkedIn

<https://www.linkedin.com/company/121846?trk=tyah&trkInfo=tarId%3A1403211968985%2Ctas%3As2%20security%2Cidx%3A2-1-2>

Twitter <https://twitter.com/S2Security>

On Fri, Mar 18, 2016 at 2:38 PM, TLCMediaDesign <forums_noreply@adobe.com>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Mar 19, 2016 Mar 19, 2016

You might try changing this line:

frame.setAttribute('allowFullScreen', 'true')

to

frame.setAttribute('allowFullScreen', '')

Also, this code won't get into an iframe inside of an iframe

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 21, 2016 Jun 21, 2016

En efecto como indica el usuario jamesi32884181​ al agregar los valores webkitallowfullscreen:"true",mozallowfullscreen:"true",allowfullscreen:"true", se soluciona el inconveniente.

Para ampliar un poco el tema, esto se debe a que captivate crea los objetos "iframe" en tiempo de ejecucion y a nivel de codigo los maneja con el identificador Myframe_ por lo tanto ubicando ese objeto dentro del archivo CPM.JS y agregandole esos valores que controlan la reproduccion en pantalla completa, cada que dentro del proyecto en su version web, se cree un iframe, este tomara los atributos que se le han asignado.

Indeed indicates the user jamesi32884181 by adding the values webkitallowfullscreen: true, mozallowfullscreen: "true", allowfullscreen: "true", the problem is solved.

To broaden the issue a little, because that captivate creates the "iframe" objects at run time and at the level of code handles them with the Myframe_ identifier so placing that object within the file CPM. JS and adding those values that control the playback on screen full, each of which within the web version of project, will create an iframe, this take the attributes that have been assigned to it.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Help resources