Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 1... Línea 1...
1
<?php
1
<?php
Línea 2... Línea -...
2
 
-
 
3
declare(strict_types=1);
2
 
4
/**
3
/**
5
 * SimplePie
4
 * SimplePie
6
 *
5
 *
7
 * A PHP-Based RSS and Atom Feed Framework.
6
 * A PHP-Based RSS and Atom Feed Framework.
Línea 723... Línea 722...
723
     */
722
     */
724
    public function get_size()
723
    public function get_size()
725
    {
724
    {
726
        $length = $this->get_length();
725
        $length = $this->get_length();
727
        if ($length !== null) {
726
        if ($length !== null) {
728
            return round($length/1048576, 2);
727
            return round($length / 1048576, 2);
729
        }
728
        }
Línea 730... Línea 729...
730
 
729
 
731
        return null;
730
        return null;
Línea 810... Línea 809...
810
     * @deprecated Use the second parameter to {@see embed} instead
809
     * @deprecated Use the second parameter to {@see embed} instead
811
     *
810
     *
812
     * @param array|string $options See first parameter to {@see embed}
811
     * @param array|string $options See first parameter to {@see embed}
813
     * @return string HTML string to output
812
     * @return string HTML string to output
814
     */
813
     */
815
    public function native_embed($options='')
814
    public function native_embed($options = '')
816
    {
815
    {
817
        return $this->embed($options, true);
816
        return $this->embed($options, true);
818
    }
817
    }
Línea 819... Línea 818...
819
 
818
 
Línea 941... Línea 940...
941
        if ($width === 'auto') {
940
        if ($width === 'auto') {
942
            if ($mime === 'video') {
941
            if ($mime === 'video') {
943
                if ($height === 'auto') {
942
                if ($height === 'auto') {
944
                    $width = 480;
943
                    $width = 480;
945
                } elseif ($widescreen) {
944
                } elseif ($widescreen) {
946
                    $width = round((intval($height)/9)*16);
945
                    $width = round((intval($height) / 9) * 16);
947
                } else {
946
                } else {
948
                    $width = round((intval($height)/3)*4);
947
                    $width = round((intval($height) / 3) * 4);
949
                }
948
                }
950
            } else {
949
            } else {
951
                $width = '100%';
950
                $width = '100%';
952
            }
951
            }
953
        }
952
        }
Línea 961... Línea 960...
961
                        $height = 270;
960
                        $height = 270;
962
                    } else {
961
                    } else {
963
                        $height = 360;
962
                        $height = 360;
964
                    }
963
                    }
965
                } elseif ($widescreen) {
964
                } elseif ($widescreen) {
966
                    $height = round((intval($width)/16)*9);
965
                    $height = round((intval($width) / 16) * 9);
967
                } else {
966
                } else {
968
                    $height = round((intval($width)/4)*3);
967
                    $height = round((intval($width) / 4) * 3);
969
                }
968
                }
970
            } else {
969
            } else {
971
                $height = 376;
970
                $height = 376;
972
            }
971
            }
973
        } elseif ($mime === 'audio') {
972
        } elseif ($mime === 'audio') {
Línea 1113... Línea 1112...
1113
 
1112
 
1114
                case 'wma':
1113
                case 'wma':
1115
                    $type = 'audio/x-ms-wma';
1114
                    $type = 'audio/x-ms-wma';
Línea 1116... Línea 1115...
1116
                    break;
1115
                    break;
1117
 
1116
 
1118
                // Video mime-types
1117
                    // Video mime-types
1119
                case '3gp':
1118
                case '3gp':
1120
                case '3gpp':
1119
                case '3gpp':
Línea 1176... Línea 1175...
1176
 
1175
 
1177
                case 'wvx':
1176
                case 'wvx':
1178
                    $type = 'video/x-ms-wvx';
1177
                    $type = 'video/x-ms-wvx';
Línea 1179... Línea 1178...
1179
                    break;
1178
                    break;
1180
 
1179
 
1181
                // Flash mime-types
1180
                    // Flash mime-types
1182
                case 'spl':
1181
                case 'spl':
Línea 1183... Línea 1182...
1183
                    $type = 'application/futuresplash';
1182
                    $type = 'application/futuresplash';