Add button within content (iframe embed)
I want to add a toolbar that performs as an accessiblity toolbar. This toolbar also acts as a Text to Speech function with multi-lingual translation in other languages.
Now don't worry - The toolbar technology is already produced and I've been using it for many years.
I am simply trying to get it to work with H5P when using 'embed' as 'iframe'.
What I have so far....
I have worked out how to add the toolbar (which overlays on top of the content). There is a toggle button that triggers the appearance of said toolbar. The problem I am having is I cannot work out how to get the button to appear within the 'content' for the H5P id. Rather than outside of the H5P content when using iframes.
See these images, which illustrate the toolbars position and the location of the toggle image to show/hide the toolbar.
1. Toolbar off (not shown).
2. Toolbar on (displays toolbar).
The 3rd image is where I want to put the toggle button.
3. Where I want to put the toggle button.
I have edited "/wp-content/plugins/h5p/h5p-php-library/embed.php". I added the parts in bold.
<div class="h5p-content" data-content-id="<?php print $content['id']; ?>"></div>
H5PIntegration = <?php print json_encode($integration); ?>;
var p = (("https:" == document.location.protocol) ? "https://" : "http://");
The problem is this does not show the toggle button within the content, although it is displayed when viewing the H5P (not fullscreen) and does work.
I want to have the toggle button inside the contents. I have been looking all over the code, thinking where can I insert it. I have tried many, many (yes I said it twice) edits in various files across the H5P code and simply can't get it inside the content area.
The primary issue, is that when the full screen button is used (for a course presentation for example), I no longer see the toggle button to turn on the toolbar.
If I can get the toggle button in the content in an absolute position on each slide of the course presentation I would have my solution.
Can someone at H5P point me in the right direction - drove me nuts today :-D
Thanks and all the best