Proyectos de Subversion Moodle

Rev

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

Rev 592 Rev 594
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 -... Línea 160...
-
 
160
 
-
 
161
    function resizeVideoIframe(){
-
 
162
         // Seleccionamos el iframe
160
 
163
        const $iframe = $('iframe');
-
 
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 161... Línea 185...
161
    
185
    }
162
 
186
 
163
    function renderBlockButtons(){
187
    function renderBlockButtons(){
164
        const buttonsContainer = $("#blocks_buttons");
188
        const buttonsContainer = $("#blocks_buttons");
Línea 188... Línea 212...
188
 
212
 
189
            buttonsContainer.append(blockBtn)
213
            buttonsContainer.append(blockBtn)
190
        })
214
        })
Línea -... Línea 215...
-
 
215
    }
191
    }
216
 
192
 
217
    resizeVideoIframe()
193
    renderBlockButtons()
218
    renderBlockButtons()