Proyectos de Subversion Moodle

Rev

Rev 520 | Rev 594 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 520 Rev 592
Línea 156... Línea 156...
156
M.util.js_pending('theme_universe/loader');
156
M.util.js_pending('theme_universe/loader');
157
require(['theme_universe/loader', 'theme_universe/drawer', 'jquery'], function(Loader, Drawer, $) {
157
require(['theme_universe/loader', 'theme_universe/drawer', 'jquery'], function(Loader, Drawer, $) {
158
    Drawer.init();
158
    Drawer.init();
159
    M.util.js_complete('theme_universe/loader');
159
    M.util.js_complete('theme_universe/loader');
Línea 160... Línea -...
160
 
-
 
161
    function resizeVideoIframe(){
-
 
162
         // Seleccionamos el iframe
-
 
163
        const $iframe = $('iframe');
160
 
164
 
-
 
165
        // Verificamos si el iframe existe
-
 
166
        if ($iframe.length) {
-
 
167
            // Obtenemos el contenido del iframe
-
 
168
            const $iframeContents = $iframe.contents();
-
 
169
 
-
 
170
            // Seleccionamos el primer contenedor de vídeo H5P dentro del contenido del iframe
-
 
171
            const $h5pVideoWrapper = $iframeContents.find('.h5p-video').first();
-
 
172
 
-
 
173
            // Verificamos si el contenedor del vídeo H5P existe
-
 
174
            if ($h5pVideoWrapper.length) {
-
 
175
                // Seleccionamos el primer vídeo con la clase 'h5p-video' dentro del contenedor
-
 
176
                const $h5Video = $h5pVideoWrapper.find('video.h5p-video').first();
-
 
177
 
-
 
178
                // Verificamos si el vídeo existe
-
 
179
                if ($h5Video.length) {
-
 
180
                    // Aplicamos el estilo CSS al vídeo
-
 
181
                    $h5Video.css("height", "93vh");
-
 
182
                }
-
 
183
            }
-
 
184
        }
-
 
Línea 185... Línea 161...
185
    }
161
    
186
 
162
 
187
    function renderBlockButtons(){
163
    function renderBlockButtons(){
188
        const buttonsContainer = $("#blocks_buttons");
164
        const buttonsContainer = $("#blocks_buttons");
Línea 212... Línea 188...
212
 
188
 
213
            buttonsContainer.append(blockBtn)
189
            buttonsContainer.append(blockBtn)
214
        })
190
        })
Línea 215... Línea -...
215
    }
-
 
216
 
191
    }
217
    resizeVideoIframe()
192
 
218
    renderBlockButtons()
193
    renderBlockButtons()