Version Description
- Added profile picture along with the link back to the profile in the media pop ups ( sponsored by Richard Ellis )
- Fixed WordPress 3.6 attachment meta function issue & mediaElementJs
- Fixed Context Null issue in activity
- Fixed image size issue in gallery
- Fixed lightbox whitespace issue
- Fixed backbone paging on custom shortcode
- Other minor bug fixes
Download this release
Release Info
Developer | faishal |
Plugin | rtMedia for WordPress, BuddyPress and bbPress |
Version | 3.0.11 |
Comparing to | |
See all releases |
Code changes from version 3.0.10 to 3.0.11
- app/admin/RTMediaAdmin.php +1 -1
- app/assets/css/main.css +1 -1
- app/assets/js/admin.js +2 -5
- app/assets/js/rtMedia.backbone.js +19 -13
- app/assets/js/rtMedia.js +50 -48
- app/assets/sass/main.scss +38 -4
- app/helper/RTMediaAddon.php +4 -4
- app/helper/db/RTDBUpdate.php +35 -31
- app/main/RTMedia.php +89 -15
- app/main/contexts/RTMediaContext.php +13 -8
- app/main/controllers/activity/RTMediaActivity.php +93 -92
- app/main/controllers/activity/RTMediaBuddyPressActivity.php +5 -1
- app/main/controllers/group/RTMediaGroupExtension.php +53 -48
- app/main/controllers/media/RTMediaComment.php +1 -1
- app/main/controllers/media/RTMediaMedia.php +7 -0
- app/main/controllers/shortcodes/RTMediaGalleryShortcode.php +2 -2
- app/main/controllers/template/RTMediaTemplate.php +246 -243
- app/main/controllers/template/rt-template-functions.php +61 -5
- app/main/controllers/upload/RTMediaUploadEndpoint.php +1 -1
- app/main/controllers/upload/processors/RTMediaUploadFile.php +4 -2
- app/main/routers/query/RTMediaQuery.php +18 -0
- index.php +1 -1
- lib/getid3/getid3.php +1565 -1671
- lib/media-element/bigplay.svg +1 -0
- lib/media-element/controls.png +0 -0
- lib/media-element/controls.svg +1 -0
- lib/media-element/flashmediaelement.swf +0 -0
- lib/media-element/mediaelement-and-player.min.js +138 -118
- lib/media-element/mediaelementplayer.min.css +1 -1
- lib/media-element/wp-mediaelement.css +15 -0
- lib/media-element/wp-mediaelement.js +15 -0
- readme.txt +17 -6
- templates/media/media-single.php +25 -13
app/admin/RTMediaAdmin.php
CHANGED
@@ -364,7 +364,7 @@ if ( ! class_exists ( 'RTMediaAdmin' ) ) {
|
|
364 |
if ( $page == "rtmedia-settings" ) {
|
365 |
|
366 |
|
367 |
-
echo '<div id="
|
368 |
$sub_tabs = $this->settings_sub_tabs ();
|
369 |
RTMediaFormHandler::rtForm_settings_tabs_content ( $page, $sub_tabs );
|
370 |
echo '</div>';
|
364 |
if ( $page == "rtmedia-settings" ) {
|
365 |
|
366 |
|
367 |
+
echo '<div id="rtm-settings-tabs">';
|
368 |
$sub_tabs = $this->settings_sub_tabs ();
|
369 |
RTMediaFormHandler::rtForm_settings_tabs_content ( $page, $sub_tabs );
|
370 |
echo '</div>';
|
app/assets/css/main.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.rtmedia-container,.rtmedia-activity-container,#buddypress div.rtmedia-activity-container{padding:5px;margin:0;clear:left}.rtmedia-container html,.rtmedia-activity-container html,#buddypress div.rtmedia-activity-container html,.rtmedia-container body,.rtmedia-activity-container body,#buddypress div.rtmedia-activity-container body,.rtmedia-container div,.rtmedia-activity-container div,#buddypress div.rtmedia-activity-container div,.rtmedia-container span,.rtmedia-activity-container span,#buddypress div.rtmedia-activity-container span,.rtmedia-container applet,.rtmedia-activity-container applet,#buddypress div.rtmedia-activity-container applet,.rtmedia-container object,.rtmedia-activity-container object,#buddypress div.rtmedia-activity-container object,.rtmedia-container iframe,.rtmedia-activity-container iframe,#buddypress div.rtmedia-activity-container iframe,.rtmedia-container h1,.rtmedia-activity-container h1,#buddypress div.rtmedia-activity-container h1,.rtmedia-container h2,.rtmedia-activity-container h2,#buddypress div.rtmedia-activity-container h2,.rtmedia-container h3,.rtmedia-activity-container h3,#buddypress div.rtmedia-activity-container h3,.rtmedia-container h4,.rtmedia-activity-container h4,#buddypress div.rtmedia-activity-container h4,.rtmedia-container h5,.rtmedia-activity-container h5,#buddypress div.rtmedia-activity-container h5,.rtmedia-container h6,.rtmedia-activity-container h6,#buddypress div.rtmedia-activity-container h6,.rtmedia-container p,.rtmedia-activity-container p,#buddypress div.rtmedia-activity-container p,.rtmedia-container blockquote,.rtmedia-activity-container blockquote,#buddypress div.rtmedia-activity-container blockquote,.rtmedia-container pre,.rtmedia-activity-container pre,#buddypress div.rtmedia-activity-container pre,.rtmedia-container a,.rtmedia-activity-container a,#buddypress div.rtmedia-activity-container a,.rtmedia-container abbr,.rtmedia-activity-container abbr,#buddypress div.rtmedia-activity-container abbr,.rtmedia-container acronym,.rtmedia-activity-container acronym,#buddypress div.rtmedia-activity-container acronym,.rtmedia-container address,.rtmedia-activity-container address,#buddypress div.rtmedia-activity-container address,.rtmedia-container big,.rtmedia-activity-container big,#buddypress div.rtmedia-activity-container big,.rtmedia-container cite,.rtmedia-activity-container cite,#buddypress div.rtmedia-activity-container cite,.rtmedia-container code,.rtmedia-activity-container code,#buddypress div.rtmedia-activity-container code,.rtmedia-container del,.rtmedia-activity-container del,#buddypress div.rtmedia-activity-container del,.rtmedia-container dfn,.rtmedia-activity-container dfn,#buddypress div.rtmedia-activity-container dfn,.rtmedia-container em,.rtmedia-activity-container em,#buddypress div.rtmedia-activity-container em,.rtmedia-container img,.rtmedia-activity-container img,#buddypress div.rtmedia-activity-container img,.rtmedia-container ins,.rtmedia-activity-container ins,#buddypress div.rtmedia-activity-container ins,.rtmedia-container kbd,.rtmedia-activity-container kbd,#buddypress div.rtmedia-activity-container kbd,.rtmedia-container q,.rtmedia-activity-container q,#buddypress div.rtmedia-activity-container q,.rtmedia-container s,.rtmedia-activity-container s,#buddypress div.rtmedia-activity-container s,.rtmedia-container samp,.rtmedia-activity-container samp,#buddypress div.rtmedia-activity-container samp,.rtmedia-container small,.rtmedia-activity-container small,#buddypress div.rtmedia-activity-container small,.rtmedia-container strike,.rtmedia-activity-container strike,#buddypress div.rtmedia-activity-container strike,.rtmedia-container strong,.rtmedia-activity-container strong,#buddypress div.rtmedia-activity-container strong,.rtmedia-container sub,.rtmedia-activity-container sub,#buddypress div.rtmedia-activity-container sub,.rtmedia-container sup,.rtmedia-activity-container sup,#buddypress div.rtmedia-activity-container sup,.rtmedia-container tt,.rtmedia-activity-container tt,#buddypress div.rtmedia-activity-container tt,.rtmedia-container var,.rtmedia-activity-container var,#buddypress div.rtmedia-activity-container var,.rtmedia-container b,.rtmedia-activity-container b,#buddypress div.rtmedia-activity-container b,.rtmedia-container u,.rtmedia-activity-container u,#buddypress div.rtmedia-activity-container u,.rtmedia-container i,.rtmedia-activity-container i,#buddypress div.rtmedia-activity-container i,.rtmedia-container center,.rtmedia-activity-container center,#buddypress div.rtmedia-activity-container center,.rtmedia-container dl,.rtmedia-activity-container dl,#buddypress div.rtmedia-activity-container dl,.rtmedia-container dt,.rtmedia-activity-container dt,#buddypress div.rtmedia-activity-container dt,.rtmedia-container dd,.rtmedia-activity-container dd,#buddypress div.rtmedia-activity-container dd,.rtmedia-container ol,.rtmedia-activity-container ol,#buddypress div.rtmedia-activity-container ol,.rtmedia-container ul,.rtmedia-activity-container ul,#buddypress div.rtmedia-activity-container ul,.rtmedia-container li,.rtmedia-activity-container li,#buddypress div.rtmedia-activity-container li,.rtmedia-container fieldset,.rtmedia-activity-container fieldset,#buddypress div.rtmedia-activity-container fieldset,.rtmedia-container form,.rtmedia-activity-container form,#buddypress div.rtmedia-activity-container form,.rtmedia-container label,.rtmedia-activity-container label,#buddypress div.rtmedia-activity-container label,.rtmedia-container legend,.rtmedia-activity-container legend,#buddypress div.rtmedia-activity-container legend,.rtmedia-container table,.rtmedia-activity-container table,#buddypress div.rtmedia-activity-container table,.rtmedia-container caption,.rtmedia-activity-container caption,#buddypress div.rtmedia-activity-container caption,.rtmedia-container tbody,.rtmedia-activity-container tbody,#buddypress div.rtmedia-activity-container tbody,.rtmedia-container tfoot,.rtmedia-activity-container tfoot,#buddypress div.rtmedia-activity-container tfoot,.rtmedia-container thead,.rtmedia-activity-container thead,#buddypress div.rtmedia-activity-container thead,.rtmedia-container tr,.rtmedia-activity-container tr,#buddypress div.rtmedia-activity-container tr,.rtmedia-container th,.rtmedia-activity-container th,#buddypress div.rtmedia-activity-container th,.rtmedia-container td,.rtmedia-activity-container td,#buddypress div.rtmedia-activity-container td,.rtmedia-container article,.rtmedia-activity-container article,#buddypress div.rtmedia-activity-container article,.rtmedia-container aside,.rtmedia-activity-container aside,#buddypress div.rtmedia-activity-container aside,.rtmedia-container canvas,.rtmedia-activity-container canvas,#buddypress div.rtmedia-activity-container canvas,.rtmedia-container details,.rtmedia-activity-container details,#buddypress div.rtmedia-activity-container details,.rtmedia-container embed,.rtmedia-activity-container embed,#buddypress div.rtmedia-activity-container embed,.rtmedia-container figure,.rtmedia-activity-container figure,#buddypress div.rtmedia-activity-container figure,.rtmedia-container figcaption,.rtmedia-activity-container figcaption,#buddypress div.rtmedia-activity-container figcaption,.rtmedia-container footer,.rtmedia-activity-container footer,#buddypress div.rtmedia-activity-container footer,.rtmedia-container header,.rtmedia-activity-container header,#buddypress div.rtmedia-activity-container header,.rtmedia-container hgroup,.rtmedia-activity-container hgroup,#buddypress div.rtmedia-activity-container hgroup,.rtmedia-container menu,.rtmedia-activity-container menu,#buddypress div.rtmedia-activity-container menu,.rtmedia-container nav,.rtmedia-activity-container nav,#buddypress div.rtmedia-activity-container nav,.rtmedia-container output,.rtmedia-activity-container output,#buddypress div.rtmedia-activity-container output,.rtmedia-container ruby,.rtmedia-activity-container ruby,#buddypress div.rtmedia-activity-container ruby,.rtmedia-container section,.rtmedia-activity-container section,#buddypress div.rtmedia-activity-container section,.rtmedia-container summary,.rtmedia-activity-container summary,#buddypress div.rtmedia-activity-container summary,.rtmedia-container time,.rtmedia-activity-container time,#buddypress div.rtmedia-activity-container time,.rtmedia-container mark,.rtmedia-activity-container mark,#buddypress div.rtmedia-activity-container mark,.rtmedia-container audio,.rtmedia-activity-container audio,#buddypress div.rtmedia-activity-container audio,.rtmedia-container video,.rtmedia-activity-container video,#buddypress div.rtmedia-activity-container video{margin:0;padding:0;border:0;font:inherit;font-size:100%;vertical-align:baseline}.rtmedia-container html,.rtmedia-activity-container html,#buddypress div.rtmedia-activity-container html{line-height:1}.rtmedia-container ol,.rtmedia-activity-container ol,#buddypress div.rtmedia-activity-container ol,.rtmedia-container ul,.rtmedia-activity-container ul,#buddypress div.rtmedia-activity-container ul{list-style:none}.rtmedia-container table,.rtmedia-activity-container table,#buddypress div.rtmedia-activity-container table{border-collapse:collapse;border-spacing:0}.rtmedia-container caption,.rtmedia-activity-container caption,#buddypress div.rtmedia-activity-container caption,.rtmedia-container th,.rtmedia-activity-container th,#buddypress div.rtmedia-activity-container th,.rtmedia-container td,.rtmedia-activity-container td,#buddypress div.rtmedia-activity-container td{text-align:left;font-weight:normal;vertical-align:middle}.rtmedia-container q,.rtmedia-activity-container q,#buddypress div.rtmedia-activity-container q,.rtmedia-container blockquote,.rtmedia-activity-container blockquote,#buddypress div.rtmedia-activity-container blockquote{quotes:none}.rtmedia-container q:before,.rtmedia-activity-container q:before,#buddypress div.rtmedia-activity-container q:before,.rtmedia-container q:after,.rtmedia-activity-container q:after,#buddypress div.rtmedia-activity-container q:after,.rtmedia-container blockquote:before,.rtmedia-activity-container blockquote:before,#buddypress div.rtmedia-activity-container blockquote:before,.rtmedia-container blockquote:after,.rtmedia-activity-container blockquote:after,#buddypress div.rtmedia-activity-container blockquote:after{content:"";content:none}.rtmedia-container a img,.rtmedia-activity-container a img,#buddypress div.rtmedia-activity-container a img{border:none}.rtmedia-container article,.rtmedia-activity-container article,#buddypress div.rtmedia-activity-container article,.rtmedia-container aside,.rtmedia-activity-container aside,#buddypress div.rtmedia-activity-container aside,.rtmedia-container details,.rtmedia-activity-container details,#buddypress div.rtmedia-activity-container details,.rtmedia-container figcaption,.rtmedia-activity-container figcaption,#buddypress div.rtmedia-activity-container figcaption,.rtmedia-container figure,.rtmedia-activity-container figure,#buddypress div.rtmedia-activity-container figure,.rtmedia-container footer,.rtmedia-activity-container footer,#buddypress div.rtmedia-activity-container footer,.rtmedia-container header,.rtmedia-activity-container header,#buddypress div.rtmedia-activity-container header,.rtmedia-container hgroup,.rtmedia-activity-container hgroup,#buddypress div.rtmedia-activity-container hgroup,.rtmedia-container menu,.rtmedia-activity-container menu,#buddypress div.rtmedia-activity-container menu,.rtmedia-container nav,.rtmedia-activity-container nav,#buddypress div.rtmedia-activity-container nav,.rtmedia-container section,.rtmedia-activity-container section,#buddypress div.rtmedia-activity-container section,.rtmedia-container summary,.rtmedia-activity-container summary,#buddypress div.rtmedia-activity-container summary{display:block}.rtmedia-container *,.rtmedia-activity-container *,#buddypress div.rtmedia-activity-container *,.rtmedia-container *:before,.rtmedia-activity-container *:before,#buddypress div.rtmedia-activity-container *:before,.rtmedia-container *:after,.rtmedia-activity-container *:after,#buddypress div.rtmedia-activity-container *:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.rtmedia-container html,.rtmedia-activity-container html,#buddypress div.rtmedia-activity-container html,.rtmedia-container body,.rtmedia-activity-container body,#buddypress div.rtmedia-activity-container body{font-size:100%}.rtmedia-container body,.rtmedia-activity-container body,#buddypress div.rtmedia-activity-container body{background:#fff;color:#222;padding:0;margin:0;font-family:"Helvetica Neue","Helvetica",Helvetica,Arial,sans-serif;font-weight:normal;font-style:normal;line-height:1;position:relative;cursor:default}.rtmedia-container a:hover,.rtmedia-activity-container a:hover,#buddypress div.rtmedia-activity-container a:hover{cursor:pointer}.rtmedia-container a:focus,.rtmedia-activity-container a:focus,#buddypress div.rtmedia-activity-container a:focus{outline:none}.rtmedia-container img,.rtmedia-activity-container img,#buddypress div.rtmedia-activity-container img,.rtmedia-container object,.rtmedia-activity-container object,#buddypress div.rtmedia-activity-container object,.rtmedia-container embed,.rtmedia-activity-container embed,#buddypress div.rtmedia-activity-container embed{max-width:100%;height:auto}.rtmedia-container object,.rtmedia-activity-container object,#buddypress div.rtmedia-activity-container object,.rtmedia-container embed,.rtmedia-activity-container embed,#buddypress div.rtmedia-activity-container embed{height:100%}.rtmedia-container img,.rtmedia-activity-container img,#buddypress div.rtmedia-activity-container img{-ms-interpolation-mode:bicubic}.rtmedia-container #map_canvas img,.rtmedia-activity-container #map_canvas img,.rtmedia-container #map_canvas embed,.rtmedia-activity-container #map_canvas embed,.rtmedia-container #map_canvas object,.rtmedia-activity-container #map_canvas object,.rtmedia-container .map_canvas img,.rtmedia-activity-container .map_canvas img,#buddypress div.rtmedia-activity-container .map_canvas img,.rtmedia-container .map_canvas embed,.rtmedia-activity-container .map_canvas embed,#buddypress div.rtmedia-activity-container .map_canvas embed,.rtmedia-container .map_canvas object,.rtmedia-activity-container .map_canvas object,#buddypress div.rtmedia-activity-container .map_canvas object{max-width:none !important}.rtmedia-container .left,.rtmedia-activity-container .left,#buddypress div.rtmedia-activity-container .left{float:left !important}.rtmedia-container .right,.rtmedia-activity-container .right,#buddypress div.rtmedia-activity-container .right{float:right !important}.rtmedia-container .text-left,.rtmedia-activity-container .text-left,#buddypress div.rtmedia-activity-container .text-left{text-align:left !important}.rtmedia-container .text-right,.rtmedia-activity-container .text-right,#buddypress div.rtmedia-activity-container .text-right{text-align:right !important}.rtmedia-container .text-center,.rtmedia-activity-container .text-center,#buddypress div.rtmedia-activity-container .text-center{text-align:center !important}.rtmedia-container .text-justify,.rtmedia-activity-container .text-justify,#buddypress div.rtmedia-activity-container .text-justify{text-align:justify !important}.rtmedia-container .hide,.rtmedia-activity-container .hide,#buddypress div.rtmedia-activity-container .hide{display:none}.rtmedia-container .antialiased,.rtmedia-activity-container .antialiased,#buddypress div.rtmedia-activity-container .antialiased{-webkit-font-smoothing:antialiased}.rtmedia-container img,.rtmedia-activity-container img,#buddypress div.rtmedia-activity-container img{display:inline-block;vertical-align:middle}.rtmedia-container textarea,.rtmedia-activity-container textarea,#buddypress div.rtmedia-activity-container textarea{height:auto;min-height:50px}.rtmedia-container select,.rtmedia-activity-container select,#buddypress div.rtmedia-activity-container select{width:100%}.rtmedia-container .row,.rtmedia-activity-container .row,#buddypress div.rtmedia-activity-container .row{width:100%;margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;max-width:62.5em;*zoom:1}.rtmedia-container .row:before,.rtmedia-activity-container .row:before,#buddypress div.rtmedia-activity-container .row:before,.rtmedia-container .row:after,.rtmedia-activity-container .row:after,#buddypress div.rtmedia-activity-container .row:after{content:" ";display:table}.rtmedia-container .row:after,.rtmedia-activity-container .row:after,#buddypress div.rtmedia-activity-container .row:after{clear:both}.rtmedia-container .row.collapse .column,.rtmedia-activity-container .row.collapse .column,#buddypress div.rtmedia-activity-container .row.collapse .column,.rtmedia-container .row.collapse .columns,.rtmedia-activity-container .row.collapse .columns,#buddypress div.rtmedia-activity-container .row.collapse .columns{position:relative;padding-left:0;padding-right:0;float:left}.rtmedia-container .row .row,.rtmedia-activity-container .row .row,#buddypress div.rtmedia-activity-container .row .row{width:auto;margin-left:-0.9375em;margin-right:-0.9375em;margin-top:0;margin-bottom:0;max-width:none;*zoom:1}.rtmedia-container .row .row:before,.rtmedia-activity-container .row .row:before,#buddypress div.rtmedia-activity-container .row .row:before,.rtmedia-container .row .row:after,.rtmedia-activity-container .row .row:after,#buddypress div.rtmedia-activity-container .row .row:after{content:" ";display:table}.rtmedia-container .row .row:after,.rtmedia-activity-container .row .row:after,#buddypress div.rtmedia-activity-container .row .row:after{clear:both}.rtmedia-container .row .row.collapse,.rtmedia-activity-container .row .row.collapse,#buddypress div.rtmedia-activity-container .row .row.collapse{width:auto;margin:0;max-width:none;*zoom:1}.rtmedia-container .row .row.collapse:before,.rtmedia-activity-container .row .row.collapse:before,#buddypress div.rtmedia-activity-container .row .row.collapse:before,.rtmedia-container .row .row.collapse:after,.rtmedia-activity-container .row .row.collapse:after,#buddypress div.rtmedia-activity-container .row .row.collapse:after{content:" ";display:table}.rtmedia-container .row .row.collapse:after,.rtmedia-activity-container .row .row.collapse:after,#buddypress div.rtmedia-activity-container .row .row.collapse:after{clear:both}.rtmedia-container .column,.rtmedia-activity-container .column,#buddypress div.rtmedia-activity-container .column,.rtmedia-container .columns,.rtmedia-activity-container .columns,#buddypress div.rtmedia-activity-container .columns{position:relative;padding-left:0.9375em;padding-right:0.9375em;width:100%;float:left}@media only screen{.rtmedia-container .column,.rtmedia-activity-container .column,#buddypress div.rtmedia-activity-container .column,.rtmedia-container .columns,.rtmedia-activity-container .columns,#buddypress div.rtmedia-activity-container .columns{position:relative;padding-left:0.9375em;padding-right:0.9375em;float:left}.rtmedia-container .small-1,.rtmedia-activity-container .small-1,#buddypress div.rtmedia-activity-container .small-1{position:relative;width:8.33333%}.rtmedia-container .small-2,.rtmedia-activity-container .small-2,#buddypress div.rtmedia-activity-container .small-2{position:relative;width:16.66667%}.rtmedia-container .small-3,.rtmedia-activity-container .small-3,#buddypress div.rtmedia-activity-container .small-3{position:relative;width:25%}.rtmedia-container .small-4,.rtmedia-activity-container .small-4,#buddypress div.rtmedia-activity-container .small-4{position:relative;width:33.33333%}.rtmedia-container .small-5,.rtmedia-activity-container .small-5,#buddypress div.rtmedia-activity-container .small-5{position:relative;width:41.66667%}.rtmedia-container .small-6,.rtmedia-activity-container .small-6,#buddypress div.rtmedia-activity-container .small-6{position:relative;width:50%}.rtmedia-container .small-7,.rtmedia-activity-container .small-7,#buddypress div.rtmedia-activity-container .small-7{position:relative;width:58.33333%}.rtmedia-container .small-8,.rtmedia-activity-container .small-8,#buddypress div.rtmedia-activity-container .small-8{position:relative;width:66.66667%}.rtmedia-container .small-9,.rtmedia-activity-container .small-9,#buddypress div.rtmedia-activity-container .small-9{position:relative;width:75%}.rtmedia-container .small-10,.rtmedia-activity-container .small-10,#buddypress div.rtmedia-activity-container .small-10{position:relative;width:83.33333%}.rtmedia-container .small-11,.rtmedia-activity-container .small-11,#buddypress div.rtmedia-activity-container .small-11{position:relative;width:91.66667%}.rtmedia-container .small-12,.rtmedia-activity-container .small-12,#buddypress div.rtmedia-activity-container .small-12{position:relative;width:100%}.rtmedia-container .small-offset-0,.rtmedia-activity-container .small-offset-0,#buddypress div.rtmedia-activity-container .small-offset-0{position:relative;margin-left:0%}.rtmedia-container .small-offset-1,.rtmedia-activity-container .small-offset-1,#buddypress div.rtmedia-activity-container .small-offset-1{position:relative;margin-left:8.33333%}.rtmedia-container .small-offset-2,.rtmedia-activity-container .small-offset-2,#buddypress div.rtmedia-activity-container .small-offset-2{position:relative;margin-left:16.66667%}.rtmedia-container .small-offset-3,.rtmedia-activity-container .small-offset-3,#buddypress div.rtmedia-activity-container .small-offset-3{position:relative;margin-left:25%}.rtmedia-container .small-offset-4,.rtmedia-activity-container .small-offset-4,#buddypress div.rtmedia-activity-container .small-offset-4{position:relative;margin-left:33.33333%}.rtmedia-container .small-offset-5,.rtmedia-activity-container .small-offset-5,#buddypress div.rtmedia-activity-container .small-offset-5{position:relative;margin-left:41.66667%}.rtmedia-container .small-offset-6,.rtmedia-activity-container .small-offset-6,#buddypress div.rtmedia-activity-container .small-offset-6{position:relative;margin-left:50%}.rtmedia-container .small-offset-7,.rtmedia-activity-container .small-offset-7,#buddypress div.rtmedia-activity-container .small-offset-7{position:relative;margin-left:58.33333%}.rtmedia-container .small-offset-8,.rtmedia-activity-container .small-offset-8,#buddypress div.rtmedia-activity-container .small-offset-8{position:relative;margin-left:66.66667%}.rtmedia-container .small-offset-9,.rtmedia-activity-container .small-offset-9,#buddypress div.rtmedia-activity-container .small-offset-9{position:relative;margin-left:75%}.rtmedia-container .small-offset-10,.rtmedia-activity-container .small-offset-10,#buddypress div.rtmedia-activity-container .small-offset-10{position:relative;margin-left:83.33333%}.rtmedia-container [class*="column"]+[class*="column"]:last-child,.rtmedia-activity-container [class*="column"]+[class*="column"]:last-child,#buddypress div.rtmedia-activity-container [class*="column"]+[class*="column"]:last-child{float:right}.rtmedia-container [class*="column"]+[class*="column"].end,.rtmedia-activity-container [class*="column"]+[class*="column"].end,#buddypress div.rtmedia-activity-container [class*="column"]+[class*="column"].end{float:left}.rtmedia-container .column.small-centered,.rtmedia-activity-container .column.small-centered,#buddypress div.rtmedia-activity-container .column.small-centered,.rtmedia-container .columns.small-centered,.rtmedia-activity-container .columns.small-centered,#buddypress div.rtmedia-activity-container .columns.small-centered{position:relative;margin-left:auto;margin-right:auto;float:none !important}}@media only screen and (min-width: 768px){.rtmedia-container .large-1,.rtmedia-activity-container .large-1,#buddypress div.rtmedia-activity-container .large-1{position:relative;width:8.33333%}.rtmedia-container .large-2,.rtmedia-activity-container .large-2,#buddypress div.rtmedia-activity-container .large-2{position:relative;width:16.66667%}.rtmedia-container .large-3,.rtmedia-activity-container .large-3,#buddypress div.rtmedia-activity-container .large-3{position:relative;width:25%}.rtmedia-container .large-4,.rtmedia-activity-container .large-4,#buddypress div.rtmedia-activity-container .large-4{position:relative;width:33.33333%}.rtmedia-container .large-5,.rtmedia-activity-container .large-5,#buddypress div.rtmedia-activity-container .large-5{position:relative;width:41.66667%}.rtmedia-container .large-6,.rtmedia-activity-container .large-6,#buddypress div.rtmedia-activity-container .large-6{position:relative;width:50%}.rtmedia-container .large-7,.rtmedia-activity-container .large-7,#buddypress div.rtmedia-activity-container .large-7{position:relative;width:58.33333%}.rtmedia-container .large-8,.rtmedia-activity-container .large-8,#buddypress div.rtmedia-activity-container .large-8{position:relative;width:66.66667%}.rtmedia-container .large-9,.rtmedia-activity-container .large-9,#buddypress div.rtmedia-activity-container .large-9{position:relative;width:75%}.rtmedia-container .large-10,.rtmedia-activity-container .large-10,#buddypress div.rtmedia-activity-container .large-10{position:relative;width:83.33333%}.rtmedia-container .large-11,.rtmedia-activity-container .large-11,#buddypress div.rtmedia-activity-container .large-11{position:relative;width:91.66667%}.rtmedia-container .large-12,.rtmedia-activity-container .large-12,#buddypress div.rtmedia-activity-container .large-12{position:relative;width:100%}.rtmedia-container .row .large-offset-0,.rtmedia-activity-container .row .large-offset-0,#buddypress div.rtmedia-activity-container .row .large-offset-0{position:relative;margin-left:0%}.rtmedia-container .row .large-offset-1,.rtmedia-activity-container .row .large-offset-1,#buddypress div.rtmedia-activity-container .row .large-offset-1{position:relative;margin-left:8.33333%}.rtmedia-container .row .large-offset-2,.rtmedia-activity-container .row .large-offset-2,#buddypress div.rtmedia-activity-container .row .large-offset-2{position:relative;margin-left:16.66667%}.rtmedia-container .row .large-offset-3,.rtmedia-activity-container .row .large-offset-3,#buddypress div.rtmedia-activity-container .row .large-offset-3{position:relative;margin-left:25%}.rtmedia-container .row .large-offset-4,.rtmedia-activity-container .row .large-offset-4,#buddypress div.rtmedia-activity-container .row .large-offset-4{position:relative;margin-left:33.33333%}.rtmedia-container .row .large-offset-5,.rtmedia-activity-container .row .large-offset-5,#buddypress div.rtmedia-activity-container .row .large-offset-5{position:relative;margin-left:41.66667%}.rtmedia-container .row .large-offset-6,.rtmedia-activity-container .row .large-offset-6,#buddypress div.rtmedia-activity-container .row .large-offset-6{position:relative;margin-left:50%}.rtmedia-container .row .large-offset-7,.rtmedia-activity-container .row .large-offset-7,#buddypress div.rtmedia-activity-container .row .large-offset-7{position:relative;margin-left:58.33333%}.rtmedia-container .row .large-offset-8,.rtmedia-activity-container .row .large-offset-8,#buddypress div.rtmedia-activity-container .row .large-offset-8{position:relative;margin-left:66.66667%}.rtmedia-container .row .large-offset-9,.rtmedia-activity-container .row .large-offset-9,#buddypress div.rtmedia-activity-container .row .large-offset-9{position:relative;margin-left:75%}.rtmedia-container .row .large-offset-10,.rtmedia-activity-container .row .large-offset-10,#buddypress div.rtmedia-activity-container .row .large-offset-10{position:relative;margin-left:83.33333%}.rtmedia-container .row .large-offset-11,.rtmedia-activity-container .row .large-offset-11,#buddypress div.rtmedia-activity-container .row .large-offset-11{position:relative;margin-left:91.66667%}.rtmedia-container .push-1,.rtmedia-activity-container .push-1,#buddypress div.rtmedia-activity-container .push-1{position:relative;left:8.33333%;right:auto}.rtmedia-container .pull-1,.rtmedia-activity-container .pull-1,#buddypress div.rtmedia-activity-container .pull-1{position:relative;right:8.33333%;left:auto}.rtmedia-container .push-2,.rtmedia-activity-container .push-2,#buddypress div.rtmedia-activity-container .push-2{position:relative;left:16.66667%;right:auto}.rtmedia-container .pull-2,.rtmedia-activity-container .pull-2,#buddypress div.rtmedia-activity-container .pull-2{position:relative;right:16.66667%;left:auto}.rtmedia-container .push-3,.rtmedia-activity-container .push-3,#buddypress div.rtmedia-activity-container .push-3{position:relative;left:25%;right:auto}.rtmedia-container .pull-3,.rtmedia-activity-container .pull-3,#buddypress div.rtmedia-activity-container .pull-3{position:relative;right:25%;left:auto}.rtmedia-container .push-4,.rtmedia-activity-container .push-4,#buddypress div.rtmedia-activity-container .push-4{position:relative;left:33.33333%;right:auto}.rtmedia-container .pull-4,.rtmedia-activity-container .pull-4,#buddypress div.rtmedia-activity-container .pull-4{position:relative;right:33.33333%;left:auto}.rtmedia-container .push-5,.rtmedia-activity-container .push-5,#buddypress div.rtmedia-activity-container .push-5{position:relative;left:41.66667%;right:auto}.rtmedia-container .pull-5,.rtmedia-activity-container .pull-5,#buddypress div.rtmedia-activity-container .pull-5{position:relative;right:41.66667%;left:auto}.rtmedia-container .push-6,.rtmedia-activity-container .push-6,#buddypress div.rtmedia-activity-container .push-6{position:relative;left:50%;right:auto}.rtmedia-container .pull-6,.rtmedia-activity-container .pull-6,#buddypress div.rtmedia-activity-container .pull-6{position:relative;right:50%;left:auto}.rtmedia-container .push-7,.rtmedia-activity-container .push-7,#buddypress div.rtmedia-activity-container .push-7{position:relative;left:58.33333%;right:auto}.rtmedia-container .pull-7,.rtmedia-activity-container .pull-7,#buddypress div.rtmedia-activity-container .pull-7{position:relative;right:58.33333%;left:auto}.rtmedia-container .push-8,.rtmedia-activity-container .push-8,#buddypress div.rtmedia-activity-container .push-8{position:relative;left:66.66667%;right:auto}.rtmedia-container .pull-8,.rtmedia-activity-container .pull-8,#buddypress div.rtmedia-activity-container .pull-8{position:relative;right:66.66667%;left:auto}.rtmedia-container .push-9,.rtmedia-activity-container .push-9,#buddypress div.rtmedia-activity-container .push-9{position:relative;left:75%;right:auto}.rtmedia-container .pull-9,.rtmedia-activity-container .pull-9,#buddypress div.rtmedia-activity-container .pull-9{position:relative;right:75%;left:auto}.rtmedia-container .push-10,.rtmedia-activity-container .push-10,#buddypress div.rtmedia-activity-container .push-10{position:relative;left:83.33333%;right:auto}.rtmedia-container .pull-10,.rtmedia-activity-container .pull-10,#buddypress div.rtmedia-activity-container .pull-10{position:relative;right:83.33333%;left:auto}.rtmedia-container .push-11,.rtmedia-activity-container .push-11,#buddypress div.rtmedia-activity-container .push-11{position:relative;left:91.66667%;right:auto}.rtmedia-container .pull-11,.rtmedia-activity-container .pull-11,#buddypress div.rtmedia-activity-container .pull-11{position:relative;right:91.66667%;left:auto}.rtmedia-container .column.large-centered,.rtmedia-activity-container .column.large-centered,#buddypress div.rtmedia-activity-container .column.large-centered,.rtmedia-container .columns.large-centered,.rtmedia-activity-container .columns.large-centered,#buddypress div.rtmedia-activity-container .columns.large-centered{position:relative;margin-left:auto;margin-right:auto;float:none !important}.rtmedia-container .column.large-uncentered,.rtmedia-activity-container .column.large-uncentered,#buddypress div.rtmedia-activity-container .column.large-uncentered,.rtmedia-container .columns.large-uncentered,.rtmedia-activity-container .columns.large-uncentered,#buddypress div.rtmedia-activity-container .columns.large-uncentered{margin-left:0;margin-right:0;float:left !important}.rtmedia-container .column.large-uncentered.opposite,.rtmedia-activity-container .column.large-uncentered.opposite,#buddypress div.rtmedia-activity-container .column.large-uncentered.opposite,.rtmedia-container .columns.large-uncentered.opposite,.rtmedia-activity-container .columns.large-uncentered.opposite,#buddypress div.rtmedia-activity-container .columns.large-uncentered.opposite{float:right !important}}.rtmedia-container .show-for-small,.rtmedia-activity-container .show-for-small,#buddypress div.rtmedia-activity-container .show-for-small,.rtmedia-container .show-for-medium-down,.rtmedia-activity-container .show-for-medium-down,#buddypress div.rtmedia-activity-container .show-for-medium-down,.rtmedia-container .show-for-large-down,.rtmedia-activity-container .show-for-large-down,#buddypress div.rtmedia-activity-container .show-for-large-down{display:inherit !important}.rtmedia-container .show-for-medium,.rtmedia-activity-container .show-for-medium,#buddypress div.rtmedia-activity-container .show-for-medium,.rtmedia-container .show-for-medium-up,.rtmedia-activity-container .show-for-medium-up,#buddypress div.rtmedia-activity-container .show-for-medium-up,.rtmedia-container .show-for-large,.rtmedia-activity-container .show-for-large,#buddypress div.rtmedia-activity-container .show-for-large,.rtmedia-container .show-for-large-up,.rtmedia-activity-container .show-for-large-up,#buddypress div.rtmedia-activity-container .show-for-large-up,.rtmedia-container .show-for-xlarge,.rtmedia-activity-container .show-for-xlarge,#buddypress div.rtmedia-activity-container .show-for-xlarge{display:none !important}.rtmedia-container .hide-for-medium,.rtmedia-activity-container .hide-for-medium,#buddypress div.rtmedia-activity-container .hide-for-medium,.rtmedia-container .hide-for-medium-up,.rtmedia-activity-container .hide-for-medium-up,#buddypress div.rtmedia-activity-container .hide-for-medium-up,.rtmedia-container .hide-for-large,.rtmedia-activity-container .hide-for-large,#buddypress div.rtmedia-activity-container .hide-for-large,.rtmedia-container .hide-for-large-up,.rtmedia-activity-container .hide-for-large-up,#buddypress div.rtmedia-activity-container .hide-for-large-up,.rtmedia-container .hide-for-xlarge,.rtmedia-activity-container .hide-for-xlarge,#buddypress div.rtmedia-activity-container .hide-for-xlarge{display:inherit !important}.rtmedia-container .hide-for-small,.rtmedia-activity-container .hide-for-small,#buddypress div.rtmedia-activity-container .hide-for-small,.rtmedia-container .hide-for-medium-down,.rtmedia-activity-container .hide-for-medium-down,#buddypress div.rtmedia-activity-container .hide-for-medium-down,.rtmedia-container .hide-for-large-down,.rtmedia-activity-container .hide-for-large-down,#buddypress div.rtmedia-activity-container .hide-for-large-down{display:none !important}.rtmedia-container table.show-for-small,.rtmedia-activity-container table.show-for-small,#buddypress div.rtmedia-activity-container table.show-for-small,.rtmedia-container table.show-for-medium-down,.rtmedia-activity-container table.show-for-medium-down,#buddypress div.rtmedia-activity-container table.show-for-medium-down,.rtmedia-container table.show-for-large-down,.rtmedia-activity-container table.show-for-large-down,#buddypress div.rtmedia-activity-container table.show-for-large-down,.rtmedia-container table.hide-for-medium,.rtmedia-activity-container table.hide-for-medium,#buddypress div.rtmedia-activity-container table.hide-for-medium,.rtmedia-container table.hide-for-medium-up,.rtmedia-activity-container table.hide-for-medium-up,#buddypress div.rtmedia-activity-container table.hide-for-medium-up,.rtmedia-container table.hide-for-large,.rtmedia-activity-container table.hide-for-large,#buddypress div.rtmedia-activity-container table.hide-for-large,.rtmedia-container table.hide-for-large-up,.rtmedia-activity-container table.hide-for-large-up,#buddypress div.rtmedia-activity-container table.hide-for-large-up,.rtmedia-container table.hide-for-xlarge,.rtmedia-activity-container table.hide-for-xlarge,#buddypress div.rtmedia-activity-container table.hide-for-xlarge{display:table}.rtmedia-container thead.show-for-small,.rtmedia-activity-container thead.show-for-small,#buddypress div.rtmedia-activity-container thead.show-for-small,.rtmedia-container thead.show-for-medium-down,.rtmedia-activity-container thead.show-for-medium-down,#buddypress div.rtmedia-activity-container thead.show-for-medium-down,.rtmedia-container thead.show-for-large-down,.rtmedia-activity-container thead.show-for-large-down,#buddypress div.rtmedia-activity-container thead.show-for-large-down,.rtmedia-container thead.hide-for-medium,.rtmedia-activity-container thead.hide-for-medium,#buddypress div.rtmedia-activity-container thead.hide-for-medium,.rtmedia-container thead.hide-for-medium-up,.rtmedia-activity-container thead.hide-for-medium-up,#buddypress div.rtmedia-activity-container thead.hide-for-medium-up,.rtmedia-container thead.hide-for-large,.rtmedia-activity-container thead.hide-for-large,#buddypress div.rtmedia-activity-container thead.hide-for-large,.rtmedia-container thead.hide-for-large-up,.rtmedia-activity-container thead.hide-for-large-up,#buddypress div.rtmedia-activity-container thead.hide-for-large-up,.rtmedia-container thead.hide-for-xlarge,.rtmedia-activity-container thead.hide-for-xlarge,#buddypress div.rtmedia-activity-container thead.hide-for-xlarge{display:table-header-group !important}.rtmedia-container tbody.show-for-small,.rtmedia-activity-container tbody.show-for-small,#buddypress div.rtmedia-activity-container tbody.show-for-small,.rtmedia-container tbody.show-for-medium-down,.rtmedia-activity-container tbody.show-for-medium-down,#buddypress div.rtmedia-activity-container tbody.show-for-medium-down,.rtmedia-container tbody.show-for-large-down,.rtmedia-activity-container tbody.show-for-large-down,#buddypress div.rtmedia-activity-container tbody.show-for-large-down,.rtmedia-container tbody.hide-for-medium,.rtmedia-activity-container tbody.hide-for-medium,#buddypress div.rtmedia-activity-container tbody.hide-for-medium,.rtmedia-container tbody.hide-for-medium-up,.rtmedia-activity-container tbody.hide-for-medium-up,#buddypress div.rtmedia-activity-container tbody.hide-for-medium-up,.rtmedia-container tbody.hide-for-large,.rtmedia-activity-container tbody.hide-for-large,#buddypress div.rtmedia-activity-container tbody.hide-for-large,.rtmedia-container tbody.hide-for-large-up,.rtmedia-activity-container tbody.hide-for-large-up,#buddypress div.rtmedia-activity-container tbody.hide-for-large-up,.rtmedia-container tbody.hide-for-xlarge,.rtmedia-activity-container tbody.hide-for-xlarge,#buddypress div.rtmedia-activity-container tbody.hide-for-xlarge{display:table-row-group !important}.rtmedia-container tr.show-for-small,.rtmedia-activity-container tr.show-for-small,#buddypress div.rtmedia-activity-container tr.show-for-small,.rtmedia-container tr.show-for-medium-down,.rtmedia-activity-container tr.show-for-medium-down,#buddypress div.rtmedia-activity-container tr.show-for-medium-down,.rtmedia-container tr.show-for-large-down,.rtmedia-activity-container tr.show-for-large-down,#buddypress div.rtmedia-activity-container tr.show-for-large-down,.rtmedia-container tr.hide-for-medium,.rtmedia-activity-container tr.hide-for-medium,#buddypress div.rtmedia-activity-container tr.hide-for-medium,.rtmedia-container tr.hide-for-medium-up,.rtmedia-activity-container tr.hide-for-medium-up,#buddypress div.rtmedia-activity-container tr.hide-for-medium-up,.rtmedia-container tr.hide-for-large,.rtmedia-activity-container tr.hide-for-large,#buddypress div.rtmedia-activity-container tr.hide-for-large,.rtmedia-container tr.hide-for-large-up,.rtmedia-activity-container tr.hide-for-large-up,#buddypress div.rtmedia-activity-container tr.hide-for-large-up,.rtmedia-container tr.hide-for-xlarge,.rtmedia-activity-container tr.hide-for-xlarge,#buddypress div.rtmedia-activity-container tr.hide-for-xlarge{display:table-row !important}.rtmedia-container td.show-for-small,.rtmedia-activity-container td.show-for-small,#buddypress div.rtmedia-activity-container td.show-for-small,.rtmedia-container td.show-for-medium-down,.rtmedia-activity-container td.show-for-medium-down,#buddypress div.rtmedia-activity-container td.show-for-medium-down,.rtmedia-container td.show-for-large-down,.rtmedia-activity-container td.show-for-large-down,#buddypress div.rtmedia-activity-container td.show-for-large-down,.rtmedia-container td.hide-for-medium,.rtmedia-activity-container td.hide-for-medium,#buddypress div.rtmedia-activity-container td.hide-for-medium,.rtmedia-container td.hide-for-medium-up,.rtmedia-activity-container td.hide-for-medium-up,#buddypress div.rtmedia-activity-container td.hide-for-medium-up,.rtmedia-container td.hide-for-large,.rtmedia-activity-container td.hide-for-large,#buddypress div.rtmedia-activity-container td.hide-for-large,.rtmedia-container td.hide-for-large-up,.rtmedia-activity-container td.hide-for-large-up,#buddypress div.rtmedia-activity-container td.hide-for-large-up,.rtmedia-container td.hide-for-xlarge,.rtmedia-activity-container td.hide-for-xlarge,#buddypress div.rtmedia-activity-container td.hide-for-xlarge,.rtmedia-container th.show-for-small,.rtmedia-activity-container th.show-for-small,#buddypress div.rtmedia-activity-container th.show-for-small,.rtmedia-container th.show-for-medium-down,.rtmedia-activity-container th.show-for-medium-down,#buddypress div.rtmedia-activity-container th.show-for-medium-down,.rtmedia-container th.show-for-large-down,.rtmedia-activity-container th.show-for-large-down,#buddypress div.rtmedia-activity-container th.show-for-large-down,.rtmedia-container th.hide-for-medium,.rtmedia-activity-container th.hide-for-medium,#buddypress div.rtmedia-activity-container th.hide-for-medium,.rtmedia-container th.hide-for-medium-up,.rtmedia-activity-container th.hide-for-medium-up,#buddypress div.rtmedia-activity-container th.hide-for-medium-up,.rtmedia-container th.hide-for-large,.rtmedia-activity-container th.hide-for-large,#buddypress div.rtmedia-activity-container th.hide-for-large,.rtmedia-container th.hide-for-large-up,.rtmedia-activity-container th.hide-for-large-up,#buddypress div.rtmedia-activity-container th.hide-for-large-up,.rtmedia-container th.hide-for-xlarge,.rtmedia-activity-container th.hide-for-xlarge,#buddypress div.rtmedia-activity-container th.hide-for-xlarge{display:table-cell !important}@media only screen and (min-width: 768px){.rtmedia-container .show-for-medium,.rtmedia-activity-container .show-for-medium,#buddypress div.rtmedia-activity-container .show-for-medium,.rtmedia-container .show-for-medium-up,.rtmedia-activity-container .show-for-medium-up,#buddypress div.rtmedia-activity-container .show-for-medium-up{display:inherit !important}.rtmedia-container .show-for-small,.rtmedia-activity-container .show-for-small,#buddypress div.rtmedia-activity-container .show-for-small{display:none !important}.rtmedia-container .hide-for-small,.rtmedia-activity-container .hide-for-small,#buddypress div.rtmedia-activity-container .hide-for-small{display:inherit !important}.rtmedia-container .hide-for-medium,.rtmedia-activity-container .hide-for-medium,#buddypress div.rtmedia-activity-container .hide-for-medium,.rtmedia-container .hide-for-medium-up,.rtmedia-activity-container .hide-for-medium-up,#buddypress div.rtmedia-activity-container .hide-for-medium-up{display:none !important}.rtmedia-container table.show-for-medium,.rtmedia-activity-container table.show-for-medium,#buddypress div.rtmedia-activity-container table.show-for-medium,.rtmedia-container table.show-for-medium-up,.rtmedia-activity-container table.show-for-medium-up,#buddypress div.rtmedia-activity-container table.show-for-medium-up,.rtmedia-container table.hide-for-small,.rtmedia-activity-container table.hide-for-small,#buddypress div.rtmedia-activity-container table.hide-for-small{display:table}.rtmedia-container thead.show-for-medium,.rtmedia-activity-container thead.show-for-medium,#buddypress div.rtmedia-activity-container thead.show-for-medium,.rtmedia-container thead.show-for-medium-up,.rtmedia-activity-container thead.show-for-medium-up,#buddypress div.rtmedia-activity-container thead.show-for-medium-up,.rtmedia-container thead.hide-for-small,.rtmedia-activity-container thead.hide-for-small,#buddypress div.rtmedia-activity-container thead.hide-for-small{display:table-header-group !important}.rtmedia-container tbody.show-for-medium,.rtmedia-activity-container tbody.show-for-medium,#buddypress div.rtmedia-activity-container tbody.show-for-medium,.rtmedia-container tbody.show-for-medium-up,.rtmedia-activity-container tbody.show-for-medium-up,#buddypress div.rtmedia-activity-container tbody.show-for-medium-up,.rtmedia-container tbody.hide-for-small,.rtmedia-activity-container tbody.hide-for-small,#buddypress div.rtmedia-activity-container tbody.hide-for-small{display:table-row-group !important}.rtmedia-container tr.show-for-medium,.rtmedia-activity-container tr.show-for-medium,#buddypress div.rtmedia-activity-container tr.show-for-medium,.rtmedia-container tr.show-for-medium-up,.rtmedia-activity-container tr.show-for-medium-up,#buddypress div.rtmedia-activity-container tr.show-for-medium-up,.rtmedia-container tr.hide-for-small,.rtmedia-activity-container tr.hide-for-small,#buddypress div.rtmedia-activity-container tr.hide-for-small{display:table-row !important}.rtmedia-container td.show-for-medium,.rtmedia-activity-container td.show-for-medium,#buddypress div.rtmedia-activity-container td.show-for-medium,.rtmedia-container td.show-for-medium-up,.rtmedia-activity-container td.show-for-medium-up,#buddypress div.rtmedia-activity-container td.show-for-medium-up,.rtmedia-container td.hide-for-small,.rtmedia-activity-container td.hide-for-small,#buddypress div.rtmedia-activity-container td.hide-for-small,.rtmedia-container th.show-for-medium,.rtmedia-activity-container th.show-for-medium,#buddypress div.rtmedia-activity-container th.show-for-medium,.rtmedia-container th.show-for-medium-up,.rtmedia-activity-container th.show-for-medium-up,#buddypress div.rtmedia-activity-container th.show-for-medium-up,.rtmedia-container th.hide-for-small,.rtmedia-activity-container th.hide-for-small,#buddypress div.rtmedia-activity-container th.hide-for-small{display:table-cell !important}}@media only screen and (min-width: 1280px){.rtmedia-container .show-for-large,.rtmedia-activity-container .show-for-large,#buddypress div.rtmedia-activity-container .show-for-large,.rtmedia-container .show-for-large-up,.rtmedia-activity-container .show-for-large-up,#buddypress div.rtmedia-activity-container .show-for-large-up{display:inherit !important}.rtmedia-container .show-for-medium,.rtmedia-activity-container .show-for-medium,#buddypress div.rtmedia-activity-container .show-for-medium,.rtmedia-container .show-for-medium-down,.rtmedia-activity-container .show-for-medium-down,#buddypress div.rtmedia-activity-container .show-for-medium-down{display:none !important}.rtmedia-container .hide-for-medium,.rtmedia-activity-container .hide-for-medium,#buddypress div.rtmedia-activity-container .hide-for-medium,.rtmedia-container .hide-for-medium-down,.rtmedia-activity-container .hide-for-medium-down,#buddypress div.rtmedia-activity-container .hide-for-medium-down{display:inherit !important}.rtmedia-container .hide-for-large,.rtmedia-activity-container .hide-for-large,#buddypress div.rtmedia-activity-container .hide-for-large,.rtmedia-container .hide-for-large-up,.rtmedia-activity-container .hide-for-large-up,#buddypress div.rtmedia-activity-container .hide-for-large-up{display:none !important}.rtmedia-container table.show-for-large,.rtmedia-activity-container table.show-for-large,#buddypress div.rtmedia-activity-container table.show-for-large,.rtmedia-container table.show-for-large-up,.rtmedia-activity-container table.show-for-large-up,#buddypress div.rtmedia-activity-container table.show-for-large-up,.rtmedia-container table.hide-for-medium,.rtmedia-activity-container table.hide-for-medium,#buddypress div.rtmedia-activity-container table.hide-for-medium,.rtmedia-container table.hide-for-medium-down,.rtmedia-activity-container table.hide-for-medium-down,#buddypress div.rtmedia-activity-container table.hide-for-medium-down{display:table}.rtmedia-container thead.show-for-large,.rtmedia-activity-container thead.show-for-large,#buddypress div.rtmedia-activity-container thead.show-for-large,.rtmedia-container thead.show-for-large-up,.rtmedia-activity-container thead.show-for-large-up,#buddypress div.rtmedia-activity-container thead.show-for-large-up,.rtmedia-container thead.hide-for-medium,.rtmedia-activity-container thead.hide-for-medium,#buddypress div.rtmedia-activity-container thead.hide-for-medium,.rtmedia-container thead.hide-for-medium-down,.rtmedia-activity-container thead.hide-for-medium-down,#buddypress div.rtmedia-activity-container thead.hide-for-medium-down{display:table-header-group !important}.rtmedia-container tbody.show-for-large,.rtmedia-activity-container tbody.show-for-large,#buddypress div.rtmedia-activity-container tbody.show-for-large,.rtmedia-container tbody.show-for-large-up,.rtmedia-activity-container tbody.show-for-large-up,#buddypress div.rtmedia-activity-container tbody.show-for-large-up,.rtmedia-container tbody.hide-for-medium,.rtmedia-activity-container tbody.hide-for-medium,#buddypress div.rtmedia-activity-container tbody.hide-for-medium,.rtmedia-container tbody.hide-for-medium-down,.rtmedia-activity-container tbody.hide-for-medium-down,#buddypress div.rtmedia-activity-container tbody.hide-for-medium-down{display:table-row-group !important}.rtmedia-container tr.show-for-large,.rtmedia-activity-container tr.show-for-large,#buddypress div.rtmedia-activity-container tr.show-for-large,.rtmedia-container tr.show-for-large-up,.rtmedia-activity-container tr.show-for-large-up,#buddypress div.rtmedia-activity-container tr.show-for-large-up,.rtmedia-container tr.hide-for-medium,.rtmedia-activity-container tr.hide-for-medium,#buddypress div.rtmedia-activity-container tr.hide-for-medium,.rtmedia-container tr.hide-for-medium-down,.rtmedia-activity-container tr.hide-for-medium-down,#buddypress div.rtmedia-activity-container tr.hide-for-medium-down{display:table-row !important}.rtmedia-container td.show-for-large,.rtmedia-activity-container td.show-for-large,#buddypress div.rtmedia-activity-container td.show-for-large,.rtmedia-container td.show-for-large-up,.rtmedia-activity-container td.show-for-large-up,#buddypress div.rtmedia-activity-container td.show-for-large-up,.rtmedia-container td.hide-for-medium,.rtmedia-activity-container td.hide-for-medium,#buddypress div.rtmedia-activity-container td.hide-for-medium,.rtmedia-container td.hide-for-medium-down,.rtmedia-activity-container td.hide-for-medium-down,#buddypress div.rtmedia-activity-container td.hide-for-medium-down,.rtmedia-container th.show-for-large,.rtmedia-activity-container th.show-for-large,#buddypress div.rtmedia-activity-container th.show-for-large,.rtmedia-container th.show-for-large-up,.rtmedia-activity-container th.show-for-large-up,#buddypress div.rtmedia-activity-container th.show-for-large-up,.rtmedia-container th.hide-for-medium,.rtmedia-activity-container th.hide-for-medium,#buddypress div.rtmedia-activity-container th.hide-for-medium,.rtmedia-container th.hide-for-medium-down,.rtmedia-activity-container th.hide-for-medium-down,#buddypress div.rtmedia-activity-container th.hide-for-medium-down{display:table-cell !important}}@media only screen and (min-width: 1440px){.rtmedia-container .show-for-xlarge,.rtmedia-activity-container .show-for-xlarge,#buddypress div.rtmedia-activity-container .show-for-xlarge{display:inherit !important}.rtmedia-container .show-for-large,.rtmedia-activity-container .show-for-large,#buddypress div.rtmedia-activity-container .show-for-large,.rtmedia-container .show-for-large-down,.rtmedia-activity-container .show-for-large-down,#buddypress div.rtmedia-activity-container .show-for-large-down{display:none !important}.rtmedia-container .hide-for-large,.rtmedia-activity-container .hide-for-large,#buddypress div.rtmedia-activity-container .hide-for-large,.rtmedia-container .hide-for-large-down,.rtmedia-activity-container .hide-for-large-down,#buddypress div.rtmedia-activity-container .hide-for-large-down{display:inherit !important}.rtmedia-container .hide-for-xlarge,.rtmedia-activity-container .hide-for-xlarge,#buddypress div.rtmedia-activity-container .hide-for-xlarge{display:none !important}.rtmedia-container table.show-for-xlarge,.rtmedia-activity-container table.show-for-xlarge,#buddypress div.rtmedia-activity-container table.show-for-xlarge,.rtmedia-container table.hide-for-large,.rtmedia-activity-container table.hide-for-large,#buddypress div.rtmedia-activity-container table.hide-for-large,.rtmedia-container table.hide-for-large-down,.rtmedia-activity-container table.hide-for-large-down,#buddypress div.rtmedia-activity-container table.hide-for-large-down{display:table}.rtmedia-container thead.show-for-xlarge,.rtmedia-activity-container thead.show-for-xlarge,#buddypress div.rtmedia-activity-container thead.show-for-xlarge,.rtmedia-container thead.hide-for-large,.rtmedia-activity-container thead.hide-for-large,#buddypress div.rtmedia-activity-container thead.hide-for-large,.rtmedia-container thead.hide-for-large-down,.rtmedia-activity-container thead.hide-for-large-down,#buddypress div.rtmedia-activity-container thead.hide-for-large-down{display:table-header-group !important}.rtmedia-container tbody.show-for-xlarge,.rtmedia-activity-container tbody.show-for-xlarge,#buddypress div.rtmedia-activity-container tbody.show-for-xlarge,.rtmedia-container tbody.hide-for-large,.rtmedia-activity-container tbody.hide-for-large,#buddypress div.rtmedia-activity-container tbody.hide-for-large,.rtmedia-container tbody.hide-for-large-down,.rtmedia-activity-container tbody.hide-for-large-down,#buddypress div.rtmedia-activity-container tbody.hide-for-large-down{display:table-row-group !important}.rtmedia-container tr.show-for-xlarge,.rtmedia-activity-container tr.show-for-xlarge,#buddypress div.rtmedia-activity-container tr.show-for-xlarge,.rtmedia-container tr.hide-for-large,.rtmedia-activity-container tr.hide-for-large,#buddypress div.rtmedia-activity-container tr.hide-for-large,.rtmedia-container tr.hide-for-large-down,.rtmedia-activity-container tr.hide-for-large-down,#buddypress div.rtmedia-activity-container tr.hide-for-large-down{display:table-row !important}.rtmedia-container td.show-for-xlarge,.rtmedia-activity-container td.show-for-xlarge,#buddypress div.rtmedia-activity-container td.show-for-xlarge,.rtmedia-container td.hide-for-large,.rtmedia-activity-container td.hide-for-large,#buddypress div.rtmedia-activity-container td.hide-for-large,.rtmedia-container td.hide-for-large-down,.rtmedia-activity-container td.hide-for-large-down,#buddypress div.rtmedia-activity-container td.hide-for-large-down,.rtmedia-container th.show-for-xlarge,.rtmedia-activity-container th.show-for-xlarge,#buddypress div.rtmedia-activity-container th.show-for-xlarge,.rtmedia-container th.hide-for-large,.rtmedia-activity-container th.hide-for-large,#buddypress div.rtmedia-activity-container th.hide-for-large,.rtmedia-container th.hide-for-large-down,.rtmedia-activity-container th.hide-for-large-down,#buddypress div.rtmedia-activity-container th.hide-for-large-down{display:table-cell !important}}.rtmedia-container .show-for-landscape,.rtmedia-activity-container .show-for-landscape,#buddypress div.rtmedia-activity-container .show-for-landscape,.rtmedia-container .hide-for-portrait,.rtmedia-activity-container .hide-for-portrait,#buddypress div.rtmedia-activity-container .hide-for-portrait{display:inherit !important}.rtmedia-container .hide-for-landscape,.rtmedia-activity-container .hide-for-landscape,#buddypress div.rtmedia-activity-container .hide-for-landscape,.rtmedia-container .show-for-portrait,.rtmedia-activity-container .show-for-portrait,#buddypress div.rtmedia-activity-container .show-for-portrait{display:none !important}.rtmedia-container table.hide-for-landscape,.rtmedia-activity-container table.hide-for-landscape,#buddypress div.rtmedia-activity-container table.hide-for-landscape,.rtmedia-container table.show-for-portrait,.rtmedia-activity-container table.show-for-portrait,#buddypress div.rtmedia-activity-container table.show-for-portrait{display:table}.rtmedia-container thead.hide-for-landscape,.rtmedia-activity-container thead.hide-for-landscape,#buddypress div.rtmedia-activity-container thead.hide-for-landscape,.rtmedia-container thead.show-for-portrait,.rtmedia-activity-container thead.show-for-portrait,#buddypress div.rtmedia-activity-container thead.show-for-portrait{display:table-header-group !important}.rtmedia-container tbody.hide-for-landscape,.rtmedia-activity-container tbody.hide-for-landscape,#buddypress div.rtmedia-activity-container tbody.hide-for-landscape,.rtmedia-container tbody.show-for-portrait,.rtmedia-activity-container tbody.show-for-portrait,#buddypress div.rtmedia-activity-container tbody.show-for-portrait{display:table-row-group !important}.rtmedia-container tr.hide-for-landscape,.rtmedia-activity-container tr.hide-for-landscape,#buddypress div.rtmedia-activity-container tr.hide-for-landscape,.rtmedia-container tr.show-for-portrait,.rtmedia-activity-container tr.show-for-portrait,#buddypress div.rtmedia-activity-container tr.show-for-portrait{display:table-row !important}.rtmedia-container td.hide-for-landscape,.rtmedia-activity-container td.hide-for-landscape,#buddypress div.rtmedia-activity-container td.hide-for-landscape,.rtmedia-container td.show-for-portrait,.rtmedia-activity-container td.show-for-portrait,#buddypress div.rtmedia-activity-container td.show-for-portrait,.rtmedia-container th.hide-for-landscape,.rtmedia-activity-container th.hide-for-landscape,#buddypress div.rtmedia-activity-container th.hide-for-landscape,.rtmedia-container th.show-for-portrait,.rtmedia-activity-container th.show-for-portrait,#buddypress div.rtmedia-activity-container th.show-for-portrait{display:table-cell !important}@media only screen and (orientation: landscape){.rtmedia-container .show-for-landscape,.rtmedia-activity-container .show-for-landscape,#buddypress div.rtmedia-activity-container .show-for-landscape,.rtmedia-container .hide-for-portrait,.rtmedia-activity-container .hide-for-portrait,#buddypress div.rtmedia-activity-container .hide-for-portrait{display:inherit !important}.rtmedia-container .hide-for-landscape,.rtmedia-activity-container .hide-for-landscape,#buddypress div.rtmedia-activity-container .hide-for-landscape,.rtmedia-container .show-for-portrait,.rtmedia-activity-container .show-for-portrait,#buddypress div.rtmedia-activity-container .show-for-portrait{display:none !important}.rtmedia-container table.show-for-landscape,.rtmedia-activity-container table.show-for-landscape,#buddypress div.rtmedia-activity-container table.show-for-landscape,.rtmedia-container table.hide-for-portrait,.rtmedia-activity-container table.hide-for-portrait,#buddypress div.rtmedia-activity-container table.hide-for-portrait{display:table}.rtmedia-container thead.show-for-landscape,.rtmedia-activity-container thead.show-for-landscape,#buddypress div.rtmedia-activity-container thead.show-for-landscape,.rtmedia-container thead.hide-for-portrait,.rtmedia-activity-container thead.hide-for-portrait,#buddypress div.rtmedia-activity-container thead.hide-for-portrait{display:table-header-group !important}.rtmedia-container tbody.show-for-landscape,.rtmedia-activity-container tbody.show-for-landscape,#buddypress div.rtmedia-activity-container tbody.show-for-landscape,.rtmedia-container tbody.hide-for-portrait,.rtmedia-activity-container tbody.hide-for-portrait,#buddypress div.rtmedia-activity-container tbody.hide-for-portrait{display:table-row-group !important}.rtmedia-container tr.show-for-landscape,.rtmedia-activity-container tr.show-for-landscape,#buddypress div.rtmedia-activity-container tr.show-for-landscape,.rtmedia-container tr.hide-for-portrait,.rtmedia-activity-container tr.hide-for-portrait,#buddypress div.rtmedia-activity-container tr.hide-for-portrait{display:table-row !important}.rtmedia-container td.show-for-landscape,.rtmedia-activity-container td.show-for-landscape,#buddypress div.rtmedia-activity-container td.show-for-landscape,.rtmedia-container td.hide-for-portrait,.rtmedia-activity-container td.hide-for-portrait,#buddypress div.rtmedia-activity-container td.hide-for-portrait,.rtmedia-container th.show-for-landscape,.rtmedia-activity-container th.show-for-landscape,#buddypress div.rtmedia-activity-container th.show-for-landscape,.rtmedia-container th.hide-for-portrait,.rtmedia-activity-container th.hide-for-portrait,#buddypress div.rtmedia-activity-container th.hide-for-portrait{display:table-cell !important}}@media only screen and (orientation: portrait){.rtmedia-container .show-for-portrait,.rtmedia-activity-container .show-for-portrait,#buddypress div.rtmedia-activity-container .show-for-portrait,.rtmedia-container .hide-for-landscape,.rtmedia-activity-container .hide-for-landscape,#buddypress div.rtmedia-activity-container .hide-for-landscape{display:inherit !important}.rtmedia-container .hide-for-portrait,.rtmedia-activity-container .hide-for-portrait,#buddypress div.rtmedia-activity-container .hide-for-portrait,.rtmedia-container .show-for-landscape,.rtmedia-activity-container .show-for-landscape,#buddypress div.rtmedia-activity-container .show-for-landscape{display:none !important}.rtmedia-container table.show-for-portrait,.rtmedia-activity-container table.show-for-portrait,#buddypress div.rtmedia-activity-container table.show-for-portrait,.rtmedia-container table.hide-for-landscape,.rtmedia-activity-container table.hide-for-landscape,#buddypress div.rtmedia-activity-container table.hide-for-landscape{display:table}.rtmedia-container thead.show-for-portrait,.rtmedia-activity-container thead.show-for-portrait,#buddypress div.rtmedia-activity-container thead.show-for-portrait,.rtmedia-container thead.hide-for-landscape,.rtmedia-activity-container thead.hide-for-landscape,#buddypress div.rtmedia-activity-container thead.hide-for-landscape{display:table-header-group !important}.rtmedia-container tbody.show-for-portrait,.rtmedia-activity-container tbody.show-for-portrait,#buddypress div.rtmedia-activity-container tbody.show-for-portrait,.rtmedia-container tbody.hide-for-landscape,.rtmedia-activity-container tbody.hide-for-landscape,#buddypress div.rtmedia-activity-container tbody.hide-for-landscape{display:table-row-group !important}.rtmedia-container tr.show-for-portrait,.rtmedia-activity-container tr.show-for-portrait,#buddypress div.rtmedia-activity-container tr.show-for-portrait,.rtmedia-container tr.hide-for-landscape,.rtmedia-activity-container tr.hide-for-landscape,#buddypress div.rtmedia-activity-container tr.hide-for-landscape{display:table-row !important}.rtmedia-container td.show-for-portrait,.rtmedia-activity-container td.show-for-portrait,#buddypress div.rtmedia-activity-container td.show-for-portrait,.rtmedia-container td.hide-for-landscape,.rtmedia-activity-container td.hide-for-landscape,#buddypress div.rtmedia-activity-container td.hide-for-landscape,.rtmedia-container th.show-for-portrait,.rtmedia-activity-container th.show-for-portrait,#buddypress div.rtmedia-activity-container th.show-for-portrait,.rtmedia-container th.hide-for-landscape,.rtmedia-activity-container th.hide-for-landscape,#buddypress div.rtmedia-activity-container th.hide-for-landscape{display:table-cell !important}}.rtmedia-container .show-for-touch,.rtmedia-activity-container .show-for-touch,#buddypress div.rtmedia-activity-container .show-for-touch{display:none !important}.rtmedia-container .hide-for-touch,.rtmedia-activity-container .hide-for-touch,#buddypress div.rtmedia-activity-container .hide-for-touch{display:inherit !important}.rtmedia-container .touch .show-for-touch,.rtmedia-activity-container .touch .show-for-touch,#buddypress div.rtmedia-activity-container .touch .show-for-touch{display:inherit !important}.rtmedia-container .touch .hide-for-touch,.rtmedia-activity-container .touch .hide-for-touch,#buddypress div.rtmedia-activity-container .touch .hide-for-touch{display:none !important}.rtmedia-container table.hide-for-touch,.rtmedia-activity-container table.hide-for-touch,#buddypress div.rtmedia-activity-container table.hide-for-touch{display:table}.rtmedia-container .touch table.show-for-touch,.rtmedia-activity-container .touch table.show-for-touch,#buddypress div.rtmedia-activity-container .touch table.show-for-touch{display:table}.rtmedia-container thead.hide-for-touch,.rtmedia-activity-container thead.hide-for-touch,#buddypress div.rtmedia-activity-container thead.hide-for-touch{display:table-header-group !important}.rtmedia-container .touch thead.show-for-touch,.rtmedia-activity-container .touch thead.show-for-touch,#buddypress div.rtmedia-activity-container .touch thead.show-for-touch{display:table-header-group !important}.rtmedia-container tbody.hide-for-touch,.rtmedia-activity-container tbody.hide-for-touch,#buddypress div.rtmedia-activity-container tbody.hide-for-touch{display:table-row-group !important}.rtmedia-container .touch tbody.show-for-touch,.rtmedia-activity-container .touch tbody.show-for-touch,#buddypress div.rtmedia-activity-container .touch tbody.show-for-touch{display:table-row-group !important}.rtmedia-container tr.hide-for-touch,.rtmedia-activity-container tr.hide-for-touch,#buddypress div.rtmedia-activity-container tr.hide-for-touch{display:table-row !important}.rtmedia-container .touch tr.show-for-touch,.rtmedia-activity-container .touch tr.show-for-touch,#buddypress div.rtmedia-activity-container .touch tr.show-for-touch{display:table-row !important}.rtmedia-container td.hide-for-touch,.rtmedia-activity-container td.hide-for-touch,#buddypress div.rtmedia-activity-container td.hide-for-touch{display:table-cell !important}.rtmedia-container .touch td.show-for-touch,.rtmedia-activity-container .touch td.show-for-touch,#buddypress div.rtmedia-activity-container .touch td.show-for-touch{display:table-cell !important}.rtmedia-container th.hide-for-touch,.rtmedia-activity-container th.hide-for-touch,#buddypress div.rtmedia-activity-container th.hide-for-touch{display:table-cell !important}.rtmedia-container .touch th.show-for-touch,.rtmedia-activity-container .touch th.show-for-touch,#buddypress div.rtmedia-activity-container .touch th.show-for-touch{display:table-cell !important}.rtmedia-container .flex-video,.rtmedia-activity-container .flex-video,#buddypress div.rtmedia-activity-container .flex-video{position:relative;padding-top:1.5625em;padding-bottom:67.5%;height:0;margin-bottom:1em;overflow:hidden}.rtmedia-container .flex-video.widescreen,.rtmedia-activity-container .flex-video.widescreen,#buddypress div.rtmedia-activity-container .flex-video.widescreen{padding-bottom:57.25%}.rtmedia-container .flex-video.vimeo,.rtmedia-activity-container .flex-video.vimeo,#buddypress div.rtmedia-activity-container .flex-video.vimeo{padding-top:0}.rtmedia-container .flex-video iframe,.rtmedia-activity-container .flex-video iframe,#buddypress div.rtmedia-activity-container .flex-video iframe,.rtmedia-container .flex-video object,.rtmedia-activity-container .flex-video object,#buddypress div.rtmedia-activity-container .flex-video object,.rtmedia-container .flex-video embed,.rtmedia-activity-container .flex-video embed,#buddypress div.rtmedia-activity-container .flex-video embed,.rtmedia-container .flex-video video,.rtmedia-activity-container .flex-video video,#buddypress div.rtmedia-activity-container .flex-video video{position:absolute;top:0;left:0;width:100%;height:100%}.rtmedia-container .row,.rtmedia-activity-container .row,#buddypress div.rtmedia-activity-container .row{max-width:95%}.rtmedia-container .rtmedia-item-title,.rtmedia-activity-container .rtmedia-item-title,#buddypress div.rtmedia-activity-container .rtmedia-item-title{text-align:center}.rtmedia-container .rtmedia-item-title h4,.rtmedia-activity-container .rtmedia-item-title h4,#buddypress div.rtmedia-activity-container .rtmedia-item-title h4{text-overflow:ellipsis;white-space:nowrap;width:100%;overflow:hidden;font-size:1.1em;text-align:center}.rtmedia-container .rtmedia-success,.rtmedia-activity-container .rtmedia-success,#buddypress div.rtmedia-activity-container .rtmedia-success{display:block;padding:10px;border:1px solid #008000;background-color:#90EE90;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.rtmedia-container h2,.rtmedia-activity-container h2,#buddypress div.rtmedia-activity-container h2{font-size:1.4em;font-weight:bold;line-height:2.4em}.rtmedia-container .drag-drop,.rtmedia-activity-container .drag-drop,#buddypress div.rtmedia-activity-container .drag-drop{border:4px dashed #DDD;text-align:center;background:#fafafa;overflow:hidden;padding:15px 0}.rtmedia-container .drag-drop.dragover,.rtmedia-activity-container .drag-drop.dragover,#buddypress div.rtmedia-activity-container .drag-drop.dragover{border-color:#83b4d8}.rtmedia-container .rtmedia-action-update,.rtmedia-activity-container .rtmedia-action-update,#buddypress div.rtmedia-activity-container .rtmedia-action-update{float:left;margin-top:12px;margin-right:10px}.rtmedia-container .rtmedia-list,.rtmedia-activity-container .rtmedia-list,#buddypress div.rtmedia-activity-container .rtmedia-list{list-style:none}.rtmedia-container .rtmedia-list .rtmedia-list-item,.rtmedia-activity-container .rtmedia-list .rtmedia-list-item,#buddypress div.rtmedia-activity-container .rtmedia-list .rtmedia-list-item{word-wrap:break-word;padding:20px;float:left}.rtmedia-container .rtmedia-list .rtmedia-list-item a,.rtmedia-activity-container .rtmedia-list .rtmedia-list-item a,#buddypress div.rtmedia-activity-container .rtmedia-list .rtmedia-list-item a{text-decoration:none}.rtmedia-container .rtmedia-list .rtmedia-list-item a h4,.rtmedia-activity-container .rtmedia-list .rtmedia-list-item a h4,#buddypress div.rtmedia-activity-container .rtmedia-list .rtmedia-list-item a h4{line-height:1.4em;font-size:1.2em;padding-top:10px}.rtmedia-container .rtmedia-media img,.rtmedia-activity-container .rtmedia-media img,#buddypress div.rtmedia-activity-container .rtmedia-media img{max-width:100%}.rtmedia-container .rtmedia-item-thumbnail,.rtmedia-activity-container .rtmedia-item-thumbnail,#buddypress div.rtmedia-activity-container .rtmedia-item-thumbnail{text-align:center}.rtmedia-container .rtmedia-item-thumbnail img,.rtmedia-activity-container .rtmedia-item-thumbnail img,#buddypress div.rtmedia-activity-container .rtmedia-item-thumbnail img{vertical-align:middle}.rtmedia-container .rtmedia_next_prev,.rtmedia-activity-container .rtmedia_next_prev,#buddypress div.rtmedia-activity-container .rtmedia_next_prev{clear:both}.rtmedia-container .rtmedia_next_prev a,.rtmedia-activity-container .rtmedia_next_prev a,#buddypress div.rtmedia-activity-container .rtmedia_next_prev a{display:block;clear:both;background-color:#E9E9E9;padding:10px;text-align:center;text-decoration:none;color:#000;margin:15px}.rtmedia-container .rtmedia-item-comments-container,.rtmedia-activity-container .rtmedia-item-comments-container,#buddypress div.rtmedia-activity-container .rtmedia-item-comments-container{margin:3% 3%}.rtmedia-container .rtmedia-comment,.rtmedia-activity-container .rtmedia-comment,#buddypress div.rtmedia-activity-container .rtmedia-comment{list-style:none;background:#f6f6f6;border:1px solid #ddd;-moz-border-radius:3px;border-radius:3px;margin:5px 0;padding:1px 5px 25px;width:391px;max-width:100%}.rtmedia-container .rtmedia-comment .rtmedia-comment-author,.rtmedia-activity-container .rtmedia-comment .rtmedia-comment-author,#buddypress div.rtmedia-activity-container .rtmedia-comment .rtmedia-comment-author{display:block}.rtmedia-container .rtmedia-comment .rtmedia-comment-content,.rtmedia-activity-container .rtmedia-comment .rtmedia-comment-content,#buddypress div.rtmedia-activity-container .rtmedia-comment .rtmedia-comment-content{display:block}.rtmedia-container .rtmedia-comment .rtmedia-comment-date,.rtmedia-activity-container .rtmedia-comment .rtmedia-comment-date,#buddypress div.rtmedia-activity-container .rtmedia-comment .rtmedia-comment-date{display:block;float:right}.rtmedia-container .rtmedia-bp-header,.rtmedia-activity-container .rtmedia-bp-header,#buddypress div.rtmedia-activity-container .rtmedia-bp-header{width:460px;margin:auto}.rtmedia-container #div-attache-rtmedia,.rtmedia-activity-container #div-attache-rtmedia,#buddypress div.rtmedia-activity-container #div-attache-rtmedia{display:none}.rtmedia-container #rtMedia-update-queue-list p span,.rtmedia-activity-container #rtMedia-update-queue-list p span{margin-right:20px}.rtmedia-container .rtmedia-move-container,.rtmedia-activity-container .rtmedia-move-container,#buddypress div.rtmedia-activity-container .rtmedia-move-container{display:none}.rtmedia-container #rtmedia-add-media-button-post-update,.rtmedia-activity-container #rtmedia-add-media-button-post-update,#buddypress div.rtmedia-activity-container #rtmedia-add-media-button-post-update{float:left;margin-top:10px;margin-right:20px}.rtmedia-container #whats-new-post-in-box,.rtmedia-activity-container #whats-new-post-in-box,#buddypress div.rtmedia-activity-container #whats-new-post-in-box{float:left}.rtmedia-container .rtmedia-activity-text,.rtmedia-activity-container .rtmedia-activity-text,#buddypress div.rtmedia-activity-container .rtmedia-activity-text{display:block;padding-bottom:10px}.rtmedia-container .rtmedia-merge-container,.rtmedia-activity-container .rtmedia-merge-container,#buddypress div.rtmedia-activity-container .rtmedia-merge-container{display:none}.rtmedia-container .rtmedia-create-new-album-container,.rtmedia-activity-container .rtmedia-create-new-album-container,#buddypress div.rtmedia-activity-container .rtmedia-create-new-album-container{display:none}.rtmedia-container select,.rtmedia-activity-container select,#buddypress div.rtmedia-activity-container select{width:auto}.rtmedia-container.rtmedia-single-container .row,.rtmedia-single-container.rtmedia-activity-container .row,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row{background-color:#FFF}.rtmedia-container.rtmedia-single-container .row #rtmedia-single-media-container,.rtmedia-single-container.rtmedia-activity-container .row #rtmedia-single-media-container{padding-top:10px;padding-bottom:10px}.rtmedia-container.rtmedia-single-container .row #rtmedia-single-media-container .rtmedia-media .mejs-overlay-button,.rtmedia-single-container.rtmedia-activity-container .row #rtmedia-single-media-container .rtmedia-media .mejs-overlay-button{margin:-50px 0 0 -50px}.rtmedia-container.rtmedia-single-container .row #rtmedia-single-media-container .rtmedia-media .mejs-controls .mejs-button button,.rtmedia-single-container.rtmedia-activity-container .row #rtmedia-single-media-container .rtmedia-media .mejs-controls .mejs-button button{cursor:pointer;display:block;font-size:0;line-height:0;text-decoration:none;margin:7px 5px;padding:0;position:absolute;height:16px;width:16px;border:0;background:rgba(0,0,0,0) url("../../../lib/media-element/controls.png") no-repeat}.rtmedia-container.rtmedia-single-container .row #rtmedia-single-media-container .rtmedia-media .mejs-controls .mejs-mute button,.rtmedia-single-container.rtmedia-activity-container .row #rtmedia-single-media-container .rtmedia-media .mejs-controls .mejs-mute button{background-position:-16px -16px}.rtmedia-container.rtmedia-single-container .row #rtmedia-single-media-container .rtmedia-media .mejs-controls .mejs-fullscreen-button button,.rtmedia-single-container.rtmedia-activity-container .row #rtmedia-single-media-container .rtmedia-media .mejs-controls .mejs-fullscreen-button button{background-position:-32px 0}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta{padding:10px}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta button,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta button,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta button{color:#5E5E5E;background-color:#EBEBEB;background-repeat:repeat-x;background-image:-moz-linear-gradient(top, #f9f9f9, #ebebeb);background-image:-ms-linear-gradient(top, #f9f9f9, #ebebeb);background-image:-webkit-linear-gradient(top, #f9f9f9, #ebebeb);background-image:-o-linear-gradient(top, #f9f9f9, #ebebeb);background-image:linear-gradient(to bottom, #f9f9f9,#ebebeb)}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta>a,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta>a,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta>a{float:left;margin:10px}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta .rtmedia-item-actions>a,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-item-actions>a,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-item-actions>a{display:inline-block;float:left}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta .rtmedia-item-actions>form,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-item-actions>form,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-item-actions>form{float:left;margin-right:5px}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta .rtmedia-item-actions .rtmedia-action-buttons span,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-item-actions .rtmedia-action-buttons span,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-item-actions .rtmedia-action-buttons span{background:#EEE;-webkit-border-radius:50%;-moz-border-radius:50%;border-radius:50%;border:1px solid #CCC;color:#999;display:inline;font-size:70%;margin-left:2px;margin-right:2px;padding:3px 6px;text-align:center;vertical-align:middle}.rtmedia-container.rtmedia-single-container .row .rtmedia-item-comments,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments{background-color:transparent}.rtmedia-container.rtmedia-single-container .row .rtmedia-item-comments div,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments div,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments div{background-color:transparent}.rtmedia-container #wp-description-editor-tools a.wp-switch-editor,.rtmedia-activity-container #wp-description-editor-tools a.wp-switch-editor{margin:5px 5px 0 0;padding:4px 5px 2px;float:right;cursor:pointer;border:1px solid;border-color:#DFDFDF #DFDFDF #CCC;font:13px/18px Arial,Helvetica,sans-serif normal;height:auto}.rtmedia-container #description_toolbargroup .mceToolbar td,.rtmedia-activity-container #description_toolbargroup .mceToolbar td{padding:0px}.rtmedia-container #wp-description-editor-container,.rtmedia-activity-container #wp-description-editor-container,#buddypress div.rtmedia-activity-container #wp-description-editor-container{border-width:1px;border-style:solid;-webkit-border-top-right-radius:3px;-webkit-border-top-left-radius:3px;border-top-right-radius:3px;border-top-left-radius:3px;border-color:#CCC #CCC #DFDFDF}#buddypress div.rtmedia-activity-container ul.rtmedia-list li{float:left;padding:10px}#buddypress div.rtmedia-activity-container ul.rtmedia-list li.media-type-video{float:none}#buddypress div.rtmedia-activity-container ul.rtmedia-list li.media-type-video .rtmedia-item-thumbnail{margin:0 auto}#buddypress div.rtmedia-activity-container ul.rtmedia-list li.media-type-video .rtmedia-item-thumbnail .mejs-overlay-button{margin:-50px 0 0 -50px}#buddypress div.rtmedia-activity-container ul.rtmedia-list li.media-type-video .rtmedia-item-thumbnail .mejs-controls .mejs-button button{cursor:pointer;display:block;font-size:0;line-height:0;text-decoration:none;margin:7px 5px;padding:0;position:absolute;height:16px;width:16px;border:0;background:rgba(0,0,0,0) url("../../../lib/media-element/controls.png") no-repeat}#buddypress div.rtmedia-activity-container ul.rtmedia-list li.media-type-video .rtmedia-item-thumbnail .mejs-controls .mejs-mute button{background-position:-16px -16px}#buddypress div.rtmedia-activity-container ul.rtmedia-list li.media-type-video .rtmedia-item-thumbnail .mejs-controls .mejs-fullscreen-button button{background-position:-32px 0}#rtmedia-action-update{float:left;padding-right:10px}#header{z-index:1 !important}.bp_media_content video{background-color:black}.rtmedia-success{display:block;padding:10px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;background-color:#2ECC71;color:white}.rtmedia-error{color:white;display:block;padding:10px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;background-color:#E74C3C}
|
1 |
+
.rtmedia-container,.rtmedia-activity-container,#buddypress div.rtmedia-activity-container{padding:5px;margin:0;clear:left}.rtmedia-container html,.rtmedia-activity-container html,#buddypress div.rtmedia-activity-container html,.rtmedia-container body,.rtmedia-activity-container body,#buddypress div.rtmedia-activity-container body,.rtmedia-container div,.rtmedia-activity-container div,#buddypress div.rtmedia-activity-container div,.rtmedia-container span,.rtmedia-activity-container span,#buddypress div.rtmedia-activity-container span,.rtmedia-container applet,.rtmedia-activity-container applet,#buddypress div.rtmedia-activity-container applet,.rtmedia-container object,.rtmedia-activity-container object,#buddypress div.rtmedia-activity-container object,.rtmedia-container iframe,.rtmedia-activity-container iframe,#buddypress div.rtmedia-activity-container iframe,.rtmedia-container h1,.rtmedia-activity-container h1,#buddypress div.rtmedia-activity-container h1,.rtmedia-container h2,.rtmedia-activity-container h2,#buddypress div.rtmedia-activity-container h2,.rtmedia-container h3,.rtmedia-activity-container h3,#buddypress div.rtmedia-activity-container h3,.rtmedia-container h4,.rtmedia-activity-container h4,#buddypress div.rtmedia-activity-container h4,.rtmedia-container h5,.rtmedia-activity-container h5,#buddypress div.rtmedia-activity-container h5,.rtmedia-container h6,.rtmedia-activity-container h6,#buddypress div.rtmedia-activity-container h6,.rtmedia-container p,.rtmedia-activity-container p,#buddypress div.rtmedia-activity-container p,.rtmedia-container blockquote,.rtmedia-activity-container blockquote,#buddypress div.rtmedia-activity-container blockquote,.rtmedia-container pre,.rtmedia-activity-container pre,#buddypress div.rtmedia-activity-container pre,.rtmedia-container a,.rtmedia-activity-container a,#buddypress div.rtmedia-activity-container a,.rtmedia-container abbr,.rtmedia-activity-container abbr,#buddypress div.rtmedia-activity-container abbr,.rtmedia-container acronym,.rtmedia-activity-container acronym,#buddypress div.rtmedia-activity-container acronym,.rtmedia-container address,.rtmedia-activity-container address,#buddypress div.rtmedia-activity-container address,.rtmedia-container big,.rtmedia-activity-container big,#buddypress div.rtmedia-activity-container big,.rtmedia-container cite,.rtmedia-activity-container cite,#buddypress div.rtmedia-activity-container cite,.rtmedia-container code,.rtmedia-activity-container code,#buddypress div.rtmedia-activity-container code,.rtmedia-container del,.rtmedia-activity-container del,#buddypress div.rtmedia-activity-container del,.rtmedia-container dfn,.rtmedia-activity-container dfn,#buddypress div.rtmedia-activity-container dfn,.rtmedia-container em,.rtmedia-activity-container em,#buddypress div.rtmedia-activity-container em,.rtmedia-container img,.rtmedia-activity-container img,#buddypress div.rtmedia-activity-container img,.rtmedia-container ins,.rtmedia-activity-container ins,#buddypress div.rtmedia-activity-container ins,.rtmedia-container kbd,.rtmedia-activity-container kbd,#buddypress div.rtmedia-activity-container kbd,.rtmedia-container q,.rtmedia-activity-container q,#buddypress div.rtmedia-activity-container q,.rtmedia-container s,.rtmedia-activity-container s,#buddypress div.rtmedia-activity-container s,.rtmedia-container samp,.rtmedia-activity-container samp,#buddypress div.rtmedia-activity-container samp,.rtmedia-container small,.rtmedia-activity-container small,#buddypress div.rtmedia-activity-container small,.rtmedia-container strike,.rtmedia-activity-container strike,#buddypress div.rtmedia-activity-container strike,.rtmedia-container strong,.rtmedia-activity-container strong,#buddypress div.rtmedia-activity-container strong,.rtmedia-container sub,.rtmedia-activity-container sub,#buddypress div.rtmedia-activity-container sub,.rtmedia-container sup,.rtmedia-activity-container sup,#buddypress div.rtmedia-activity-container sup,.rtmedia-container tt,.rtmedia-activity-container tt,#buddypress div.rtmedia-activity-container tt,.rtmedia-container var,.rtmedia-activity-container var,#buddypress div.rtmedia-activity-container var,.rtmedia-container b,.rtmedia-activity-container b,#buddypress div.rtmedia-activity-container b,.rtmedia-container u,.rtmedia-activity-container u,#buddypress div.rtmedia-activity-container u,.rtmedia-container i,.rtmedia-activity-container i,#buddypress div.rtmedia-activity-container i,.rtmedia-container center,.rtmedia-activity-container center,#buddypress div.rtmedia-activity-container center,.rtmedia-container dl,.rtmedia-activity-container dl,#buddypress div.rtmedia-activity-container dl,.rtmedia-container dt,.rtmedia-activity-container dt,#buddypress div.rtmedia-activity-container dt,.rtmedia-container dd,.rtmedia-activity-container dd,#buddypress div.rtmedia-activity-container dd,.rtmedia-container ol,.rtmedia-activity-container ol,#buddypress div.rtmedia-activity-container ol,.rtmedia-container ul,.rtmedia-activity-container ul,#buddypress div.rtmedia-activity-container ul,.rtmedia-container li,.rtmedia-activity-container li,#buddypress div.rtmedia-activity-container li,.rtmedia-container fieldset,.rtmedia-activity-container fieldset,#buddypress div.rtmedia-activity-container fieldset,.rtmedia-container form,.rtmedia-activity-container form,#buddypress div.rtmedia-activity-container form,.rtmedia-container label,.rtmedia-activity-container label,#buddypress div.rtmedia-activity-container label,.rtmedia-container legend,.rtmedia-activity-container legend,#buddypress div.rtmedia-activity-container legend,.rtmedia-container table,.rtmedia-activity-container table,#buddypress div.rtmedia-activity-container table,.rtmedia-container caption,.rtmedia-activity-container caption,#buddypress div.rtmedia-activity-container caption,.rtmedia-container tbody,.rtmedia-activity-container tbody,#buddypress div.rtmedia-activity-container tbody,.rtmedia-container tfoot,.rtmedia-activity-container tfoot,#buddypress div.rtmedia-activity-container tfoot,.rtmedia-container thead,.rtmedia-activity-container thead,#buddypress div.rtmedia-activity-container thead,.rtmedia-container tr,.rtmedia-activity-container tr,#buddypress div.rtmedia-activity-container tr,.rtmedia-container th,.rtmedia-activity-container th,#buddypress div.rtmedia-activity-container th,.rtmedia-container td,.rtmedia-activity-container td,#buddypress div.rtmedia-activity-container td,.rtmedia-container article,.rtmedia-activity-container article,#buddypress div.rtmedia-activity-container article,.rtmedia-container aside,.rtmedia-activity-container aside,#buddypress div.rtmedia-activity-container aside,.rtmedia-container canvas,.rtmedia-activity-container canvas,#buddypress div.rtmedia-activity-container canvas,.rtmedia-container details,.rtmedia-activity-container details,#buddypress div.rtmedia-activity-container details,.rtmedia-container embed,.rtmedia-activity-container embed,#buddypress div.rtmedia-activity-container embed,.rtmedia-container figure,.rtmedia-activity-container figure,#buddypress div.rtmedia-activity-container figure,.rtmedia-container figcaption,.rtmedia-activity-container figcaption,#buddypress div.rtmedia-activity-container figcaption,.rtmedia-container footer,.rtmedia-activity-container footer,#buddypress div.rtmedia-activity-container footer,.rtmedia-container header,.rtmedia-activity-container header,#buddypress div.rtmedia-activity-container header,.rtmedia-container hgroup,.rtmedia-activity-container hgroup,#buddypress div.rtmedia-activity-container hgroup,.rtmedia-container menu,.rtmedia-activity-container menu,#buddypress div.rtmedia-activity-container menu,.rtmedia-container nav,.rtmedia-activity-container nav,#buddypress div.rtmedia-activity-container nav,.rtmedia-container output,.rtmedia-activity-container output,#buddypress div.rtmedia-activity-container output,.rtmedia-container ruby,.rtmedia-activity-container ruby,#buddypress div.rtmedia-activity-container ruby,.rtmedia-container section,.rtmedia-activity-container section,#buddypress div.rtmedia-activity-container section,.rtmedia-container summary,.rtmedia-activity-container summary,#buddypress div.rtmedia-activity-container summary,.rtmedia-container time,.rtmedia-activity-container time,#buddypress div.rtmedia-activity-container time,.rtmedia-container mark,.rtmedia-activity-container mark,#buddypress div.rtmedia-activity-container mark,.rtmedia-container audio,.rtmedia-activity-container audio,#buddypress div.rtmedia-activity-container audio,.rtmedia-container video,.rtmedia-activity-container video,#buddypress div.rtmedia-activity-container video{margin:0;padding:0;border:0;font:inherit;font-size:100%;vertical-align:baseline}.rtmedia-container html,.rtmedia-activity-container html,#buddypress div.rtmedia-activity-container html{line-height:1}.rtmedia-container ol,.rtmedia-activity-container ol,#buddypress div.rtmedia-activity-container ol,.rtmedia-container ul,.rtmedia-activity-container ul,#buddypress div.rtmedia-activity-container ul{list-style:none}.rtmedia-container table,.rtmedia-activity-container table,#buddypress div.rtmedia-activity-container table{border-collapse:collapse;border-spacing:0}.rtmedia-container caption,.rtmedia-activity-container caption,#buddypress div.rtmedia-activity-container caption,.rtmedia-container th,.rtmedia-activity-container th,#buddypress div.rtmedia-activity-container th,.rtmedia-container td,.rtmedia-activity-container td,#buddypress div.rtmedia-activity-container td{text-align:left;font-weight:normal;vertical-align:middle}.rtmedia-container q,.rtmedia-activity-container q,#buddypress div.rtmedia-activity-container q,.rtmedia-container blockquote,.rtmedia-activity-container blockquote,#buddypress div.rtmedia-activity-container blockquote{quotes:none}.rtmedia-container q:before,.rtmedia-activity-container q:before,#buddypress div.rtmedia-activity-container q:before,.rtmedia-container q:after,.rtmedia-activity-container q:after,#buddypress div.rtmedia-activity-container q:after,.rtmedia-container blockquote:before,.rtmedia-activity-container blockquote:before,#buddypress div.rtmedia-activity-container blockquote:before,.rtmedia-container blockquote:after,.rtmedia-activity-container blockquote:after,#buddypress div.rtmedia-activity-container blockquote:after{content:"";content:none}.rtmedia-container a img,.rtmedia-activity-container a img,#buddypress div.rtmedia-activity-container a img{border:none}.rtmedia-container article,.rtmedia-activity-container article,#buddypress div.rtmedia-activity-container article,.rtmedia-container aside,.rtmedia-activity-container aside,#buddypress div.rtmedia-activity-container aside,.rtmedia-container details,.rtmedia-activity-container details,#buddypress div.rtmedia-activity-container details,.rtmedia-container figcaption,.rtmedia-activity-container figcaption,#buddypress div.rtmedia-activity-container figcaption,.rtmedia-container figure,.rtmedia-activity-container figure,#buddypress div.rtmedia-activity-container figure,.rtmedia-container footer,.rtmedia-activity-container footer,#buddypress div.rtmedia-activity-container footer,.rtmedia-container header,.rtmedia-activity-container header,#buddypress div.rtmedia-activity-container header,.rtmedia-container hgroup,.rtmedia-activity-container hgroup,#buddypress div.rtmedia-activity-container hgroup,.rtmedia-container menu,.rtmedia-activity-container menu,#buddypress div.rtmedia-activity-container menu,.rtmedia-container nav,.rtmedia-activity-container nav,#buddypress div.rtmedia-activity-container nav,.rtmedia-container section,.rtmedia-activity-container section,#buddypress div.rtmedia-activity-container section,.rtmedia-container summary,.rtmedia-activity-container summary,#buddypress div.rtmedia-activity-container summary{display:block}.rtmedia-container *,.rtmedia-activity-container *,#buddypress div.rtmedia-activity-container *,.rtmedia-container *:before,.rtmedia-activity-container *:before,#buddypress div.rtmedia-activity-container *:before,.rtmedia-container *:after,.rtmedia-activity-container *:after,#buddypress div.rtmedia-activity-container *:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.rtmedia-container html,.rtmedia-activity-container html,#buddypress div.rtmedia-activity-container html,.rtmedia-container body,.rtmedia-activity-container body,#buddypress div.rtmedia-activity-container body{font-size:100%}.rtmedia-container body,.rtmedia-activity-container body,#buddypress div.rtmedia-activity-container body{background:#fff;color:#222;padding:0;margin:0;font-family:"Helvetica Neue","Helvetica",Helvetica,Arial,sans-serif;font-weight:normal;font-style:normal;line-height:1;position:relative;cursor:default}.rtmedia-container a:hover,.rtmedia-activity-container a:hover,#buddypress div.rtmedia-activity-container a:hover{cursor:pointer}.rtmedia-container a:focus,.rtmedia-activity-container a:focus,#buddypress div.rtmedia-activity-container a:focus{outline:none}.rtmedia-container img,.rtmedia-activity-container img,#buddypress div.rtmedia-activity-container img,.rtmedia-container object,.rtmedia-activity-container object,#buddypress div.rtmedia-activity-container object,.rtmedia-container embed,.rtmedia-activity-container embed,#buddypress div.rtmedia-activity-container embed{max-width:100%;height:auto}.rtmedia-container object,.rtmedia-activity-container object,#buddypress div.rtmedia-activity-container object,.rtmedia-container embed,.rtmedia-activity-container embed,#buddypress div.rtmedia-activity-container embed{height:100%}.rtmedia-container img,.rtmedia-activity-container img,#buddypress div.rtmedia-activity-container img{-ms-interpolation-mode:bicubic}.rtmedia-container #map_canvas img,.rtmedia-activity-container #map_canvas img,.rtmedia-container #map_canvas embed,.rtmedia-activity-container #map_canvas embed,.rtmedia-container #map_canvas object,.rtmedia-activity-container #map_canvas object,.rtmedia-container .map_canvas img,.rtmedia-activity-container .map_canvas img,#buddypress div.rtmedia-activity-container .map_canvas img,.rtmedia-container .map_canvas embed,.rtmedia-activity-container .map_canvas embed,#buddypress div.rtmedia-activity-container .map_canvas embed,.rtmedia-container .map_canvas object,.rtmedia-activity-container .map_canvas object,#buddypress div.rtmedia-activity-container .map_canvas object{max-width:none !important}.rtmedia-container .left,.rtmedia-activity-container .left,#buddypress div.rtmedia-activity-container .left{float:left !important}.rtmedia-container .right,.rtmedia-activity-container .right,#buddypress div.rtmedia-activity-container .right{float:right !important}.rtmedia-container .text-left,.rtmedia-activity-container .text-left,#buddypress div.rtmedia-activity-container .text-left{text-align:left !important}.rtmedia-container .text-right,.rtmedia-activity-container .text-right,#buddypress div.rtmedia-activity-container .text-right{text-align:right !important}.rtmedia-container .text-center,.rtmedia-activity-container .text-center,#buddypress div.rtmedia-activity-container .text-center{text-align:center !important}.rtmedia-container .text-justify,.rtmedia-activity-container .text-justify,#buddypress div.rtmedia-activity-container .text-justify{text-align:justify !important}.rtmedia-container .hide,.rtmedia-activity-container .hide,#buddypress div.rtmedia-activity-container .hide{display:none}.rtmedia-container .antialiased,.rtmedia-activity-container .antialiased,#buddypress div.rtmedia-activity-container .antialiased{-webkit-font-smoothing:antialiased}.rtmedia-container img,.rtmedia-activity-container img,#buddypress div.rtmedia-activity-container img{display:inline-block;vertical-align:middle}.rtmedia-container textarea,.rtmedia-activity-container textarea,#buddypress div.rtmedia-activity-container textarea{height:auto;min-height:50px}.rtmedia-container select,.rtmedia-activity-container select,#buddypress div.rtmedia-activity-container select{width:100%}.rtmedia-container .row,.rtmedia-activity-container .row,#buddypress div.rtmedia-activity-container .row{width:100%;margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;max-width:62.5em;*zoom:1}.rtmedia-container .row:before,.rtmedia-activity-container .row:before,#buddypress div.rtmedia-activity-container .row:before,.rtmedia-container .row:after,.rtmedia-activity-container .row:after,#buddypress div.rtmedia-activity-container .row:after{content:" ";display:table}.rtmedia-container .row:after,.rtmedia-activity-container .row:after,#buddypress div.rtmedia-activity-container .row:after{clear:both}.rtmedia-container .row.collapse .column,.rtmedia-activity-container .row.collapse .column,#buddypress div.rtmedia-activity-container .row.collapse .column,.rtmedia-container .row.collapse .columns,.rtmedia-activity-container .row.collapse .columns,#buddypress div.rtmedia-activity-container .row.collapse .columns{position:relative;padding-left:0;padding-right:0;float:left}.rtmedia-container .row .row,.rtmedia-activity-container .row .row,#buddypress div.rtmedia-activity-container .row .row{width:auto;margin-left:-0.9375em;margin-right:-0.9375em;margin-top:0;margin-bottom:0;max-width:none;*zoom:1}.rtmedia-container .row .row:before,.rtmedia-activity-container .row .row:before,#buddypress div.rtmedia-activity-container .row .row:before,.rtmedia-container .row .row:after,.rtmedia-activity-container .row .row:after,#buddypress div.rtmedia-activity-container .row .row:after{content:" ";display:table}.rtmedia-container .row .row:after,.rtmedia-activity-container .row .row:after,#buddypress div.rtmedia-activity-container .row .row:after{clear:both}.rtmedia-container .row .row.collapse,.rtmedia-activity-container .row .row.collapse,#buddypress div.rtmedia-activity-container .row .row.collapse{width:auto;margin:0;max-width:none;*zoom:1}.rtmedia-container .row .row.collapse:before,.rtmedia-activity-container .row .row.collapse:before,#buddypress div.rtmedia-activity-container .row .row.collapse:before,.rtmedia-container .row .row.collapse:after,.rtmedia-activity-container .row .row.collapse:after,#buddypress div.rtmedia-activity-container .row .row.collapse:after{content:" ";display:table}.rtmedia-container .row .row.collapse:after,.rtmedia-activity-container .row .row.collapse:after,#buddypress div.rtmedia-activity-container .row .row.collapse:after{clear:both}.rtmedia-container .column,.rtmedia-activity-container .column,#buddypress div.rtmedia-activity-container .column,.rtmedia-container .columns,.rtmedia-activity-container .columns,#buddypress div.rtmedia-activity-container .columns{position:relative;padding-left:0.9375em;padding-right:0.9375em;width:100%;float:left}@media only screen{.rtmedia-container .column,.rtmedia-activity-container .column,#buddypress div.rtmedia-activity-container .column,.rtmedia-container .columns,.rtmedia-activity-container .columns,#buddypress div.rtmedia-activity-container .columns{position:relative;padding-left:0.9375em;padding-right:0.9375em;float:left}.rtmedia-container .small-1,.rtmedia-activity-container .small-1,#buddypress div.rtmedia-activity-container .small-1{position:relative;width:8.33333%}.rtmedia-container .small-2,.rtmedia-activity-container .small-2,#buddypress div.rtmedia-activity-container .small-2{position:relative;width:16.66667%}.rtmedia-container .small-3,.rtmedia-activity-container .small-3,#buddypress div.rtmedia-activity-container .small-3{position:relative;width:25%}.rtmedia-container .small-4,.rtmedia-activity-container .small-4,#buddypress div.rtmedia-activity-container .small-4{position:relative;width:33.33333%}.rtmedia-container .small-5,.rtmedia-activity-container .small-5,#buddypress div.rtmedia-activity-container .small-5{position:relative;width:41.66667%}.rtmedia-container .small-6,.rtmedia-activity-container .small-6,#buddypress div.rtmedia-activity-container .small-6{position:relative;width:50%}.rtmedia-container .small-7,.rtmedia-activity-container .small-7,#buddypress div.rtmedia-activity-container .small-7{position:relative;width:58.33333%}.rtmedia-container .small-8,.rtmedia-activity-container .small-8,#buddypress div.rtmedia-activity-container .small-8{position:relative;width:66.66667%}.rtmedia-container .small-9,.rtmedia-activity-container .small-9,#buddypress div.rtmedia-activity-container .small-9{position:relative;width:75%}.rtmedia-container .small-10,.rtmedia-activity-container .small-10,#buddypress div.rtmedia-activity-container .small-10{position:relative;width:83.33333%}.rtmedia-container .small-11,.rtmedia-activity-container .small-11,#buddypress div.rtmedia-activity-container .small-11{position:relative;width:91.66667%}.rtmedia-container .small-12,.rtmedia-activity-container .small-12,#buddypress div.rtmedia-activity-container .small-12{position:relative;width:100%}.rtmedia-container .small-offset-0,.rtmedia-activity-container .small-offset-0,#buddypress div.rtmedia-activity-container .small-offset-0{position:relative;margin-left:0%}.rtmedia-container .small-offset-1,.rtmedia-activity-container .small-offset-1,#buddypress div.rtmedia-activity-container .small-offset-1{position:relative;margin-left:8.33333%}.rtmedia-container .small-offset-2,.rtmedia-activity-container .small-offset-2,#buddypress div.rtmedia-activity-container .small-offset-2{position:relative;margin-left:16.66667%}.rtmedia-container .small-offset-3,.rtmedia-activity-container .small-offset-3,#buddypress div.rtmedia-activity-container .small-offset-3{position:relative;margin-left:25%}.rtmedia-container .small-offset-4,.rtmedia-activity-container .small-offset-4,#buddypress div.rtmedia-activity-container .small-offset-4{position:relative;margin-left:33.33333%}.rtmedia-container .small-offset-5,.rtmedia-activity-container .small-offset-5,#buddypress div.rtmedia-activity-container .small-offset-5{position:relative;margin-left:41.66667%}.rtmedia-container .small-offset-6,.rtmedia-activity-container .small-offset-6,#buddypress div.rtmedia-activity-container .small-offset-6{position:relative;margin-left:50%}.rtmedia-container .small-offset-7,.rtmedia-activity-container .small-offset-7,#buddypress div.rtmedia-activity-container .small-offset-7{position:relative;margin-left:58.33333%}.rtmedia-container .small-offset-8,.rtmedia-activity-container .small-offset-8,#buddypress div.rtmedia-activity-container .small-offset-8{position:relative;margin-left:66.66667%}.rtmedia-container .small-offset-9,.rtmedia-activity-container .small-offset-9,#buddypress div.rtmedia-activity-container .small-offset-9{position:relative;margin-left:75%}.rtmedia-container .small-offset-10,.rtmedia-activity-container .small-offset-10,#buddypress div.rtmedia-activity-container .small-offset-10{position:relative;margin-left:83.33333%}.rtmedia-container [class*="column"]+[class*="column"]:last-child,.rtmedia-activity-container [class*="column"]+[class*="column"]:last-child,#buddypress div.rtmedia-activity-container [class*="column"]+[class*="column"]:last-child{float:right}.rtmedia-container [class*="column"]+[class*="column"].end,.rtmedia-activity-container [class*="column"]+[class*="column"].end,#buddypress div.rtmedia-activity-container [class*="column"]+[class*="column"].end{float:left}.rtmedia-container .column.small-centered,.rtmedia-activity-container .column.small-centered,#buddypress div.rtmedia-activity-container .column.small-centered,.rtmedia-container .columns.small-centered,.rtmedia-activity-container .columns.small-centered,#buddypress div.rtmedia-activity-container .columns.small-centered{position:relative;margin-left:auto;margin-right:auto;float:none !important}}@media only screen and (min-width: 768px){.rtmedia-container .large-1,.rtmedia-activity-container .large-1,#buddypress div.rtmedia-activity-container .large-1{position:relative;width:8.33333%}.rtmedia-container .large-2,.rtmedia-activity-container .large-2,#buddypress div.rtmedia-activity-container .large-2{position:relative;width:16.66667%}.rtmedia-container .large-3,.rtmedia-activity-container .large-3,#buddypress div.rtmedia-activity-container .large-3{position:relative;width:25%}.rtmedia-container .large-4,.rtmedia-activity-container .large-4,#buddypress div.rtmedia-activity-container .large-4{position:relative;width:33.33333%}.rtmedia-container .large-5,.rtmedia-activity-container .large-5,#buddypress div.rtmedia-activity-container .large-5{position:relative;width:41.66667%}.rtmedia-container .large-6,.rtmedia-activity-container .large-6,#buddypress div.rtmedia-activity-container .large-6{position:relative;width:50%}.rtmedia-container .large-7,.rtmedia-activity-container .large-7,#buddypress div.rtmedia-activity-container .large-7{position:relative;width:58.33333%}.rtmedia-container .large-8,.rtmedia-activity-container .large-8,#buddypress div.rtmedia-activity-container .large-8{position:relative;width:66.66667%}.rtmedia-container .large-9,.rtmedia-activity-container .large-9,#buddypress div.rtmedia-activity-container .large-9{position:relative;width:75%}.rtmedia-container .large-10,.rtmedia-activity-container .large-10,#buddypress div.rtmedia-activity-container .large-10{position:relative;width:83.33333%}.rtmedia-container .large-11,.rtmedia-activity-container .large-11,#buddypress div.rtmedia-activity-container .large-11{position:relative;width:91.66667%}.rtmedia-container .large-12,.rtmedia-activity-container .large-12,#buddypress div.rtmedia-activity-container .large-12{position:relative;width:100%}.rtmedia-container .row .large-offset-0,.rtmedia-activity-container .row .large-offset-0,#buddypress div.rtmedia-activity-container .row .large-offset-0{position:relative;margin-left:0%}.rtmedia-container .row .large-offset-1,.rtmedia-activity-container .row .large-offset-1,#buddypress div.rtmedia-activity-container .row .large-offset-1{position:relative;margin-left:8.33333%}.rtmedia-container .row .large-offset-2,.rtmedia-activity-container .row .large-offset-2,#buddypress div.rtmedia-activity-container .row .large-offset-2{position:relative;margin-left:16.66667%}.rtmedia-container .row .large-offset-3,.rtmedia-activity-container .row .large-offset-3,#buddypress div.rtmedia-activity-container .row .large-offset-3{position:relative;margin-left:25%}.rtmedia-container .row .large-offset-4,.rtmedia-activity-container .row .large-offset-4,#buddypress div.rtmedia-activity-container .row .large-offset-4{position:relative;margin-left:33.33333%}.rtmedia-container .row .large-offset-5,.rtmedia-activity-container .row .large-offset-5,#buddypress div.rtmedia-activity-container .row .large-offset-5{position:relative;margin-left:41.66667%}.rtmedia-container .row .large-offset-6,.rtmedia-activity-container .row .large-offset-6,#buddypress div.rtmedia-activity-container .row .large-offset-6{position:relative;margin-left:50%}.rtmedia-container .row .large-offset-7,.rtmedia-activity-container .row .large-offset-7,#buddypress div.rtmedia-activity-container .row .large-offset-7{position:relative;margin-left:58.33333%}.rtmedia-container .row .large-offset-8,.rtmedia-activity-container .row .large-offset-8,#buddypress div.rtmedia-activity-container .row .large-offset-8{position:relative;margin-left:66.66667%}.rtmedia-container .row .large-offset-9,.rtmedia-activity-container .row .large-offset-9,#buddypress div.rtmedia-activity-container .row .large-offset-9{position:relative;margin-left:75%}.rtmedia-container .row .large-offset-10,.rtmedia-activity-container .row .large-offset-10,#buddypress div.rtmedia-activity-container .row .large-offset-10{position:relative;margin-left:83.33333%}.rtmedia-container .row .large-offset-11,.rtmedia-activity-container .row .large-offset-11,#buddypress div.rtmedia-activity-container .row .large-offset-11{position:relative;margin-left:91.66667%}.rtmedia-container .push-1,.rtmedia-activity-container .push-1,#buddypress div.rtmedia-activity-container .push-1{position:relative;left:8.33333%;right:auto}.rtmedia-container .pull-1,.rtmedia-activity-container .pull-1,#buddypress div.rtmedia-activity-container .pull-1{position:relative;right:8.33333%;left:auto}.rtmedia-container .push-2,.rtmedia-activity-container .push-2,#buddypress div.rtmedia-activity-container .push-2{position:relative;left:16.66667%;right:auto}.rtmedia-container .pull-2,.rtmedia-activity-container .pull-2,#buddypress div.rtmedia-activity-container .pull-2{position:relative;right:16.66667%;left:auto}.rtmedia-container .push-3,.rtmedia-activity-container .push-3,#buddypress div.rtmedia-activity-container .push-3{position:relative;left:25%;right:auto}.rtmedia-container .pull-3,.rtmedia-activity-container .pull-3,#buddypress div.rtmedia-activity-container .pull-3{position:relative;right:25%;left:auto}.rtmedia-container .push-4,.rtmedia-activity-container .push-4,#buddypress div.rtmedia-activity-container .push-4{position:relative;left:33.33333%;right:auto}.rtmedia-container .pull-4,.rtmedia-activity-container .pull-4,#buddypress div.rtmedia-activity-container .pull-4{position:relative;right:33.33333%;left:auto}.rtmedia-container .push-5,.rtmedia-activity-container .push-5,#buddypress div.rtmedia-activity-container .push-5{position:relative;left:41.66667%;right:auto}.rtmedia-container .pull-5,.rtmedia-activity-container .pull-5,#buddypress div.rtmedia-activity-container .pull-5{position:relative;right:41.66667%;left:auto}.rtmedia-container .push-6,.rtmedia-activity-container .push-6,#buddypress div.rtmedia-activity-container .push-6{position:relative;left:50%;right:auto}.rtmedia-container .pull-6,.rtmedia-activity-container .pull-6,#buddypress div.rtmedia-activity-container .pull-6{position:relative;right:50%;left:auto}.rtmedia-container .push-7,.rtmedia-activity-container .push-7,#buddypress div.rtmedia-activity-container .push-7{position:relative;left:58.33333%;right:auto}.rtmedia-container .pull-7,.rtmedia-activity-container .pull-7,#buddypress div.rtmedia-activity-container .pull-7{position:relative;right:58.33333%;left:auto}.rtmedia-container .push-8,.rtmedia-activity-container .push-8,#buddypress div.rtmedia-activity-container .push-8{position:relative;left:66.66667%;right:auto}.rtmedia-container .pull-8,.rtmedia-activity-container .pull-8,#buddypress div.rtmedia-activity-container .pull-8{position:relative;right:66.66667%;left:auto}.rtmedia-container .push-9,.rtmedia-activity-container .push-9,#buddypress div.rtmedia-activity-container .push-9{position:relative;left:75%;right:auto}.rtmedia-container .pull-9,.rtmedia-activity-container .pull-9,#buddypress div.rtmedia-activity-container .pull-9{position:relative;right:75%;left:auto}.rtmedia-container .push-10,.rtmedia-activity-container .push-10,#buddypress div.rtmedia-activity-container .push-10{position:relative;left:83.33333%;right:auto}.rtmedia-container .pull-10,.rtmedia-activity-container .pull-10,#buddypress div.rtmedia-activity-container .pull-10{position:relative;right:83.33333%;left:auto}.rtmedia-container .push-11,.rtmedia-activity-container .push-11,#buddypress div.rtmedia-activity-container .push-11{position:relative;left:91.66667%;right:auto}.rtmedia-container .pull-11,.rtmedia-activity-container .pull-11,#buddypress div.rtmedia-activity-container .pull-11{position:relative;right:91.66667%;left:auto}.rtmedia-container .column.large-centered,.rtmedia-activity-container .column.large-centered,#buddypress div.rtmedia-activity-container .column.large-centered,.rtmedia-container .columns.large-centered,.rtmedia-activity-container .columns.large-centered,#buddypress div.rtmedia-activity-container .columns.large-centered{position:relative;margin-left:auto;margin-right:auto;float:none !important}.rtmedia-container .column.large-uncentered,.rtmedia-activity-container .column.large-uncentered,#buddypress div.rtmedia-activity-container .column.large-uncentered,.rtmedia-container .columns.large-uncentered,.rtmedia-activity-container .columns.large-uncentered,#buddypress div.rtmedia-activity-container .columns.large-uncentered{margin-left:0;margin-right:0;float:left !important}.rtmedia-container .column.large-uncentered.opposite,.rtmedia-activity-container .column.large-uncentered.opposite,#buddypress div.rtmedia-activity-container .column.large-uncentered.opposite,.rtmedia-container .columns.large-uncentered.opposite,.rtmedia-activity-container .columns.large-uncentered.opposite,#buddypress div.rtmedia-activity-container .columns.large-uncentered.opposite{float:right !important}}.rtmedia-container .show-for-small,.rtmedia-activity-container .show-for-small,#buddypress div.rtmedia-activity-container .show-for-small,.rtmedia-container .show-for-medium-down,.rtmedia-activity-container .show-for-medium-down,#buddypress div.rtmedia-activity-container .show-for-medium-down,.rtmedia-container .show-for-large-down,.rtmedia-activity-container .show-for-large-down,#buddypress div.rtmedia-activity-container .show-for-large-down{display:inherit !important}.rtmedia-container .show-for-medium,.rtmedia-activity-container .show-for-medium,#buddypress div.rtmedia-activity-container .show-for-medium,.rtmedia-container .show-for-medium-up,.rtmedia-activity-container .show-for-medium-up,#buddypress div.rtmedia-activity-container .show-for-medium-up,.rtmedia-container .show-for-large,.rtmedia-activity-container .show-for-large,#buddypress div.rtmedia-activity-container .show-for-large,.rtmedia-container .show-for-large-up,.rtmedia-activity-container .show-for-large-up,#buddypress div.rtmedia-activity-container .show-for-large-up,.rtmedia-container .show-for-xlarge,.rtmedia-activity-container .show-for-xlarge,#buddypress div.rtmedia-activity-container .show-for-xlarge{display:none !important}.rtmedia-container .hide-for-medium,.rtmedia-activity-container .hide-for-medium,#buddypress div.rtmedia-activity-container .hide-for-medium,.rtmedia-container .hide-for-medium-up,.rtmedia-activity-container .hide-for-medium-up,#buddypress div.rtmedia-activity-container .hide-for-medium-up,.rtmedia-container .hide-for-large,.rtmedia-activity-container .hide-for-large,#buddypress div.rtmedia-activity-container .hide-for-large,.rtmedia-container .hide-for-large-up,.rtmedia-activity-container .hide-for-large-up,#buddypress div.rtmedia-activity-container .hide-for-large-up,.rtmedia-container .hide-for-xlarge,.rtmedia-activity-container .hide-for-xlarge,#buddypress div.rtmedia-activity-container .hide-for-xlarge{display:inherit !important}.rtmedia-container .hide-for-small,.rtmedia-activity-container .hide-for-small,#buddypress div.rtmedia-activity-container .hide-for-small,.rtmedia-container .hide-for-medium-down,.rtmedia-activity-container .hide-for-medium-down,#buddypress div.rtmedia-activity-container .hide-for-medium-down,.rtmedia-container .hide-for-large-down,.rtmedia-activity-container .hide-for-large-down,#buddypress div.rtmedia-activity-container .hide-for-large-down{display:none !important}.rtmedia-container table.show-for-small,.rtmedia-activity-container table.show-for-small,#buddypress div.rtmedia-activity-container table.show-for-small,.rtmedia-container table.show-for-medium-down,.rtmedia-activity-container table.show-for-medium-down,#buddypress div.rtmedia-activity-container table.show-for-medium-down,.rtmedia-container table.show-for-large-down,.rtmedia-activity-container table.show-for-large-down,#buddypress div.rtmedia-activity-container table.show-for-large-down,.rtmedia-container table.hide-for-medium,.rtmedia-activity-container table.hide-for-medium,#buddypress div.rtmedia-activity-container table.hide-for-medium,.rtmedia-container table.hide-for-medium-up,.rtmedia-activity-container table.hide-for-medium-up,#buddypress div.rtmedia-activity-container table.hide-for-medium-up,.rtmedia-container table.hide-for-large,.rtmedia-activity-container table.hide-for-large,#buddypress div.rtmedia-activity-container table.hide-for-large,.rtmedia-container table.hide-for-large-up,.rtmedia-activity-container table.hide-for-large-up,#buddypress div.rtmedia-activity-container table.hide-for-large-up,.rtmedia-container table.hide-for-xlarge,.rtmedia-activity-container table.hide-for-xlarge,#buddypress div.rtmedia-activity-container table.hide-for-xlarge{display:table}.rtmedia-container thead.show-for-small,.rtmedia-activity-container thead.show-for-small,#buddypress div.rtmedia-activity-container thead.show-for-small,.rtmedia-container thead.show-for-medium-down,.rtmedia-activity-container thead.show-for-medium-down,#buddypress div.rtmedia-activity-container thead.show-for-medium-down,.rtmedia-container thead.show-for-large-down,.rtmedia-activity-container thead.show-for-large-down,#buddypress div.rtmedia-activity-container thead.show-for-large-down,.rtmedia-container thead.hide-for-medium,.rtmedia-activity-container thead.hide-for-medium,#buddypress div.rtmedia-activity-container thead.hide-for-medium,.rtmedia-container thead.hide-for-medium-up,.rtmedia-activity-container thead.hide-for-medium-up,#buddypress div.rtmedia-activity-container thead.hide-for-medium-up,.rtmedia-container thead.hide-for-large,.rtmedia-activity-container thead.hide-for-large,#buddypress div.rtmedia-activity-container thead.hide-for-large,.rtmedia-container thead.hide-for-large-up,.rtmedia-activity-container thead.hide-for-large-up,#buddypress div.rtmedia-activity-container thead.hide-for-large-up,.rtmedia-container thead.hide-for-xlarge,.rtmedia-activity-container thead.hide-for-xlarge,#buddypress div.rtmedia-activity-container thead.hide-for-xlarge{display:table-header-group !important}.rtmedia-container tbody.show-for-small,.rtmedia-activity-container tbody.show-for-small,#buddypress div.rtmedia-activity-container tbody.show-for-small,.rtmedia-container tbody.show-for-medium-down,.rtmedia-activity-container tbody.show-for-medium-down,#buddypress div.rtmedia-activity-container tbody.show-for-medium-down,.rtmedia-container tbody.show-for-large-down,.rtmedia-activity-container tbody.show-for-large-down,#buddypress div.rtmedia-activity-container tbody.show-for-large-down,.rtmedia-container tbody.hide-for-medium,.rtmedia-activity-container tbody.hide-for-medium,#buddypress div.rtmedia-activity-container tbody.hide-for-medium,.rtmedia-container tbody.hide-for-medium-up,.rtmedia-activity-container tbody.hide-for-medium-up,#buddypress div.rtmedia-activity-container tbody.hide-for-medium-up,.rtmedia-container tbody.hide-for-large,.rtmedia-activity-container tbody.hide-for-large,#buddypress div.rtmedia-activity-container tbody.hide-for-large,.rtmedia-container tbody.hide-for-large-up,.rtmedia-activity-container tbody.hide-for-large-up,#buddypress div.rtmedia-activity-container tbody.hide-for-large-up,.rtmedia-container tbody.hide-for-xlarge,.rtmedia-activity-container tbody.hide-for-xlarge,#buddypress div.rtmedia-activity-container tbody.hide-for-xlarge{display:table-row-group !important}.rtmedia-container tr.show-for-small,.rtmedia-activity-container tr.show-for-small,#buddypress div.rtmedia-activity-container tr.show-for-small,.rtmedia-container tr.show-for-medium-down,.rtmedia-activity-container tr.show-for-medium-down,#buddypress div.rtmedia-activity-container tr.show-for-medium-down,.rtmedia-container tr.show-for-large-down,.rtmedia-activity-container tr.show-for-large-down,#buddypress div.rtmedia-activity-container tr.show-for-large-down,.rtmedia-container tr.hide-for-medium,.rtmedia-activity-container tr.hide-for-medium,#buddypress div.rtmedia-activity-container tr.hide-for-medium,.rtmedia-container tr.hide-for-medium-up,.rtmedia-activity-container tr.hide-for-medium-up,#buddypress div.rtmedia-activity-container tr.hide-for-medium-up,.rtmedia-container tr.hide-for-large,.rtmedia-activity-container tr.hide-for-large,#buddypress div.rtmedia-activity-container tr.hide-for-large,.rtmedia-container tr.hide-for-large-up,.rtmedia-activity-container tr.hide-for-large-up,#buddypress div.rtmedia-activity-container tr.hide-for-large-up,.rtmedia-container tr.hide-for-xlarge,.rtmedia-activity-container tr.hide-for-xlarge,#buddypress div.rtmedia-activity-container tr.hide-for-xlarge{display:table-row !important}.rtmedia-container td.show-for-small,.rtmedia-activity-container td.show-for-small,#buddypress div.rtmedia-activity-container td.show-for-small,.rtmedia-container td.show-for-medium-down,.rtmedia-activity-container td.show-for-medium-down,#buddypress div.rtmedia-activity-container td.show-for-medium-down,.rtmedia-container td.show-for-large-down,.rtmedia-activity-container td.show-for-large-down,#buddypress div.rtmedia-activity-container td.show-for-large-down,.rtmedia-container td.hide-for-medium,.rtmedia-activity-container td.hide-for-medium,#buddypress div.rtmedia-activity-container td.hide-for-medium,.rtmedia-container td.hide-for-medium-up,.rtmedia-activity-container td.hide-for-medium-up,#buddypress div.rtmedia-activity-container td.hide-for-medium-up,.rtmedia-container td.hide-for-large,.rtmedia-activity-container td.hide-for-large,#buddypress div.rtmedia-activity-container td.hide-for-large,.rtmedia-container td.hide-for-large-up,.rtmedia-activity-container td.hide-for-large-up,#buddypress div.rtmedia-activity-container td.hide-for-large-up,.rtmedia-container td.hide-for-xlarge,.rtmedia-activity-container td.hide-for-xlarge,#buddypress div.rtmedia-activity-container td.hide-for-xlarge,.rtmedia-container th.show-for-small,.rtmedia-activity-container th.show-for-small,#buddypress div.rtmedia-activity-container th.show-for-small,.rtmedia-container th.show-for-medium-down,.rtmedia-activity-container th.show-for-medium-down,#buddypress div.rtmedia-activity-container th.show-for-medium-down,.rtmedia-container th.show-for-large-down,.rtmedia-activity-container th.show-for-large-down,#buddypress div.rtmedia-activity-container th.show-for-large-down,.rtmedia-container th.hide-for-medium,.rtmedia-activity-container th.hide-for-medium,#buddypress div.rtmedia-activity-container th.hide-for-medium,.rtmedia-container th.hide-for-medium-up,.rtmedia-activity-container th.hide-for-medium-up,#buddypress div.rtmedia-activity-container th.hide-for-medium-up,.rtmedia-container th.hide-for-large,.rtmedia-activity-container th.hide-for-large,#buddypress div.rtmedia-activity-container th.hide-for-large,.rtmedia-container th.hide-for-large-up,.rtmedia-activity-container th.hide-for-large-up,#buddypress div.rtmedia-activity-container th.hide-for-large-up,.rtmedia-container th.hide-for-xlarge,.rtmedia-activity-container th.hide-for-xlarge,#buddypress div.rtmedia-activity-container th.hide-for-xlarge{display:table-cell !important}@media only screen and (min-width: 768px){.rtmedia-container .show-for-medium,.rtmedia-activity-container .show-for-medium,#buddypress div.rtmedia-activity-container .show-for-medium,.rtmedia-container .show-for-medium-up,.rtmedia-activity-container .show-for-medium-up,#buddypress div.rtmedia-activity-container .show-for-medium-up{display:inherit !important}.rtmedia-container .show-for-small,.rtmedia-activity-container .show-for-small,#buddypress div.rtmedia-activity-container .show-for-small{display:none !important}.rtmedia-container .hide-for-small,.rtmedia-activity-container .hide-for-small,#buddypress div.rtmedia-activity-container .hide-for-small{display:inherit !important}.rtmedia-container .hide-for-medium,.rtmedia-activity-container .hide-for-medium,#buddypress div.rtmedia-activity-container .hide-for-medium,.rtmedia-container .hide-for-medium-up,.rtmedia-activity-container .hide-for-medium-up,#buddypress div.rtmedia-activity-container .hide-for-medium-up{display:none !important}.rtmedia-container table.show-for-medium,.rtmedia-activity-container table.show-for-medium,#buddypress div.rtmedia-activity-container table.show-for-medium,.rtmedia-container table.show-for-medium-up,.rtmedia-activity-container table.show-for-medium-up,#buddypress div.rtmedia-activity-container table.show-for-medium-up,.rtmedia-container table.hide-for-small,.rtmedia-activity-container table.hide-for-small,#buddypress div.rtmedia-activity-container table.hide-for-small{display:table}.rtmedia-container thead.show-for-medium,.rtmedia-activity-container thead.show-for-medium,#buddypress div.rtmedia-activity-container thead.show-for-medium,.rtmedia-container thead.show-for-medium-up,.rtmedia-activity-container thead.show-for-medium-up,#buddypress div.rtmedia-activity-container thead.show-for-medium-up,.rtmedia-container thead.hide-for-small,.rtmedia-activity-container thead.hide-for-small,#buddypress div.rtmedia-activity-container thead.hide-for-small{display:table-header-group !important}.rtmedia-container tbody.show-for-medium,.rtmedia-activity-container tbody.show-for-medium,#buddypress div.rtmedia-activity-container tbody.show-for-medium,.rtmedia-container tbody.show-for-medium-up,.rtmedia-activity-container tbody.show-for-medium-up,#buddypress div.rtmedia-activity-container tbody.show-for-medium-up,.rtmedia-container tbody.hide-for-small,.rtmedia-activity-container tbody.hide-for-small,#buddypress div.rtmedia-activity-container tbody.hide-for-small{display:table-row-group !important}.rtmedia-container tr.show-for-medium,.rtmedia-activity-container tr.show-for-medium,#buddypress div.rtmedia-activity-container tr.show-for-medium,.rtmedia-container tr.show-for-medium-up,.rtmedia-activity-container tr.show-for-medium-up,#buddypress div.rtmedia-activity-container tr.show-for-medium-up,.rtmedia-container tr.hide-for-small,.rtmedia-activity-container tr.hide-for-small,#buddypress div.rtmedia-activity-container tr.hide-for-small{display:table-row !important}.rtmedia-container td.show-for-medium,.rtmedia-activity-container td.show-for-medium,#buddypress div.rtmedia-activity-container td.show-for-medium,.rtmedia-container td.show-for-medium-up,.rtmedia-activity-container td.show-for-medium-up,#buddypress div.rtmedia-activity-container td.show-for-medium-up,.rtmedia-container td.hide-for-small,.rtmedia-activity-container td.hide-for-small,#buddypress div.rtmedia-activity-container td.hide-for-small,.rtmedia-container th.show-for-medium,.rtmedia-activity-container th.show-for-medium,#buddypress div.rtmedia-activity-container th.show-for-medium,.rtmedia-container th.show-for-medium-up,.rtmedia-activity-container th.show-for-medium-up,#buddypress div.rtmedia-activity-container th.show-for-medium-up,.rtmedia-container th.hide-for-small,.rtmedia-activity-container th.hide-for-small,#buddypress div.rtmedia-activity-container th.hide-for-small{display:table-cell !important}}@media only screen and (min-width: 1280px){.rtmedia-container .show-for-large,.rtmedia-activity-container .show-for-large,#buddypress div.rtmedia-activity-container .show-for-large,.rtmedia-container .show-for-large-up,.rtmedia-activity-container .show-for-large-up,#buddypress div.rtmedia-activity-container .show-for-large-up{display:inherit !important}.rtmedia-container .show-for-medium,.rtmedia-activity-container .show-for-medium,#buddypress div.rtmedia-activity-container .show-for-medium,.rtmedia-container .show-for-medium-down,.rtmedia-activity-container .show-for-medium-down,#buddypress div.rtmedia-activity-container .show-for-medium-down{display:none !important}.rtmedia-container .hide-for-medium,.rtmedia-activity-container .hide-for-medium,#buddypress div.rtmedia-activity-container .hide-for-medium,.rtmedia-container .hide-for-medium-down,.rtmedia-activity-container .hide-for-medium-down,#buddypress div.rtmedia-activity-container .hide-for-medium-down{display:inherit !important}.rtmedia-container .hide-for-large,.rtmedia-activity-container .hide-for-large,#buddypress div.rtmedia-activity-container .hide-for-large,.rtmedia-container .hide-for-large-up,.rtmedia-activity-container .hide-for-large-up,#buddypress div.rtmedia-activity-container .hide-for-large-up{display:none !important}.rtmedia-container table.show-for-large,.rtmedia-activity-container table.show-for-large,#buddypress div.rtmedia-activity-container table.show-for-large,.rtmedia-container table.show-for-large-up,.rtmedia-activity-container table.show-for-large-up,#buddypress div.rtmedia-activity-container table.show-for-large-up,.rtmedia-container table.hide-for-medium,.rtmedia-activity-container table.hide-for-medium,#buddypress div.rtmedia-activity-container table.hide-for-medium,.rtmedia-container table.hide-for-medium-down,.rtmedia-activity-container table.hide-for-medium-down,#buddypress div.rtmedia-activity-container table.hide-for-medium-down{display:table}.rtmedia-container thead.show-for-large,.rtmedia-activity-container thead.show-for-large,#buddypress div.rtmedia-activity-container thead.show-for-large,.rtmedia-container thead.show-for-large-up,.rtmedia-activity-container thead.show-for-large-up,#buddypress div.rtmedia-activity-container thead.show-for-large-up,.rtmedia-container thead.hide-for-medium,.rtmedia-activity-container thead.hide-for-medium,#buddypress div.rtmedia-activity-container thead.hide-for-medium,.rtmedia-container thead.hide-for-medium-down,.rtmedia-activity-container thead.hide-for-medium-down,#buddypress div.rtmedia-activity-container thead.hide-for-medium-down{display:table-header-group !important}.rtmedia-container tbody.show-for-large,.rtmedia-activity-container tbody.show-for-large,#buddypress div.rtmedia-activity-container tbody.show-for-large,.rtmedia-container tbody.show-for-large-up,.rtmedia-activity-container tbody.show-for-large-up,#buddypress div.rtmedia-activity-container tbody.show-for-large-up,.rtmedia-container tbody.hide-for-medium,.rtmedia-activity-container tbody.hide-for-medium,#buddypress div.rtmedia-activity-container tbody.hide-for-medium,.rtmedia-container tbody.hide-for-medium-down,.rtmedia-activity-container tbody.hide-for-medium-down,#buddypress div.rtmedia-activity-container tbody.hide-for-medium-down{display:table-row-group !important}.rtmedia-container tr.show-for-large,.rtmedia-activity-container tr.show-for-large,#buddypress div.rtmedia-activity-container tr.show-for-large,.rtmedia-container tr.show-for-large-up,.rtmedia-activity-container tr.show-for-large-up,#buddypress div.rtmedia-activity-container tr.show-for-large-up,.rtmedia-container tr.hide-for-medium,.rtmedia-activity-container tr.hide-for-medium,#buddypress div.rtmedia-activity-container tr.hide-for-medium,.rtmedia-container tr.hide-for-medium-down,.rtmedia-activity-container tr.hide-for-medium-down,#buddypress div.rtmedia-activity-container tr.hide-for-medium-down{display:table-row !important}.rtmedia-container td.show-for-large,.rtmedia-activity-container td.show-for-large,#buddypress div.rtmedia-activity-container td.show-for-large,.rtmedia-container td.show-for-large-up,.rtmedia-activity-container td.show-for-large-up,#buddypress div.rtmedia-activity-container td.show-for-large-up,.rtmedia-container td.hide-for-medium,.rtmedia-activity-container td.hide-for-medium,#buddypress div.rtmedia-activity-container td.hide-for-medium,.rtmedia-container td.hide-for-medium-down,.rtmedia-activity-container td.hide-for-medium-down,#buddypress div.rtmedia-activity-container td.hide-for-medium-down,.rtmedia-container th.show-for-large,.rtmedia-activity-container th.show-for-large,#buddypress div.rtmedia-activity-container th.show-for-large,.rtmedia-container th.show-for-large-up,.rtmedia-activity-container th.show-for-large-up,#buddypress div.rtmedia-activity-container th.show-for-large-up,.rtmedia-container th.hide-for-medium,.rtmedia-activity-container th.hide-for-medium,#buddypress div.rtmedia-activity-container th.hide-for-medium,.rtmedia-container th.hide-for-medium-down,.rtmedia-activity-container th.hide-for-medium-down,#buddypress div.rtmedia-activity-container th.hide-for-medium-down{display:table-cell !important}}@media only screen and (min-width: 1440px){.rtmedia-container .show-for-xlarge,.rtmedia-activity-container .show-for-xlarge,#buddypress div.rtmedia-activity-container .show-for-xlarge{display:inherit !important}.rtmedia-container .show-for-large,.rtmedia-activity-container .show-for-large,#buddypress div.rtmedia-activity-container .show-for-large,.rtmedia-container .show-for-large-down,.rtmedia-activity-container .show-for-large-down,#buddypress div.rtmedia-activity-container .show-for-large-down{display:none !important}.rtmedia-container .hide-for-large,.rtmedia-activity-container .hide-for-large,#buddypress div.rtmedia-activity-container .hide-for-large,.rtmedia-container .hide-for-large-down,.rtmedia-activity-container .hide-for-large-down,#buddypress div.rtmedia-activity-container .hide-for-large-down{display:inherit !important}.rtmedia-container .hide-for-xlarge,.rtmedia-activity-container .hide-for-xlarge,#buddypress div.rtmedia-activity-container .hide-for-xlarge{display:none !important}.rtmedia-container table.show-for-xlarge,.rtmedia-activity-container table.show-for-xlarge,#buddypress div.rtmedia-activity-container table.show-for-xlarge,.rtmedia-container table.hide-for-large,.rtmedia-activity-container table.hide-for-large,#buddypress div.rtmedia-activity-container table.hide-for-large,.rtmedia-container table.hide-for-large-down,.rtmedia-activity-container table.hide-for-large-down,#buddypress div.rtmedia-activity-container table.hide-for-large-down{display:table}.rtmedia-container thead.show-for-xlarge,.rtmedia-activity-container thead.show-for-xlarge,#buddypress div.rtmedia-activity-container thead.show-for-xlarge,.rtmedia-container thead.hide-for-large,.rtmedia-activity-container thead.hide-for-large,#buddypress div.rtmedia-activity-container thead.hide-for-large,.rtmedia-container thead.hide-for-large-down,.rtmedia-activity-container thead.hide-for-large-down,#buddypress div.rtmedia-activity-container thead.hide-for-large-down{display:table-header-group !important}.rtmedia-container tbody.show-for-xlarge,.rtmedia-activity-container tbody.show-for-xlarge,#buddypress div.rtmedia-activity-container tbody.show-for-xlarge,.rtmedia-container tbody.hide-for-large,.rtmedia-activity-container tbody.hide-for-large,#buddypress div.rtmedia-activity-container tbody.hide-for-large,.rtmedia-container tbody.hide-for-large-down,.rtmedia-activity-container tbody.hide-for-large-down,#buddypress div.rtmedia-activity-container tbody.hide-for-large-down{display:table-row-group !important}.rtmedia-container tr.show-for-xlarge,.rtmedia-activity-container tr.show-for-xlarge,#buddypress div.rtmedia-activity-container tr.show-for-xlarge,.rtmedia-container tr.hide-for-large,.rtmedia-activity-container tr.hide-for-large,#buddypress div.rtmedia-activity-container tr.hide-for-large,.rtmedia-container tr.hide-for-large-down,.rtmedia-activity-container tr.hide-for-large-down,#buddypress div.rtmedia-activity-container tr.hide-for-large-down{display:table-row !important}.rtmedia-container td.show-for-xlarge,.rtmedia-activity-container td.show-for-xlarge,#buddypress div.rtmedia-activity-container td.show-for-xlarge,.rtmedia-container td.hide-for-large,.rtmedia-activity-container td.hide-for-large,#buddypress div.rtmedia-activity-container td.hide-for-large,.rtmedia-container td.hide-for-large-down,.rtmedia-activity-container td.hide-for-large-down,#buddypress div.rtmedia-activity-container td.hide-for-large-down,.rtmedia-container th.show-for-xlarge,.rtmedia-activity-container th.show-for-xlarge,#buddypress div.rtmedia-activity-container th.show-for-xlarge,.rtmedia-container th.hide-for-large,.rtmedia-activity-container th.hide-for-large,#buddypress div.rtmedia-activity-container th.hide-for-large,.rtmedia-container th.hide-for-large-down,.rtmedia-activity-container th.hide-for-large-down,#buddypress div.rtmedia-activity-container th.hide-for-large-down{display:table-cell !important}}.rtmedia-container .show-for-landscape,.rtmedia-activity-container .show-for-landscape,#buddypress div.rtmedia-activity-container .show-for-landscape,.rtmedia-container .hide-for-portrait,.rtmedia-activity-container .hide-for-portrait,#buddypress div.rtmedia-activity-container .hide-for-portrait{display:inherit !important}.rtmedia-container .hide-for-landscape,.rtmedia-activity-container .hide-for-landscape,#buddypress div.rtmedia-activity-container .hide-for-landscape,.rtmedia-container .show-for-portrait,.rtmedia-activity-container .show-for-portrait,#buddypress div.rtmedia-activity-container .show-for-portrait{display:none !important}.rtmedia-container table.hide-for-landscape,.rtmedia-activity-container table.hide-for-landscape,#buddypress div.rtmedia-activity-container table.hide-for-landscape,.rtmedia-container table.show-for-portrait,.rtmedia-activity-container table.show-for-portrait,#buddypress div.rtmedia-activity-container table.show-for-portrait{display:table}.rtmedia-container thead.hide-for-landscape,.rtmedia-activity-container thead.hide-for-landscape,#buddypress div.rtmedia-activity-container thead.hide-for-landscape,.rtmedia-container thead.show-for-portrait,.rtmedia-activity-container thead.show-for-portrait,#buddypress div.rtmedia-activity-container thead.show-for-portrait{display:table-header-group !important}.rtmedia-container tbody.hide-for-landscape,.rtmedia-activity-container tbody.hide-for-landscape,#buddypress div.rtmedia-activity-container tbody.hide-for-landscape,.rtmedia-container tbody.show-for-portrait,.rtmedia-activity-container tbody.show-for-portrait,#buddypress div.rtmedia-activity-container tbody.show-for-portrait{display:table-row-group !important}.rtmedia-container tr.hide-for-landscape,.rtmedia-activity-container tr.hide-for-landscape,#buddypress div.rtmedia-activity-container tr.hide-for-landscape,.rtmedia-container tr.show-for-portrait,.rtmedia-activity-container tr.show-for-portrait,#buddypress div.rtmedia-activity-container tr.show-for-portrait{display:table-row !important}.rtmedia-container td.hide-for-landscape,.rtmedia-activity-container td.hide-for-landscape,#buddypress div.rtmedia-activity-container td.hide-for-landscape,.rtmedia-container td.show-for-portrait,.rtmedia-activity-container td.show-for-portrait,#buddypress div.rtmedia-activity-container td.show-for-portrait,.rtmedia-container th.hide-for-landscape,.rtmedia-activity-container th.hide-for-landscape,#buddypress div.rtmedia-activity-container th.hide-for-landscape,.rtmedia-container th.show-for-portrait,.rtmedia-activity-container th.show-for-portrait,#buddypress div.rtmedia-activity-container th.show-for-portrait{display:table-cell !important}@media only screen and (orientation: landscape){.rtmedia-container .show-for-landscape,.rtmedia-activity-container .show-for-landscape,#buddypress div.rtmedia-activity-container .show-for-landscape,.rtmedia-container .hide-for-portrait,.rtmedia-activity-container .hide-for-portrait,#buddypress div.rtmedia-activity-container .hide-for-portrait{display:inherit !important}.rtmedia-container .hide-for-landscape,.rtmedia-activity-container .hide-for-landscape,#buddypress div.rtmedia-activity-container .hide-for-landscape,.rtmedia-container .show-for-portrait,.rtmedia-activity-container .show-for-portrait,#buddypress div.rtmedia-activity-container .show-for-portrait{display:none !important}.rtmedia-container table.show-for-landscape,.rtmedia-activity-container table.show-for-landscape,#buddypress div.rtmedia-activity-container table.show-for-landscape,.rtmedia-container table.hide-for-portrait,.rtmedia-activity-container table.hide-for-portrait,#buddypress div.rtmedia-activity-container table.hide-for-portrait{display:table}.rtmedia-container thead.show-for-landscape,.rtmedia-activity-container thead.show-for-landscape,#buddypress div.rtmedia-activity-container thead.show-for-landscape,.rtmedia-container thead.hide-for-portrait,.rtmedia-activity-container thead.hide-for-portrait,#buddypress div.rtmedia-activity-container thead.hide-for-portrait{display:table-header-group !important}.rtmedia-container tbody.show-for-landscape,.rtmedia-activity-container tbody.show-for-landscape,#buddypress div.rtmedia-activity-container tbody.show-for-landscape,.rtmedia-container tbody.hide-for-portrait,.rtmedia-activity-container tbody.hide-for-portrait,#buddypress div.rtmedia-activity-container tbody.hide-for-portrait{display:table-row-group !important}.rtmedia-container tr.show-for-landscape,.rtmedia-activity-container tr.show-for-landscape,#buddypress div.rtmedia-activity-container tr.show-for-landscape,.rtmedia-container tr.hide-for-portrait,.rtmedia-activity-container tr.hide-for-portrait,#buddypress div.rtmedia-activity-container tr.hide-for-portrait{display:table-row !important}.rtmedia-container td.show-for-landscape,.rtmedia-activity-container td.show-for-landscape,#buddypress div.rtmedia-activity-container td.show-for-landscape,.rtmedia-container td.hide-for-portrait,.rtmedia-activity-container td.hide-for-portrait,#buddypress div.rtmedia-activity-container td.hide-for-portrait,.rtmedia-container th.show-for-landscape,.rtmedia-activity-container th.show-for-landscape,#buddypress div.rtmedia-activity-container th.show-for-landscape,.rtmedia-container th.hide-for-portrait,.rtmedia-activity-container th.hide-for-portrait,#buddypress div.rtmedia-activity-container th.hide-for-portrait{display:table-cell !important}}@media only screen and (orientation: portrait){.rtmedia-container .show-for-portrait,.rtmedia-activity-container .show-for-portrait,#buddypress div.rtmedia-activity-container .show-for-portrait,.rtmedia-container .hide-for-landscape,.rtmedia-activity-container .hide-for-landscape,#buddypress div.rtmedia-activity-container .hide-for-landscape{display:inherit !important}.rtmedia-container .hide-for-portrait,.rtmedia-activity-container .hide-for-portrait,#buddypress div.rtmedia-activity-container .hide-for-portrait,.rtmedia-container .show-for-landscape,.rtmedia-activity-container .show-for-landscape,#buddypress div.rtmedia-activity-container .show-for-landscape{display:none !important}.rtmedia-container table.show-for-portrait,.rtmedia-activity-container table.show-for-portrait,#buddypress div.rtmedia-activity-container table.show-for-portrait,.rtmedia-container table.hide-for-landscape,.rtmedia-activity-container table.hide-for-landscape,#buddypress div.rtmedia-activity-container table.hide-for-landscape{display:table}.rtmedia-container thead.show-for-portrait,.rtmedia-activity-container thead.show-for-portrait,#buddypress div.rtmedia-activity-container thead.show-for-portrait,.rtmedia-container thead.hide-for-landscape,.rtmedia-activity-container thead.hide-for-landscape,#buddypress div.rtmedia-activity-container thead.hide-for-landscape{display:table-header-group !important}.rtmedia-container tbody.show-for-portrait,.rtmedia-activity-container tbody.show-for-portrait,#buddypress div.rtmedia-activity-container tbody.show-for-portrait,.rtmedia-container tbody.hide-for-landscape,.rtmedia-activity-container tbody.hide-for-landscape,#buddypress div.rtmedia-activity-container tbody.hide-for-landscape{display:table-row-group !important}.rtmedia-container tr.show-for-portrait,.rtmedia-activity-container tr.show-for-portrait,#buddypress div.rtmedia-activity-container tr.show-for-portrait,.rtmedia-container tr.hide-for-landscape,.rtmedia-activity-container tr.hide-for-landscape,#buddypress div.rtmedia-activity-container tr.hide-for-landscape{display:table-row !important}.rtmedia-container td.show-for-portrait,.rtmedia-activity-container td.show-for-portrait,#buddypress div.rtmedia-activity-container td.show-for-portrait,.rtmedia-container td.hide-for-landscape,.rtmedia-activity-container td.hide-for-landscape,#buddypress div.rtmedia-activity-container td.hide-for-landscape,.rtmedia-container th.show-for-portrait,.rtmedia-activity-container th.show-for-portrait,#buddypress div.rtmedia-activity-container th.show-for-portrait,.rtmedia-container th.hide-for-landscape,.rtmedia-activity-container th.hide-for-landscape,#buddypress div.rtmedia-activity-container th.hide-for-landscape{display:table-cell !important}}.rtmedia-container .show-for-touch,.rtmedia-activity-container .show-for-touch,#buddypress div.rtmedia-activity-container .show-for-touch{display:none !important}.rtmedia-container .hide-for-touch,.rtmedia-activity-container .hide-for-touch,#buddypress div.rtmedia-activity-container .hide-for-touch{display:inherit !important}.rtmedia-container .touch .show-for-touch,.rtmedia-activity-container .touch .show-for-touch,#buddypress div.rtmedia-activity-container .touch .show-for-touch{display:inherit !important}.rtmedia-container .touch .hide-for-touch,.rtmedia-activity-container .touch .hide-for-touch,#buddypress div.rtmedia-activity-container .touch .hide-for-touch{display:none !important}.rtmedia-container table.hide-for-touch,.rtmedia-activity-container table.hide-for-touch,#buddypress div.rtmedia-activity-container table.hide-for-touch{display:table}.rtmedia-container .touch table.show-for-touch,.rtmedia-activity-container .touch table.show-for-touch,#buddypress div.rtmedia-activity-container .touch table.show-for-touch{display:table}.rtmedia-container thead.hide-for-touch,.rtmedia-activity-container thead.hide-for-touch,#buddypress div.rtmedia-activity-container thead.hide-for-touch{display:table-header-group !important}.rtmedia-container .touch thead.show-for-touch,.rtmedia-activity-container .touch thead.show-for-touch,#buddypress div.rtmedia-activity-container .touch thead.show-for-touch{display:table-header-group !important}.rtmedia-container tbody.hide-for-touch,.rtmedia-activity-container tbody.hide-for-touch,#buddypress div.rtmedia-activity-container tbody.hide-for-touch{display:table-row-group !important}.rtmedia-container .touch tbody.show-for-touch,.rtmedia-activity-container .touch tbody.show-for-touch,#buddypress div.rtmedia-activity-container .touch tbody.show-for-touch{display:table-row-group !important}.rtmedia-container tr.hide-for-touch,.rtmedia-activity-container tr.hide-for-touch,#buddypress div.rtmedia-activity-container tr.hide-for-touch{display:table-row !important}.rtmedia-container .touch tr.show-for-touch,.rtmedia-activity-container .touch tr.show-for-touch,#buddypress div.rtmedia-activity-container .touch tr.show-for-touch{display:table-row !important}.rtmedia-container td.hide-for-touch,.rtmedia-activity-container td.hide-for-touch,#buddypress div.rtmedia-activity-container td.hide-for-touch{display:table-cell !important}.rtmedia-container .touch td.show-for-touch,.rtmedia-activity-container .touch td.show-for-touch,#buddypress div.rtmedia-activity-container .touch td.show-for-touch{display:table-cell !important}.rtmedia-container th.hide-for-touch,.rtmedia-activity-container th.hide-for-touch,#buddypress div.rtmedia-activity-container th.hide-for-touch{display:table-cell !important}.rtmedia-container .touch th.show-for-touch,.rtmedia-activity-container .touch th.show-for-touch,#buddypress div.rtmedia-activity-container .touch th.show-for-touch{display:table-cell !important}.rtmedia-container .flex-video,.rtmedia-activity-container .flex-video,#buddypress div.rtmedia-activity-container .flex-video{position:relative;padding-top:1.5625em;padding-bottom:67.5%;height:0;margin-bottom:1em;overflow:hidden}.rtmedia-container .flex-video.widescreen,.rtmedia-activity-container .flex-video.widescreen,#buddypress div.rtmedia-activity-container .flex-video.widescreen{padding-bottom:57.25%}.rtmedia-container .flex-video.vimeo,.rtmedia-activity-container .flex-video.vimeo,#buddypress div.rtmedia-activity-container .flex-video.vimeo{padding-top:0}.rtmedia-container .flex-video iframe,.rtmedia-activity-container .flex-video iframe,#buddypress div.rtmedia-activity-container .flex-video iframe,.rtmedia-container .flex-video object,.rtmedia-activity-container .flex-video object,#buddypress div.rtmedia-activity-container .flex-video object,.rtmedia-container .flex-video embed,.rtmedia-activity-container .flex-video embed,#buddypress div.rtmedia-activity-container .flex-video embed,.rtmedia-container .flex-video video,.rtmedia-activity-container .flex-video video,#buddypress div.rtmedia-activity-container .flex-video video{position:absolute;top:0;left:0;width:100%;height:100%}.rtmedia-container .row,.rtmedia-activity-container .row,#buddypress div.rtmedia-activity-container .row{max-width:95%}.rtmedia-container .rtmedia-item-title,.rtmedia-activity-container .rtmedia-item-title,#buddypress div.rtmedia-activity-container .rtmedia-item-title{text-align:center}.rtmedia-container .rtmedia-item-title h4,.rtmedia-activity-container .rtmedia-item-title h4,#buddypress div.rtmedia-activity-container .rtmedia-item-title h4{text-overflow:ellipsis;white-space:nowrap;width:100%;overflow:hidden;font-size:1.1em;text-align:center}.rtmedia-container .rtmedia-success,.rtmedia-activity-container .rtmedia-success,#buddypress div.rtmedia-activity-container .rtmedia-success{display:block;padding:10px;border:1px solid #008000;background-color:#90EE90;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.rtmedia-container h2,.rtmedia-activity-container h2,#buddypress div.rtmedia-activity-container h2{font-size:1.4em;font-weight:bold;line-height:2.4em}.rtmedia-container .drag-drop,.rtmedia-activity-container .drag-drop,#buddypress div.rtmedia-activity-container .drag-drop{border:4px dashed #DDD;text-align:center;background:#fafafa;overflow:hidden;padding:15px 0}.rtmedia-container .drag-drop.dragover,.rtmedia-activity-container .drag-drop.dragover,#buddypress div.rtmedia-activity-container .drag-drop.dragover{border-color:#83b4d8}.rtmedia-container .rtmedia-action-update,.rtmedia-activity-container .rtmedia-action-update,#buddypress div.rtmedia-activity-container .rtmedia-action-update{float:left;margin-top:12px;margin-right:10px}.rtmedia-container .rtmedia-list,.rtmedia-activity-container .rtmedia-list,#buddypress div.rtmedia-activity-container .rtmedia-list{list-style:none}.rtmedia-container .rtmedia-list .rtmedia-list-item,.rtmedia-activity-container .rtmedia-list .rtmedia-list-item,#buddypress div.rtmedia-activity-container .rtmedia-list .rtmedia-list-item{word-wrap:break-word;margin:10px;float:left}.rtmedia-container .rtmedia-list .rtmedia-list-item a,.rtmedia-activity-container .rtmedia-list .rtmedia-list-item a,#buddypress div.rtmedia-activity-container .rtmedia-list .rtmedia-list-item a{text-decoration:none}.rtmedia-container .rtmedia-list .rtmedia-list-item a h4,.rtmedia-activity-container .rtmedia-list .rtmedia-list-item a h4,#buddypress div.rtmedia-activity-container .rtmedia-list .rtmedia-list-item a h4{line-height:1.4em;font-size:1.2em;padding-top:10px}.rtmedia-container .rtmedia-media img,.rtmedia-activity-container .rtmedia-media img,#buddypress div.rtmedia-activity-container .rtmedia-media img{max-width:100%}.rtmedia-container .rtmedia-item-thumbnail,.rtmedia-activity-container .rtmedia-item-thumbnail,#buddypress div.rtmedia-activity-container .rtmedia-item-thumbnail{text-align:center}.rtmedia-container .rtmedia-item-thumbnail img,.rtmedia-activity-container .rtmedia-item-thumbnail img,#buddypress div.rtmedia-activity-container .rtmedia-item-thumbnail img{vertical-align:middle}.rtmedia-container .rtmedia_next_prev,.rtmedia-activity-container .rtmedia_next_prev,#buddypress div.rtmedia-activity-container .rtmedia_next_prev{clear:both}.rtmedia-container .rtmedia_next_prev a,.rtmedia-activity-container .rtmedia_next_prev a,#buddypress div.rtmedia-activity-container .rtmedia_next_prev a{display:block;clear:both;background-color:#E9E9E9;padding:10px;text-align:center;text-decoration:none;color:#000;margin:15px}.rtmedia-container .rtmedia-item-comments-container,.rtmedia-activity-container .rtmedia-item-comments-container,#buddypress div.rtmedia-activity-container .rtmedia-item-comments-container{margin:3% 3%}.rtmedia-container .rtmedia-comment,.rtmedia-activity-container .rtmedia-comment,#buddypress div.rtmedia-activity-container .rtmedia-comment{list-style:none;background:#f6f6f6;border:1px solid #ddd;-moz-border-radius:3px;border-radius:3px;margin:5px 0;padding:1px 5px 25px;width:391px;max-width:100%}.rtmedia-container .rtmedia-comment .rtmedia-comment-author,.rtmedia-activity-container .rtmedia-comment .rtmedia-comment-author,#buddypress div.rtmedia-activity-container .rtmedia-comment .rtmedia-comment-author{display:block}.rtmedia-container .rtmedia-comment .rtmedia-comment-content,.rtmedia-activity-container .rtmedia-comment .rtmedia-comment-content,#buddypress div.rtmedia-activity-container .rtmedia-comment .rtmedia-comment-content{display:block}.rtmedia-container .rtmedia-comment .rtmedia-comment-date,.rtmedia-activity-container .rtmedia-comment .rtmedia-comment-date,#buddypress div.rtmedia-activity-container .rtmedia-comment .rtmedia-comment-date{display:block;float:right}.rtmedia-container .rtmedia-bp-header,.rtmedia-activity-container .rtmedia-bp-header,#buddypress div.rtmedia-activity-container .rtmedia-bp-header{width:460px;margin:auto}.rtmedia-container #div-attache-rtmedia,.rtmedia-activity-container #div-attache-rtmedia,#buddypress div.rtmedia-activity-container #div-attache-rtmedia{display:none}.rtmedia-container #rtMedia-update-queue-list p span,.rtmedia-activity-container #rtMedia-update-queue-list p span{margin-right:20px}.rtmedia-container .rtmedia-move-container,.rtmedia-activity-container .rtmedia-move-container,#buddypress div.rtmedia-activity-container .rtmedia-move-container{display:none}.rtmedia-container #rtmedia-add-media-button-post-update,.rtmedia-activity-container #rtmedia-add-media-button-post-update,#buddypress div.rtmedia-activity-container #rtmedia-add-media-button-post-update{float:left;margin-top:10px;margin-right:20px}.rtmedia-container #whats-new-post-in-box,.rtmedia-activity-container #whats-new-post-in-box,#buddypress div.rtmedia-activity-container #whats-new-post-in-box{float:left}.rtmedia-container .rtmedia-activity-text,.rtmedia-activity-container .rtmedia-activity-text,#buddypress div.rtmedia-activity-container .rtmedia-activity-text{display:block;padding-bottom:10px}.rtmedia-container .rtmedia-merge-container,.rtmedia-activity-container .rtmedia-merge-container,#buddypress div.rtmedia-activity-container .rtmedia-merge-container{display:none}.rtmedia-container .rtmedia-create-new-album-container,.rtmedia-activity-container .rtmedia-create-new-album-container,#buddypress div.rtmedia-activity-container .rtmedia-create-new-album-container{display:none}.rtmedia-container select,.rtmedia-activity-container select,#buddypress div.rtmedia-activity-container select{width:auto}.rtmedia-container.rtmedia-single-container .row,.rtmedia-single-container.rtmedia-activity-container .row,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row{background-color:#FFF}.rtmedia-container.rtmedia-single-container .row #rtmedia-single-media-container,.rtmedia-single-container.rtmedia-activity-container .row #rtmedia-single-media-container{padding-top:10px;padding-bottom:10px}.rtmedia-container.rtmedia-single-container .row #rtmedia-single-media-container .rtmedia-media div.mejs-layers div.mejs-poster,.rtmedia-single-container.rtmedia-activity-container .row #rtmedia-single-media-container .rtmedia-media div.mejs-layers div.mejs-poster{overflow:hidden}.rtmedia-container.rtmedia-single-container .row #rtmedia-single-media-container .rtmedia-media .mejs-layers .mejs-overlay-button,.rtmedia-single-container.rtmedia-activity-container .row #rtmedia-single-media-container .rtmedia-media .mejs-layers .mejs-overlay-button{margin:-50px 0 0 -50px}.rtmedia-container.rtmedia-single-container .row #rtmedia-single-media-container .rtmedia-media .mejs-controls .mejs-button button,.rtmedia-single-container.rtmedia-activity-container .row #rtmedia-single-media-container .rtmedia-media .mejs-controls .mejs-button button{cursor:pointer;display:block;font-size:0;line-height:0;text-decoration:none;margin:7px 5px;padding:0;position:absolute;height:16px;width:16px;border:0;background:rgba(0,0,0,0) url("../../../lib/media-element/controls.png") no-repeat}.rtmedia-container.rtmedia-single-container .row #rtmedia-single-media-container .rtmedia-media .mejs-controls .mejs-mute button,.rtmedia-single-container.rtmedia-activity-container .row #rtmedia-single-media-container .rtmedia-media .mejs-controls .mejs-mute button{background-position:-16px -16px}.rtmedia-container.rtmedia-single-container .row #rtmedia-single-media-container .rtmedia-media .mejs-controls .mejs-fullscreen-button button,.rtmedia-single-container.rtmedia-activity-container .row #rtmedia-single-media-container .rtmedia-media .mejs-controls .mejs-fullscreen-button button{background-position:-32px 0}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta{padding:10px}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta div.userprofile,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.userprofile,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.userprofile{float:left;padding:10px}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta div.username,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.username,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta div.username{padding:10px}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta button,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta button,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta button{color:#5E5E5E;background-color:#EBEBEB;background-repeat:repeat-x;background-image:-moz-linear-gradient(top, #f9f9f9, #ebebeb);background-image:-ms-linear-gradient(top, #f9f9f9, #ebebeb);background-image:-webkit-linear-gradient(top, #f9f9f9, #ebebeb);background-image:-o-linear-gradient(top, #f9f9f9, #ebebeb);background-image:linear-gradient(to bottom, #f9f9f9,#ebebeb)}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta>a,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta>a,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta>a{float:left;margin:10px}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta .rtmedia-item-actions>a,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-item-actions>a,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-item-actions>a{display:inline-block;float:left}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta .rtmedia-item-actions>form,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-item-actions>form,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-item-actions>form{float:left;margin-right:5px}.rtmedia-container.rtmedia-single-container .row .rtmedia-single-meta .rtmedia-item-actions .rtmedia-action-buttons span,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-item-actions .rtmedia-action-buttons span,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-single-meta .rtmedia-item-actions .rtmedia-action-buttons span{background:#EEE;-webkit-border-radius:50%;-moz-border-radius:50%;border-radius:50%;border:1px solid #CCC;color:#999;display:inline;font-size:70%;margin-left:2px;margin-right:2px;padding:3px 6px;text-align:center;vertical-align:middle}.rtmedia-container.rtmedia-single-container .row .rtmedia-item-comments,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments{background-color:transparent}.rtmedia-container.rtmedia-single-container .row .rtmedia-item-comments div,.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments div,#buddypress div.rtmedia-single-container.rtmedia-activity-container .row .rtmedia-item-comments div{background-color:transparent}.rtmedia-container #wp-description-editor-tools a.wp-switch-editor,.rtmedia-activity-container #wp-description-editor-tools a.wp-switch-editor{margin:5px 5px 0 0;padding:4px 5px 2px;float:right;cursor:pointer;border:1px solid;border-color:#DFDFDF #DFDFDF #CCC;font:13px/18px Arial,Helvetica,sans-serif normal;height:auto}.rtmedia-container #description_toolbargroup .mceToolbar td,.rtmedia-activity-container #description_toolbargroup .mceToolbar td{padding:0px}.rtmedia-container #wp-description-editor-container,.rtmedia-activity-container #wp-description-editor-container,#buddypress div.rtmedia-activity-container #wp-description-editor-container{border-width:1px;border-style:solid;-webkit-border-top-right-radius:3px;-webkit-border-top-left-radius:3px;border-top-right-radius:3px;border-top-left-radius:3px;border-color:#CCC #CCC #DFDFDF}#buddypress div.rtmedia-activity-container ul.rtmedia-list li{float:left;padding:10px}#buddypress div.rtmedia-activity-container ul.rtmedia-list li .rtmedia-item-thumbnail{overflow:hidden}#buddypress div.rtmedia-activity-container ul.rtmedia-list li.media-type-video{float:none}#buddypress div.rtmedia-activity-container ul.rtmedia-list li.media-type-video .rtmedia-item-thumbnail{margin:0 auto;overflow:hidden}#buddypress div.rtmedia-activity-container ul.rtmedia-list li.media-type-video .rtmedia-item-thumbnail .mejs-overlay-button{margin:-50px 0 0 -50px}#buddypress div.rtmedia-activity-container ul.rtmedia-list li.media-type-video .rtmedia-item-thumbnail .mejs-controls .mejs-button button{cursor:pointer;display:block;font-size:0;line-height:0;text-decoration:none;margin:7px 5px;padding:0;position:absolute;height:16px;width:16px;border:0;background:rgba(0,0,0,0) url("../../../lib/media-element/controls.png") no-repeat}#buddypress div.rtmedia-activity-container ul.rtmedia-list li.media-type-video .rtmedia-item-thumbnail .mejs-controls .mejs-mute button{background-position:-16px -16px}#buddypress div.rtmedia-activity-container ul.rtmedia-list li.media-type-video .rtmedia-item-thumbnail .mejs-controls .mejs-fullscreen-button button{background-position:-32px 0}.mfp-content #rtmedia-single-media-container .rtmedia-media{text-align:center;background-color:#333}.mfp-content #rtmedia-single-media-container .rtmedia-media img{max-height:95%}#rtmedia-action-update{float:left;padding-right:10px}#header{z-index:1 !important}.bp_media_content video{background-color:black}.rtmedia-success{display:block;padding:10px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;background-color:#2ECC71;color:white}.rtmedia-error{color:white;display:block;padding:10px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;background-color:#E74C3C}
|
app/assets/js/admin.js
CHANGED
@@ -481,7 +481,7 @@ jQuery(document).ready(function($){
|
|
481 |
});
|
482 |
|
483 |
|
484 |
-
jQuery("#
|
485 |
autoplay: false,
|
486 |
mousewheel: false,
|
487 |
defaultTab: manageHash()
|
@@ -524,15 +524,12 @@ jQuery(document).ready(function($){
|
|
524 |
window.location.hash = hash.substring(1,hash.length);
|
525 |
});
|
526 |
function manageHash() {
|
527 |
-
if(window.location.hash===undefined || window.location.hash==='')
|
528 |
-
window.location.hash = 'rtmedia-general';
|
529 |
-
|
530 |
|
531 |
hash = window.location.hash;
|
532 |
$('#tab-'+hash.substr(1,hash.length)).click();
|
533 |
if($('#tab-'+hash.substr(1,hash.length)).length < 1)
|
534 |
return 1;
|
535 |
-
return $('#tab-'+hash.substr(1,hash.length)).parent().index()+1
|
536 |
}
|
537 |
|
538 |
$(window).hashchange(function(e,data) {
|
481 |
});
|
482 |
|
483 |
|
484 |
+
jQuery("#rtm-settings-tabs,#rtm-addons").sliderTabs({
|
485 |
autoplay: false,
|
486 |
mousewheel: false,
|
487 |
defaultTab: manageHash()
|
524 |
window.location.hash = hash.substring(1,hash.length);
|
525 |
});
|
526 |
function manageHash() {
|
|
|
|
|
|
|
527 |
|
528 |
hash = window.location.hash;
|
529 |
$('#tab-'+hash.substr(1,hash.length)).click();
|
530 |
if($('#tab-'+hash.substr(1,hash.length)).length < 1)
|
531 |
return 1;
|
532 |
+
return $('#tab-'+hash.substr(1,hash.length)).parent().index()+1;
|
533 |
}
|
534 |
|
535 |
$(window).hashchange(function(e,data) {
|
app/assets/js/rtMedia.backbone.js
CHANGED
@@ -13,7 +13,7 @@ jQuery(function($) {
|
|
13 |
|
14 |
rtMedia.Context = Backbone.Model.extend({
|
15 |
url: function() {
|
16 |
-
var url = "
|
17 |
if (!upload_sync && nextpage > 0)
|
18 |
url += 'pg/' + nextpage + '/'
|
19 |
return url;
|
@@ -57,8 +57,8 @@ jQuery(function($) {
|
|
57 |
url: function() {
|
58 |
var temp = window.location.pathname;
|
59 |
var url = '';
|
60 |
-
if (temp.indexOf(
|
61 |
-
url = '
|
62 |
} else {
|
63 |
if (temp.indexOf('pg/') == -1)
|
64 |
url = temp;
|
@@ -72,12 +72,19 @@ jQuery(function($) {
|
|
72 |
}
|
73 |
return url;
|
74 |
},
|
75 |
-
getNext: function(page) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
this.fetch({
|
77 |
-
data:
|
78 |
-
json: true,
|
79 |
-
rtmedia_page: nextpage
|
80 |
-
},
|
81 |
success: function(model, response) {
|
82 |
nextpage = response.next;
|
83 |
var galleryViewObj = new rtMedia.GalleryView({
|
@@ -176,16 +183,15 @@ jQuery(function($) {
|
|
176 |
$(document).on("click", "#rtMedia-galary-next", function(e) {
|
177 |
$(this).hide();
|
178 |
e.preventDefault();
|
179 |
-
|
180 |
-
galleryObj.getNext(nextpage);
|
181 |
});
|
182 |
});
|
183 |
|
184 |
|
185 |
|
186 |
|
187 |
-
if (window.location.pathname.indexOf(
|
188 |
-
var tempNext = window.location.pathname.substring(window.location.pathname.lastIndexOf("
|
189 |
if (isNaN(tempNext) === false) {
|
190 |
nextpage = parseInt(tempNext) + 1;
|
191 |
}
|
@@ -561,4 +567,4 @@ jQuery(document).ready(function($) {
|
|
561 |
$(this).attr("accept", $(this).attr("accept") + ';capture=camera');
|
562 |
|
563 |
});
|
564 |
-
});
|
13 |
|
14 |
rtMedia.Context = Backbone.Model.extend({
|
15 |
url: function() {
|
16 |
+
var url = rtmedia_media_slug + "/";
|
17 |
if (!upload_sync && nextpage > 0)
|
18 |
url += 'pg/' + nextpage + '/'
|
19 |
return url;
|
57 |
url: function() {
|
58 |
var temp = window.location.pathname;
|
59 |
var url = '';
|
60 |
+
if (temp.indexOf(rtmedia_media_slug) == -1) {
|
61 |
+
url = rtmedia_media_slug + '/';
|
62 |
} else {
|
63 |
if (temp.indexOf('pg/') == -1)
|
64 |
url = temp;
|
72 |
}
|
73 |
return url;
|
74 |
},
|
75 |
+
getNext: function(page, el) {
|
76 |
+
var query = {
|
77 |
+
json: true,
|
78 |
+
rtmedia_page: nextpage
|
79 |
+
};
|
80 |
+
|
81 |
+
if (el != undefined) {
|
82 |
+
$(el).children("input[type=hidden]").each(function(e) {
|
83 |
+
query[$(this).attr("name")] = $(this).val();
|
84 |
+
});
|
85 |
+
}
|
86 |
this.fetch({
|
87 |
+
data: query,
|
|
|
|
|
|
|
88 |
success: function(model, response) {
|
89 |
nextpage = response.next;
|
90 |
var galleryViewObj = new rtMedia.GalleryView({
|
183 |
$(document).on("click", "#rtMedia-galary-next", function(e) {
|
184 |
$(this).hide();
|
185 |
e.preventDefault();
|
186 |
+
galleryObj.getNext(nextpage, $(this).parent().parent().parent());
|
|
|
187 |
});
|
188 |
});
|
189 |
|
190 |
|
191 |
|
192 |
|
193 |
+
if (window.location.pathname.indexOf(rtmedia_media_slug) != -1) {
|
194 |
+
var tempNext = window.location.pathname.substring(window.location.pathname.lastIndexOf("pg/") + 5, window.location.pathname.lastIndexOf("/"));
|
195 |
if (isNaN(tempNext) === false) {
|
196 |
nextpage = parseInt(tempNext) + 1;
|
197 |
}
|
567 |
$(this).attr("accept", $(this).attr("accept") + ';capture=camera');
|
568 |
|
569 |
});
|
570 |
+
});
|
app/assets/js/rtMedia.js
CHANGED
@@ -11,61 +11,59 @@ jQuery('document').ready(function($) {
|
|
11 |
|
12 |
})
|
13 |
|
14 |
-
if (jQuery('.wp-audio-shortcode, .wp-video-shortcode').length > 0)
|
15 |
-
jQuery('.wp-audio-shortcode, .wp-video-shortcode').mediaelementplayer();
|
16 |
//Remove title from popup duplication
|
17 |
-
$("li.rtmedia-list-item p a").each(function(e){
|
18 |
$(this).addClass("no-popup");
|
19 |
})
|
20 |
-
//rtmedia_lightbox_enabled from setting
|
21 |
-
if(typeof(rtmedia_lightbox_enabled) != 'undefined' &&
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
}
|
39 |
-
},
|
40 |
-
disableOn: function() {
|
41 |
-
if (jQuery(window).width() < 600) {
|
42 |
-
return false;
|
43 |
-
}
|
44 |
-
return true;
|
45 |
-
},
|
46 |
-
callbacks: {
|
47 |
-
ajaxContentAdded: function() {
|
48 |
-
|
49 |
-
$container = this.content.find('.tagcontainer');
|
50 |
-
if ($container.length > 0) {
|
51 |
-
$context = $container.find('img');
|
52 |
-
$container.find('.tagcontainer').css(
|
53 |
-
{
|
54 |
-
'height': $context.css('height'),
|
55 |
-
'width': $context.css('width')
|
56 |
-
});
|
57 |
-
|
58 |
}
|
59 |
},
|
60 |
-
|
61 |
-
|
|
|
|
|
|
|
62 |
},
|
63 |
-
|
64 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
}
|
66 |
-
}
|
67 |
-
}
|
68 |
-
}
|
69 |
|
70 |
jQuery('.rtmedia-container').on('click', '.select-all', function(e) {
|
71 |
e.preventDefault();
|
@@ -142,3 +140,7 @@ if(typeof(rtmedia_lightbox_enabled) != 'undefined' && rtmedia_lightbox_enabled
|
|
142 |
|
143 |
});
|
144 |
|
|
|
|
|
|
|
|
11 |
|
12 |
})
|
13 |
|
|
|
|
|
14 |
//Remove title from popup duplication
|
15 |
+
$("li.rtmedia-list-item p a").each(function(e) {
|
16 |
$(this).addClass("no-popup");
|
17 |
})
|
18 |
+
//rtmedia_lightbox_enabled from setting
|
19 |
+
if (typeof(rtmedia_lightbox_enabled) != 'undefined' && rtmedia_lightbox_enabled == "1") {
|
20 |
+
rtMagnificPopup = jQuery('.rtmedia-list-media, .rtmedia-activity-container ul.rtmedia-list, #bp-media-list,.widget-item-listing,.bp-media-sc-list, li.media.album_updated ul,ul.bp-media-list-media, li.activity-item div.activity-content div.activity-inner div.bp_media_content').magnificPopup({
|
21 |
+
delegate: 'a:not(".no-popup")',
|
22 |
+
type: 'ajax',
|
23 |
+
tLoading: 'Loading image #%curr%...',
|
24 |
+
mainClass: 'mfp-img-mobile',
|
25 |
+
preload: [1, 3],
|
26 |
+
closeOnBgClick: false,
|
27 |
+
gallery: {
|
28 |
+
enabled: true,
|
29 |
+
navigateByImgClick: true,
|
30 |
+
preload: [0, 1] // Will preload 0 - before current, and 1 after the current image
|
31 |
+
},
|
32 |
+
image: {
|
33 |
+
tError: '<a href="%url%">The image #%curr%</a> could not be loaded.',
|
34 |
+
titleSrc: function(item) {
|
35 |
+
return item.el.attr('title') + '<small>by Marsel Van Oosten</small>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
}
|
37 |
},
|
38 |
+
disableOn: function() {
|
39 |
+
if (jQuery(window).width() < 600) {
|
40 |
+
return false;
|
41 |
+
}
|
42 |
+
return true;
|
43 |
},
|
44 |
+
callbacks: {
|
45 |
+
ajaxContentAdded: function() {
|
46 |
+
|
47 |
+
$container = this.content.find('.tagcontainer');
|
48 |
+
if ($container.length > 0) {
|
49 |
+
$context = $container.find('img');
|
50 |
+
$container.find('.tagcontainer').css(
|
51 |
+
{
|
52 |
+
'height': $context.css('height'),
|
53 |
+
'width': $context.css('width')
|
54 |
+
});
|
55 |
+
|
56 |
+
}
|
57 |
+
},
|
58 |
+
close: function(e) {
|
59 |
+
console.log(e);
|
60 |
+
},
|
61 |
+
BeforeChange: function(e) {
|
62 |
+
console.log(e);
|
63 |
+
}
|
64 |
}
|
65 |
+
});
|
66 |
+
}
|
|
|
67 |
|
68 |
jQuery('.rtmedia-container').on('click', '.select-all', function(e) {
|
69 |
e.preventDefault();
|
140 |
|
141 |
});
|
142 |
|
143 |
+
//Legacy media element for old activities
|
144 |
+
function bp_media_create_element(id) {
|
145 |
+
return false;
|
146 |
+
}
|
app/assets/sass/main.scss
CHANGED
@@ -57,8 +57,8 @@
|
|
57 |
list-style: none;
|
58 |
.rtmedia-list-item {
|
59 |
word-wrap: break-word;
|
60 |
-
|
61 |
-
|
62 |
a {
|
63 |
text-decoration:none;
|
64 |
h4 {
|
@@ -168,9 +168,17 @@
|
|
168 |
padding-top: 10px;
|
169 |
padding-bottom: 10px;
|
170 |
.rtmedia-media{
|
171 |
-
.mejs-
|
|
|
|
|
|
|
|
|
|
|
172 |
margin: -50px 0 0 -50px;
|
173 |
}
|
|
|
|
|
|
|
174 |
.mejs-controls .mejs-button button {
|
175 |
cursor: pointer;
|
176 |
display: block;
|
@@ -194,6 +202,15 @@
|
|
194 |
}
|
195 |
}
|
196 |
.rtmedia-single-meta{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
padding: 10px;
|
198 |
button{
|
199 |
color: #5E5E5E;
|
@@ -282,11 +299,16 @@
|
|
282 |
li{
|
283 |
float:left;
|
284 |
padding:10px;
|
|
|
|
|
|
|
|
|
285 |
&.media-type-video{
|
286 |
float:none;
|
287 |
.rtmedia-item-thumbnail{
|
288 |
margin : 0 auto;
|
289 |
-
|
|
|
290 |
margin: -50px 0 0 -50px;
|
291 |
}
|
292 |
.mejs-controls .mejs-button button {
|
@@ -317,6 +339,18 @@
|
|
317 |
}
|
318 |
}
|
319 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
320 |
|
321 |
#rtmedia-action-update{
|
322 |
float: left;
|
57 |
list-style: none;
|
58 |
.rtmedia-list-item {
|
59 |
word-wrap: break-word;
|
60 |
+
margin:10px;
|
61 |
+
float:left;
|
62 |
a {
|
63 |
text-decoration:none;
|
64 |
h4 {
|
168 |
padding-top: 10px;
|
169 |
padding-bottom: 10px;
|
170 |
.rtmedia-media{
|
171 |
+
div.mejs-layers{
|
172 |
+
div.mejs-poster{
|
173 |
+
overflow: hidden
|
174 |
+
}
|
175 |
+
}
|
176 |
+
.mejs-layers .mejs-overlay-button{
|
177 |
margin: -50px 0 0 -50px;
|
178 |
}
|
179 |
+
.mejs-layers .mejs-poster {
|
180 |
+
overflow: hidden;
|
181 |
+
}
|
182 |
.mejs-controls .mejs-button button {
|
183 |
cursor: pointer;
|
184 |
display: block;
|
202 |
}
|
203 |
}
|
204 |
.rtmedia-single-meta{
|
205 |
+
div{
|
206 |
+
&.userprofile{
|
207 |
+
float: left;
|
208 |
+
padding: 10px;
|
209 |
+
}
|
210 |
+
&.username{
|
211 |
+
padding: 10px;
|
212 |
+
}
|
213 |
+
}
|
214 |
padding: 10px;
|
215 |
button{
|
216 |
color: #5E5E5E;
|
299 |
li{
|
300 |
float:left;
|
301 |
padding:10px;
|
302 |
+
.rtmedia-item-thumbnail{
|
303 |
+
overflow:hidden;
|
304 |
+
}
|
305 |
+
|
306 |
&.media-type-video{
|
307 |
float:none;
|
308 |
.rtmedia-item-thumbnail{
|
309 |
margin : 0 auto;
|
310 |
+
overflow:hidden;
|
311 |
+
.mejs-overlay-button{
|
312 |
margin: -50px 0 0 -50px;
|
313 |
}
|
314 |
.mejs-controls .mejs-button button {
|
339 |
}
|
340 |
}
|
341 |
}
|
342 |
+
.mfp-content{
|
343 |
+
#rtmedia-single-media-container{
|
344 |
+
.rtmedia-media{
|
345 |
+
text-align: center;
|
346 |
+
background-color: #333;
|
347 |
+
img{
|
348 |
+
max-height: 95%;
|
349 |
+
}
|
350 |
+
}
|
351 |
+
}
|
352 |
+
}
|
353 |
+
|
354 |
|
355 |
#rtmedia-action-update{
|
356 |
float: left;
|
app/helper/RTMediaAddon.php
CHANGED
@@ -50,13 +50,13 @@ if (!class_exists('RTMediaAddon')) {
|
|
50 |
$tabs[] = array(
|
51 |
'title' => 'Audio/Video Encoding',
|
52 |
'name' => __('Audio/Video Encoding', 'rtmedia'),
|
53 |
-
'href' => '#
|
54 |
'callback' => array($rtmedia_admin->rtmedia_encoding, 'encoding_service_intro')
|
55 |
);
|
56 |
$tabs[] = array(
|
57 |
'title' => 'Plugins',
|
58 |
'name' => __('Plugins', 'rtmedia'),
|
59 |
-
'href' => '#
|
60 |
'callback' => array($this, 'plugins_content')
|
61 |
);
|
62 |
|
@@ -68,11 +68,11 @@ if (!class_exists('RTMediaAddon')) {
|
|
68 |
);*/
|
69 |
|
70 |
?>
|
71 |
-
<div id="
|
72 |
<ul>
|
73 |
<?php
|
74 |
foreach ($tabs as $tab) {?>
|
75 |
-
<li><a title="<?php echo $tab['title'] ?>" href="<?php echo $tab['href']; ?>"><?php echo $tab['name']; ?></a></li>
|
76 |
<?php }
|
77 |
?>
|
78 |
</ul>
|
50 |
$tabs[] = array(
|
51 |
'title' => 'Audio/Video Encoding',
|
52 |
'name' => __('Audio/Video Encoding', 'rtmedia'),
|
53 |
+
'href' => '#rtm-services',
|
54 |
'callback' => array($rtmedia_admin->rtmedia_encoding, 'encoding_service_intro')
|
55 |
);
|
56 |
$tabs[] = array(
|
57 |
'title' => 'Plugins',
|
58 |
'name' => __('Plugins', 'rtmedia'),
|
59 |
+
'href' => '#rtm-plugins',
|
60 |
'callback' => array($this, 'plugins_content')
|
61 |
);
|
62 |
|
68 |
);*/
|
69 |
|
70 |
?>
|
71 |
+
<div id="rtm-addons">
|
72 |
<ul>
|
73 |
<?php
|
74 |
foreach ($tabs as $tab) {?>
|
75 |
+
<li><a id="tab-<?php echo substr ( $tab[ 'href' ], 1 ); ?>" title="<?php echo $tab['title'] ?>" href="<?php echo $tab['href']; ?>" class="rtmedia-tab-title"><?php echo $tab['name']; ?></a></li>
|
76 |
<?php }
|
77 |
?>
|
78 |
</ul>
|
app/helper/db/RTDBUpdate.php
CHANGED
@@ -6,6 +6,7 @@
|
|
6 |
* @author faishal
|
7 |
*/
|
8 |
class RTDBUpdate {
|
|
|
9 |
/**
|
10 |
*
|
11 |
* @var type String
|
@@ -21,67 +22,70 @@ class RTDBUpdate {
|
|
21 |
*
|
22 |
* @param type string $current_version Optional if not defined then will use plugin version
|
23 |
*/
|
24 |
-
public function __construct($current_version = false) {
|
25 |
-
$this->rt_plugin_info = new rt_plugin_info(RTMEDIA_PATH.'index.php');
|
26 |
-
if ($current_version == false) {
|
27 |
-
|
28 |
}
|
|
|
|
|
29 |
$this->db_version = $current_version;
|
30 |
-
$this->db_version_option_name = $this->get_db_version_option_name();
|
31 |
-
$this->install_db_version = $this->get_install_db_version();
|
32 |
}
|
33 |
|
34 |
-
public function create_table($sql) {
|
35 |
require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
|
36 |
-
dbDelta($sql);
|
37 |
}
|
38 |
|
39 |
-
public function get_db_version_option_name() {
|
40 |
-
return strtoupper("RT_" . str_replace("-", "_", sanitize_title($this->rt_plugin_info->name)) . "_DB_VERSIONS");
|
41 |
}
|
42 |
|
43 |
-
public function get_install_db_version() {
|
44 |
-
return get_site_option($this->db_version_option_name, "0.0");
|
45 |
}
|
46 |
|
47 |
-
public function check_upgrade() {
|
48 |
-
return version_compare($this->db_version, $this->install_db_version, '>');
|
49 |
}
|
50 |
|
51 |
-
public function do_upgrade() {
|
52 |
-
if (version_compare($this->db_version, $this->install_db_version, '>')) {
|
53 |
-
do_action("rt_db_upgrade");
|
54 |
-
$path = realpath(dirname(__FILE__) . $this->schema_path);
|
55 |
-
if ($handle = opendir($path)) {
|
56 |
-
while (false !== ($entry = readdir($handle))) {
|
57 |
-
if ($entry != "." && $entry != "..") {
|
58 |
-
if (strpos($entry, ".schema") !== false && file_exists($path . "/" . $entry)) {
|
59 |
-
$this->create_table($this->genrate_sql($entry, file_get_contents($path . "/" . $entry)));
|
60 |
}
|
61 |
}
|
62 |
}
|
63 |
-
closedir($handle);
|
64 |
}
|
65 |
-
update_site_option($this->db_version_option_name, $this->db_version);
|
66 |
}
|
67 |
}
|
68 |
-
|
|
|
69 |
global $wpdb;
|
70 |
|
71 |
-
if ($wpdb->query("SHOW TABLES LIKE '" . $table . "'") == 1) {
|
72 |
return true;
|
73 |
}
|
74 |
|
75 |
return false;
|
76 |
}
|
77 |
|
78 |
-
public function genrate_sql($file_name, $file_content) {
|
79 |
-
return sprintf($file_content, $this->genrate_table_name($file_name));
|
80 |
}
|
81 |
|
82 |
-
public function genrate_table_name($file_name) {
|
83 |
global $wpdb;
|
84 |
-
return $wpdb->prefix . "rt_" . str_replace(".schema", "", strtolower($file_name));
|
85 |
}
|
86 |
|
87 |
}
|
6 |
* @author faishal
|
7 |
*/
|
8 |
class RTDBUpdate {
|
9 |
+
|
10 |
/**
|
11 |
*
|
12 |
* @var type String
|
22 |
*
|
23 |
* @param type string $current_version Optional if not defined then will use plugin version
|
24 |
*/
|
25 |
+
public function __construct ( $current_version = false ) {
|
26 |
+
$this->rt_plugin_info = new rt_plugin_info ( RTMEDIA_PATH . 'index.php' );
|
27 |
+
if ( $current_version == false ) {
|
28 |
+
$current_version = $this->rt_plugin_info->version;
|
29 |
}
|
30 |
+
|
31 |
+
|
32 |
$this->db_version = $current_version;
|
33 |
+
$this->db_version_option_name = $this->get_db_version_option_name ();
|
34 |
+
$this->install_db_version = $this->get_install_db_version ();
|
35 |
}
|
36 |
|
37 |
+
public function create_table ( $sql ) {
|
38 |
require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
|
39 |
+
dbDelta ( $sql );
|
40 |
}
|
41 |
|
42 |
+
public function get_db_version_option_name () {
|
43 |
+
return strtoupper ( "RT_" . str_replace ( "-", "_", sanitize_title ( $this->rt_plugin_info->name ) ) . "_DB_VERSIONS" );
|
44 |
}
|
45 |
|
46 |
+
public function get_install_db_version () {
|
47 |
+
return get_site_option ( $this->db_version_option_name, "0.0" );
|
48 |
}
|
49 |
|
50 |
+
public function check_upgrade () {
|
51 |
+
return version_compare ( $this->db_version, $this->install_db_version, '>' );
|
52 |
}
|
53 |
|
54 |
+
public function do_upgrade () {
|
55 |
+
if ( version_compare ( $this->db_version, $this->install_db_version, '>' ) ) {
|
56 |
+
do_action ( "rt_db_upgrade" );
|
57 |
+
$path = realpath ( dirname ( __FILE__ ) . $this->schema_path );
|
58 |
+
if ( $handle = opendir ( $path ) ) {
|
59 |
+
while ( false !== ($entry = readdir ( $handle )) ) {
|
60 |
+
if ( $entry != "." && $entry != ".." ) {
|
61 |
+
if ( strpos ( $entry, ".schema" ) !== false && file_exists ( $path . "/" . $entry ) ) {
|
62 |
+
$this->create_table ( $this->genrate_sql ( $entry, file_get_contents ( $path . "/" . $entry ) ) );
|
63 |
}
|
64 |
}
|
65 |
}
|
66 |
+
closedir ( $handle );
|
67 |
}
|
68 |
+
update_site_option ( $this->db_version_option_name, $this->db_version );
|
69 |
}
|
70 |
}
|
71 |
+
|
72 |
+
static function table_exists ( $table ) {
|
73 |
global $wpdb;
|
74 |
|
75 |
+
if ( $wpdb->query ( "SHOW TABLES LIKE '" . $table . "'" ) == 1 ) {
|
76 |
return true;
|
77 |
}
|
78 |
|
79 |
return false;
|
80 |
}
|
81 |
|
82 |
+
public function genrate_sql ( $file_name, $file_content ) {
|
83 |
+
return sprintf ( $file_content, $this->genrate_table_name ( $file_name ) );
|
84 |
}
|
85 |
|
86 |
+
public function genrate_table_name ( $file_name ) {
|
87 |
global $wpdb;
|
88 |
+
return $wpdb->prefix . "rt_" . str_replace ( ".schema", "", strtolower ( $file_name ) );
|
89 |
}
|
90 |
|
91 |
}
|
app/main/RTMedia.php
CHANGED
@@ -18,6 +18,8 @@ if ( ! defined ( 'ABSPATH' ) )
|
|
18 |
* @author Joshua Abenazer <joshua.abenazer@rtcamp.com>
|
19 |
*/
|
20 |
class RTMedia {
|
|
|
|
|
21 |
|
22 |
/**
|
23 |
* @var string default thumbnail url fallback for all media types
|
@@ -103,7 +105,7 @@ class RTMedia {
|
|
103 |
add_action ( 'wp_enqueue_scripts', array( 'RTMediaGalleryShortcode', 'register_scripts' ) );
|
104 |
//add_action('wp_footer', array('RTMediaGalleryShortcode', 'print_script'));
|
105 |
// Enqueue Plugin Scripts and Styles
|
106 |
-
add_action ( 'wp_enqueue_scripts', array(
|
107 |
|
108 |
|
109 |
add_action ( 'rt_db_upgrade', array( $this, 'fix_parent_id' ) );
|
@@ -166,19 +168,24 @@ class RTMedia {
|
|
166 |
add_image_size ( "rt_media_activity_image", $bp_media_sizes[ 'activity' ][ "width" ], $bp_media_sizes[ 'activity' ][ "height" ], $bp_media_sizes[ 'activity' ][ "crop" ] );
|
167 |
add_image_size ( "rt_media_single_image", $bp_media_sizes[ 'single' ][ "width" ], $bp_media_sizes[ 'single' ][ "height" ], $bp_media_sizes[ 'single' ][ "crop" ] );
|
168 |
add_image_size ( "rt_media_featured_image", $bp_media_sizes[ 'featured' ][ "width" ], $bp_media_sizes[ 'featured' ][ "height" ], $bp_media_sizes[ 'featured' ][ "crop" ] );
|
169 |
-
add_action ( '
|
170 |
}
|
171 |
|
172 |
function custome_style_for_activity_image_size () {
|
173 |
?>
|
174 |
<style>
|
175 |
-
.rtmedia-activity-container .rtmedia-list .rtmedia-item-thumbnail{
|
176 |
max-width: <?php echo $this->options[ "defaultSizes_photo_medium_width" ]; ?>px;
|
177 |
max-height: <?php echo $this->options[ "defaultSizes_photo_medium_height" ]; ?>px;
|
178 |
}
|
179 |
-
.rtmedia-container .rtmedia-list
|
180 |
-
|
181 |
-
|
|
|
|
|
|
|
|
|
|
|
182 |
}
|
183 |
</style>
|
184 |
<?php
|
@@ -422,9 +429,6 @@ class RTMedia {
|
|
422 |
if ( ! defined ( 'RTMEDIA_IS_INSTALLED' ) )
|
423 |
define ( 'RTMEDIA_IS_INSTALLED', 1 );
|
424 |
|
425 |
-
/* Current Version. */
|
426 |
-
if ( ! defined ( 'RTMEDIA_VERSION' ) )
|
427 |
-
define ( 'RTMEDIA_VERSION', '3.0.0' );
|
428 |
|
429 |
/* Required Version */
|
430 |
if ( ! defined ( 'RTMEDIA_REQUIRED_BP' ) )
|
@@ -683,6 +687,11 @@ class RTMedia {
|
|
683 |
function update_db () {
|
684 |
$rtMigration = new RTMediaMigration();
|
685 |
$update = new RTDBUpdate();
|
|
|
|
|
|
|
|
|
|
|
686 |
if ( $update->check_upgrade () ) {
|
687 |
$update->do_upgrade ();
|
688 |
} else {
|
@@ -702,13 +711,22 @@ class RTMedia {
|
|
702 |
}
|
703 |
|
704 |
function enqueue_scripts_styles () {
|
705 |
-
|
706 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
707 |
wp_enqueue_style ( 'rtmedia-main', RTMEDIA_URL . 'app/assets/css/main.css', '', RTMEDIA_VERSION );
|
708 |
-
wp_enqueue_script ( 'rtmedia-main', RTMEDIA_URL . 'app/assets/js/rtMedia.js', array( 'jquery', '
|
709 |
wp_enqueue_style ( 'rtmedia-magnific', RTMEDIA_URL . 'lib/magnific/magnific.css', '', RTMEDIA_VERSION );
|
710 |
wp_enqueue_script ( 'rtmedia-magnific', RTMEDIA_URL . 'lib/magnific/magnific.js', '', RTMEDIA_VERSION );
|
711 |
wp_localize_script ( 'rtmedia-main', 'rtmedia_ajax_url', admin_url ( 'admin-ajax.php' ) );
|
|
|
712 |
wp_localize_script ( 'rtmedia-main', 'rtmedia_lightbox_enabled', strval ( $this->options[ "general_enableLightbox" ] ) );
|
713 |
}
|
714 |
|
@@ -807,9 +825,10 @@ function get_rtmedia_permalink ( $id ) {
|
|
807 |
if ( isset ( $rtmedia_query->query ) && isset ( $rtmedia_query->query[ "context" ] ) && $rtmedia_query->query[ "context" ] == "group" ) {
|
808 |
$parent_link = get_rtmedia_group_link ( $rtmedia_query->query[ "context_id" ] );
|
809 |
} else {
|
810 |
-
if ( ! isset ( $media[ 0 ]->context ) ) {
|
811 |
-
|
812 |
-
}
|
|
|
813 |
$parent_link = get_rtmedia_user_link ( $media[ 0 ]->media_author );
|
814 |
}
|
815 |
}
|
@@ -850,6 +869,61 @@ function rtmedia_get_site_option ( $option_name, $default = false ) {
|
|
850 |
return $return_val;
|
851 |
}
|
852 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
853 |
/**
|
854 |
* This wraps up the main rtMedia class. Three important notes:
|
855 |
*
|
18 |
* @author Joshua Abenazer <joshua.abenazer@rtcamp.com>
|
19 |
*/
|
20 |
class RTMedia {
|
21 |
+
//update wp_rt_rtm_media r join wp_posts p on p.ID = r.media_id set r.`context` = 'profile', r.context_id = r.media_author
|
22 |
+
//where r.context is NULL and p.guid like '%user%'
|
23 |
|
24 |
/**
|
25 |
* @var string default thumbnail url fallback for all media types
|
105 |
add_action ( 'wp_enqueue_scripts', array( 'RTMediaGalleryShortcode', 'register_scripts' ) );
|
106 |
//add_action('wp_footer', array('RTMediaGalleryShortcode', 'print_script'));
|
107 |
// Enqueue Plugin Scripts and Styles
|
108 |
+
add_action ( 'wp_enqueue_scripts', array( &$this, 'enqueue_scripts_styles' ), 999 );
|
109 |
|
110 |
|
111 |
add_action ( 'rt_db_upgrade', array( $this, 'fix_parent_id' ) );
|
168 |
add_image_size ( "rt_media_activity_image", $bp_media_sizes[ 'activity' ][ "width" ], $bp_media_sizes[ 'activity' ][ "height" ], $bp_media_sizes[ 'activity' ][ "crop" ] );
|
169 |
add_image_size ( "rt_media_single_image", $bp_media_sizes[ 'single' ][ "width" ], $bp_media_sizes[ 'single' ][ "height" ], $bp_media_sizes[ 'single' ][ "crop" ] );
|
170 |
add_image_size ( "rt_media_featured_image", $bp_media_sizes[ 'featured' ][ "width" ], $bp_media_sizes[ 'featured' ][ "height" ], $bp_media_sizes[ 'featured' ][ "crop" ] );
|
171 |
+
add_action ( 'wp_head', array( &$this, 'custome_style_for_activity_image_size' ) );
|
172 |
}
|
173 |
|
174 |
function custome_style_for_activity_image_size () {
|
175 |
?>
|
176 |
<style>
|
177 |
+
.rtmedia-activity-container .rtmedia-list .rtmedia-item-thumbnail,.bp_media_content img{
|
178 |
max-width: <?php echo $this->options[ "defaultSizes_photo_medium_width" ]; ?>px;
|
179 |
max-height: <?php echo $this->options[ "defaultSizes_photo_medium_height" ]; ?>px;
|
180 |
}
|
181 |
+
.rtmedia-container ul.rtmedia-list li.rtmedia-list-item div.rtmedia-item-thumbnail {
|
182 |
+
width: <?php echo $this->options[ "defaultSizes_photo_thumbnail_width" ]; ?>px;
|
183 |
+
height: <?php echo $this->options[ "defaultSizes_photo_thumbnail_height" ]; ?>px;
|
184 |
+
line-height: <?php echo $this->options[ "defaultSizes_photo_thumbnail_height" ]; ?>px;
|
185 |
+
}
|
186 |
+
.rtmedia-container .rtmedia-list .rtmedia-list-item {
|
187 |
+
width: <?php echo intval ( $this->options[ "defaultSizes_photo_thumbnail_width" ] ) + 20; ?>px;
|
188 |
+
height: <?php echo intval ( $this->options[ "defaultSizes_photo_thumbnail_height" ] ) + 20; ?>px;
|
189 |
}
|
190 |
</style>
|
191 |
<?php
|
429 |
if ( ! defined ( 'RTMEDIA_IS_INSTALLED' ) )
|
430 |
define ( 'RTMEDIA_IS_INSTALLED', 1 );
|
431 |
|
|
|
|
|
|
|
432 |
|
433 |
/* Required Version */
|
434 |
if ( ! defined ( 'RTMEDIA_REQUIRED_BP' ) )
|
687 |
function update_db () {
|
688 |
$rtMigration = new RTMediaMigration();
|
689 |
$update = new RTDBUpdate();
|
690 |
+
/* Current Version. */
|
691 |
+
if ( ! defined ( 'RTMEDIA_VERSION' ) )
|
692 |
+
define ( 'RTMEDIA_VERSION', $update->db_version );
|
693 |
+
|
694 |
+
|
695 |
if ( $update->check_upgrade () ) {
|
696 |
$update->do_upgrade ();
|
697 |
} else {
|
711 |
}
|
712 |
|
713 |
function enqueue_scripts_styles () {
|
714 |
+
|
715 |
+
if ( wp_script_is ( "wp-mediaelement", "registered" ) ) {
|
716 |
+
wp_enqueue_style ( 'wp-mediaelement' );
|
717 |
+
wp_enqueue_script ( 'wp-mediaelement' );
|
718 |
+
} else {
|
719 |
+
wp_enqueue_script ( 'wp-mediaelement', RTMEDIA_URL . 'lib/media-element/mediaelement-and-player.min.js', '', RTMEDIA_VERSION );
|
720 |
+
wp_enqueue_style ( 'wp-mediaelement', RTMEDIA_URL . 'lib/media-element/mediaelementplayer.min.css', '', RTMEDIA_VERSION );
|
721 |
+
wp_enqueue_script ( 'wp-mediaelement-start', RTMEDIA_URL . 'lib/media-element/wp-mediaelement.js', 'wp-mediaelement', RTMEDIA_VERSION, true );
|
722 |
+
}
|
723 |
+
|
724 |
wp_enqueue_style ( 'rtmedia-main', RTMEDIA_URL . 'app/assets/css/main.css', '', RTMEDIA_VERSION );
|
725 |
+
wp_enqueue_script ( 'rtmedia-main', RTMEDIA_URL . 'app/assets/js/rtMedia.js', array( 'jquery', 'wp-mediaelement' ), RTMEDIA_VERSION );
|
726 |
wp_enqueue_style ( 'rtmedia-magnific', RTMEDIA_URL . 'lib/magnific/magnific.css', '', RTMEDIA_VERSION );
|
727 |
wp_enqueue_script ( 'rtmedia-magnific', RTMEDIA_URL . 'lib/magnific/magnific.js', '', RTMEDIA_VERSION );
|
728 |
wp_localize_script ( 'rtmedia-main', 'rtmedia_ajax_url', admin_url ( 'admin-ajax.php' ) );
|
729 |
+
wp_localize_script ( 'rtmedia-main', 'rtmedia_media_slug', RTMEDIA_MEDIA_SLUG );
|
730 |
wp_localize_script ( 'rtmedia-main', 'rtmedia_lightbox_enabled', strval ( $this->options[ "general_enableLightbox" ] ) );
|
731 |
}
|
732 |
|
825 |
if ( isset ( $rtmedia_query->query ) && isset ( $rtmedia_query->query[ "context" ] ) && $rtmedia_query->query[ "context" ] == "group" ) {
|
826 |
$parent_link = get_rtmedia_group_link ( $rtmedia_query->query[ "context_id" ] );
|
827 |
} else {
|
828 |
+
//if ( ! isset ( $media[ 0 ]->context ) ) {
|
829 |
+
// $media[ 0 ]->media_author = $rtmedia_query->query[ "context_id" ];
|
830 |
+
// }
|
831 |
+
|
832 |
$parent_link = get_rtmedia_user_link ( $media[ 0 ]->media_author );
|
833 |
}
|
834 |
}
|
869 |
return $return_val;
|
870 |
}
|
871 |
|
872 |
+
function check_broken_media () {
|
873 |
+
global $wpdb;
|
874 |
+
$media_model = new RTMediaModel();
|
875 |
+
$sql = "select * from wp_postmeta m join wp_posts p on p.ID = m.post_id where meta_value like '%rtMedia%'";
|
876 |
+
$results = $wpdb->get_results ( $sql );
|
877 |
+
$upload_path = trim ( get_option ( 'upload_path' ) );
|
878 |
+
|
879 |
+
if ( empty ( $upload_path ) || 'wp-content/uploads' == $upload_path ) {
|
880 |
+
$dir = WP_CONTENT_DIR . '/uploads';
|
881 |
+
} elseif ( 0 !== strpos ( $upload_path, ABSPATH ) ) {
|
882 |
+
// $dir is absolute, $upload_path is (maybe) relative to ABSPATH
|
883 |
+
$dir = path_join ( ABSPATH, $upload_path );
|
884 |
+
} else {
|
885 |
+
$dir = $upload_path;
|
886 |
+
}
|
887 |
+
foreach ( $results as $row ) {
|
888 |
+
$row->meta_value = maybe_unserialize ( $row->meta_value );
|
889 |
+
if ( is_array ( $row->meta_value ) ) {
|
890 |
+
// foreach ( $row->meta_value as $files ) {
|
891 |
+
// var_dump ( $files );
|
892 |
+
// if ( file_exists ( trailingslashit ( $dir ) . $files[ "file" ] ) == false )
|
893 |
+
// echo $row->post_id . " - " . trailingslashit ( $dir ) . $files[ "file" ] . "<br />";
|
894 |
+
// }
|
895 |
+
} else {
|
896 |
+
if ( ! file_exists ( trailingslashit ( $dir ) . $row->meta_value ) ) {
|
897 |
+
echo $row->post_author . ' - ' . $row->post_id . " - " . trailingslashit ( $dir ) . $row->meta_value . "-- " . var_dump ( file_exists ( str_replace ( '/rtMedia/users/' . $row->post_author . "/", '/', trailingslashit ( $dir ) . $row->meta_value ) ) ) . " -- " . str_replace ( '/rtMedia/users/' . $row->post_author . "/", '/', trailingslashit ( $dir ) . $row->meta_value ) . "<br />";
|
898 |
+
}
|
899 |
+
}
|
900 |
+
}
|
901 |
+
exit;
|
902 |
+
}
|
903 |
+
|
904 |
+
function bp_latest_update_fix () {
|
905 |
+
global $wpdb;
|
906 |
+
$sql = "select * from $wpdb->usermeta where meta_key like 'bp_latest_update'";
|
907 |
+
$results = $wpdb->get_results ( $sql );
|
908 |
+
foreach ( $results as $row ) {
|
909 |
+
if ( $meta_value = maybe_unserialize ( $row->meta_value ) ) {
|
910 |
+
if ( is_array ( $meta_value ) ) {
|
911 |
+
if ( isset ( $meta_value[ "content" ] ) && strpos ( $meta_value[ "content" ], "update_txt" ) !== false ) {
|
912 |
+
$data_up = json_decode ( $meta_value[ "content" ] );
|
913 |
+
if ( isset ( $data_up->update_txt ) ) {
|
914 |
+
$meta_value[ "content" ] = urldecode ( $data_up->update_txt );
|
915 |
+
update_user_meta ( $row->user_id, 'bp_latest_update', $meta_value );
|
916 |
+
}
|
917 |
+
}
|
918 |
+
}
|
919 |
+
}
|
920 |
+
}
|
921 |
+
}
|
922 |
+
|
923 |
+
//if ( isset ( $_REQUEST[ "bp_latest_update_fix" ] ) ) {
|
924 |
+
// bp_latest_update_fix ();
|
925 |
+
//}
|
926 |
+
|
927 |
/**
|
928 |
* This wraps up the main rtMedia class. Three important notes:
|
929 |
*
|
app/main/contexts/RTMediaContext.php
CHANGED
@@ -69,23 +69,28 @@ class RTMediaContext {
|
|
69 |
*/
|
70 |
function set_bp_context () {
|
71 |
if ( bp_is_blog_page () ) {
|
72 |
-
$this->set_wp_context ();
|
73 |
} else {
|
74 |
-
$this->set_bp_component_context ();
|
75 |
-
}
|
76 |
}
|
77 |
|
78 |
/**
|
79 |
*
|
80 |
*/
|
81 |
function set_bp_component_context () {
|
82 |
-
if ( bp_displayed_user_id () && ! bp_is_group () )
|
83 |
-
$this->type = 'profile';
|
84 |
-
else if ( ! bp_displayed_user_id () && bp_is_group () )
|
85 |
$this->type = 'group';
|
86 |
-
|
|
|
87 |
$this->id = $this->get_current_bp_component_id ();
|
88 |
-
|
|
|
|
|
|
|
|
|
89 |
|
90 |
/**
|
91 |
*
|
69 |
*/
|
70 |
function set_bp_context () {
|
71 |
if ( bp_is_blog_page () ) {
|
72 |
+
$this->set_wp_context ();
|
73 |
} else {
|
74 |
+
$this->set_bp_component_context ();
|
75 |
+
}
|
76 |
}
|
77 |
|
78 |
/**
|
79 |
*
|
80 |
*/
|
81 |
function set_bp_component_context () {
|
82 |
+
if ( bp_displayed_user_id () && ! bp_is_group () )
|
83 |
+
$this->type = 'profile';
|
84 |
+
else if ( ! bp_displayed_user_id () && bp_is_group () )
|
85 |
$this->type = 'group';
|
86 |
+
else
|
87 |
+
$this->type = 'profile';
|
88 |
$this->id = $this->get_current_bp_component_id ();
|
89 |
+
if($this->id == null) {
|
90 |
+
global $bp;
|
91 |
+
$this->id = $bp->loggedin_user->id;
|
92 |
+
}
|
93 |
+
}
|
94 |
|
95 |
/**
|
96 |
*
|
app/main/controllers/activity/RTMediaActivity.php
CHANGED
@@ -12,80 +12,80 @@
|
|
12 |
*/
|
13 |
class RTMediaActivity {
|
14 |
|
|
|
|
|
|
|
15 |
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
if(!isset($media))
|
25 |
-
return false;
|
26 |
-
if(!is_array($media))
|
27 |
-
$media = array($media);
|
28 |
-
|
29 |
-
$this->media = $media;
|
30 |
-
$this->activity_text = $activity_text;
|
31 |
-
$this->privacy = $privacy;
|
32 |
-
}
|
33 |
-
|
34 |
-
function create_activity_html(){
|
35 |
-
|
36 |
-
|
37 |
-
$html = '';
|
38 |
-
|
39 |
-
$html .='<div class="rtmedia-activity-container">';
|
40 |
-
|
41 |
-
if(!empty($this->activity_text)) {
|
42 |
-
$html .= '<span class="rtmedia-activity-text">';
|
43 |
-
$html .= $this->activity_text;
|
44 |
-
$html .= '</span>';
|
45 |
-
}
|
46 |
-
|
47 |
-
$mediaObj = new RTMediaModel();
|
48 |
-
$media_details = $mediaObj->get(array('id'=> $this->media));
|
49 |
-
|
50 |
-
$html .= '<ul class="rtmedia-list large-block-grid-3">';
|
51 |
-
foreach ($media_details as $media) {
|
52 |
-
$html .= '<li class="rtmedia-list-item media-type-' . $media->media_type . '">';
|
53 |
-
if ( $media->media_type == 'photo' )
|
54 |
-
$html .= '<a href ="'. get_rtmedia_permalink($media->id) .'">';
|
55 |
-
$html .= '<div class="rtmedia-item-thumbnail">';
|
56 |
-
|
57 |
-
$html .= $this->media($media);
|
58 |
-
|
59 |
-
$html .= '</div>';
|
60 |
-
|
61 |
-
$html .= '<div class="rtmedia-item-title">';
|
62 |
-
$html .= '<h4 title="'. $media->media_title .'">';
|
63 |
-
if ( $media->media_type != 'photo' )
|
64 |
-
$html .= '<a href="'. get_rtmedia_permalink($media->id) .'">';
|
65 |
-
|
66 |
-
$html .= $media->media_title;
|
67 |
-
if ( $media->media_type != 'photo' )
|
68 |
-
$html .= '</a>';
|
69 |
-
$html .= '</h4>';
|
70 |
-
$html .= '</div>';
|
71 |
-
if ( $media->media_type == 'photo' )
|
72 |
-
$html .= '</a>';
|
73 |
-
|
74 |
-
$html .= '<div class="rtmedia-item-actions">';
|
75 |
-
$html .= $this->actions();
|
76 |
-
$html .= '</div>';
|
77 |
-
$html .= '</li>';
|
78 |
-
}
|
79 |
-
$html .= '</ul>';
|
80 |
-
$html .= '</div>';
|
81 |
-
return $html;
|
82 |
-
}
|
83 |
-
|
84 |
-
function actions(){
|
85 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
}
|
87 |
-
|
88 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
// if ($media->media_type == 'album' ||
|
90 |
// $media->media_type != 'photo') {
|
91 |
// $thumbnail_id = get_rtmedia_meta($media->media_id,'cover_art');
|
@@ -93,27 +93,28 @@ class RTMediaActivity {
|
|
93 |
// list($src, $width, $height) = wp_get_attachment_image_src($thumbnail_id);
|
94 |
// return '<img src="'.$src.'" />';
|
95 |
// }
|
96 |
-
// }
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
|
|
117 |
}
|
118 |
|
119 |
?>
|
12 |
*/
|
13 |
class RTMediaActivity {
|
14 |
|
15 |
+
var $media = array( );
|
16 |
+
var $activity_text = '';
|
17 |
+
var $privacy;
|
18 |
|
19 |
+
/**
|
20 |
+
*
|
21 |
+
*/
|
22 |
+
function __construct ( $media, $privacy = 0, $activity_text = false ) {
|
23 |
+
if ( ! isset ( $media ) )
|
24 |
+
return false;
|
25 |
+
if ( ! is_array ( $media ) )
|
26 |
+
$media = array( $media );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
|
28 |
+
$this->media = $media;
|
29 |
+
$this->activity_text = $activity_text;
|
30 |
+
$this->privacy = $privacy;
|
31 |
+
}
|
32 |
+
|
33 |
+
function create_activity_html () {
|
34 |
+
|
35 |
+
|
36 |
+
$html = '';
|
37 |
+
|
38 |
+
$html .='<div class="rtmedia-activity-container">';
|
39 |
+
|
40 |
+
if ( ! empty ( $this->activity_text ) ) {
|
41 |
+
$html .= '<span class="rtmedia-activity-text">';
|
42 |
+
$html .= $this->activity_text;
|
43 |
+
$html .= '</span>';
|
44 |
+
}
|
45 |
+
|
46 |
+
$mediaObj = new RTMediaModel();
|
47 |
+
$media_details = $mediaObj->get ( array( 'id' => $this->media ) );
|
48 |
+
|
49 |
+
$html .= '<ul class="rtmedia-list large-block-grid-3">';
|
50 |
+
foreach ( $media_details as $media ) {
|
51 |
+
$html .= '<li class="rtmedia-list-item media-type-' . $media->media_type . '">';
|
52 |
+
if ( $media->media_type == 'photo' )
|
53 |
+
$html .= '<a href ="' . get_rtmedia_permalink ( $media->id ) . '">';
|
54 |
+
$html .= '<div class="rtmedia-item-thumbnail">';
|
55 |
+
|
56 |
+
$html .= $this->media ( $media );
|
57 |
+
|
58 |
+
$html .= '</div>';
|
59 |
+
|
60 |
+
$html .= '<div class="rtmedia-item-title">';
|
61 |
+
$html .= '<h4 title="' . $media->media_title . '">';
|
62 |
+
if ( $media->media_type != 'photo' )
|
63 |
+
$html .= '<a href="' . get_rtmedia_permalink ( $media->id ) . '">';
|
64 |
+
|
65 |
+
$html .= $media->media_title;
|
66 |
+
if ( $media->media_type != 'photo' )
|
67 |
+
$html .= '</a>';
|
68 |
+
$html .= '</h4>';
|
69 |
+
$html .= '</div>';
|
70 |
+
if ( $media->media_type == 'photo' )
|
71 |
+
$html .= '</a>';
|
72 |
+
|
73 |
+
$html .= '<div class="rtmedia-item-actions">';
|
74 |
+
$html .= $this->actions ();
|
75 |
+
$html .= '</div>';
|
76 |
+
$html .= '</li>';
|
77 |
}
|
78 |
+
$html .= '</ul>';
|
79 |
+
$html .= '</div>';
|
80 |
+
return $html;
|
81 |
+
}
|
82 |
+
|
83 |
+
function actions () {
|
84 |
+
|
85 |
+
}
|
86 |
+
|
87 |
+
function media ( $media ) {
|
88 |
+
if ( isset ( $media->media_type ) ) {
|
89 |
// if ($media->media_type == 'album' ||
|
90 |
// $media->media_type != 'photo') {
|
91 |
// $thumbnail_id = get_rtmedia_meta($media->media_id,'cover_art');
|
93 |
// list($src, $width, $height) = wp_get_attachment_image_src($thumbnail_id);
|
94 |
// return '<img src="'.$src.'" />';
|
95 |
// }
|
96 |
+
// }
|
97 |
+
|
98 |
+
if ( $media->media_type == 'photo' ) {
|
99 |
+
$thumbnail_id = $media->media_id;
|
100 |
+
if ( $thumbnail_id ) {
|
101 |
+
list($src, $width, $height) = wp_get_attachment_image_src ( $thumbnail_id, "rt_media_activity_image" );
|
102 |
+
$html = '<img src="' . $src . '" />';
|
103 |
+
}
|
104 |
+
} elseif ( $media->media_type == 'video' ) {
|
105 |
+
global $rtmedia;
|
106 |
+
$html = '<video src="' . wp_get_attachment_url ( $media->media_id ) . '" width="' . $rtmedia->options[ "defaultSizes_video_activityPlayer_width" ] . '" height="' . $rtmedia->options[ "defaultSizes_video_activityPlayer_height" ] . '" type="video/mp4" class="wp-video-shortcode" id="rt_media_video_' . $media->id . '" controls="controls" preload="none"></video>';
|
107 |
+
} elseif ( $media->media_type == 'music' ) {
|
108 |
+
$html = '<audio src="' . wp_get_attachment_url ( $media->media_id ) . '" width="' . $rtmedia->options[ "defaultSizes_music_activityPlayer_width" ] . '" height="0" type="audio/mp3" class="wp-audio-shortcode" id="rt_media_audio_' . $media->id . '" controls="controls" preload="none"></audio>';
|
109 |
+
} else {
|
110 |
+
$html = false;
|
111 |
+
}
|
112 |
+
} else {
|
113 |
+
$html = false;
|
114 |
+
}
|
115 |
+
return apply_filters ( 'rtmedia_single_activity_filter', $html, $media, true );
|
116 |
+
}
|
117 |
+
|
118 |
}
|
119 |
|
120 |
?>
|
app/main/controllers/activity/RTMediaBuddyPressActivity.php
CHANGED
@@ -119,7 +119,7 @@ class RTMediaBuddyPressActivity {
|
|
119 |
$url = trailingslashit ( $url );
|
120 |
$params = array(
|
121 |
'url' => (isset ( $url ) && (strpos ( $url, "/media/" ) !== false)) ? str_replace ( "/media/", "/upload/", $url ) : 'upload/',
|
122 |
-
'runtimes' => '
|
123 |
'browse_button' => 'rtmedia-whts-new-upload-button',
|
124 |
'container' => 'rtmedia-whts-new-upload-container',
|
125 |
'drop_element' => 'rtmedia-whts-new-drag-drop-area',
|
@@ -179,6 +179,10 @@ class RTMediaBuddyPressActivity {
|
|
179 |
$activity_allowedtags[ 'li' ] = array( );
|
180 |
$activity_allowedtags[ 'li' ][ 'class' ] = array( );
|
181 |
|
|
|
|
|
|
|
|
|
182 |
return $activity_allowedtags;
|
183 |
}
|
184 |
|
119 |
$url = trailingslashit ( $url );
|
120 |
$params = array(
|
121 |
'url' => (isset ( $url ) && (strpos ( $url, "/media/" ) !== false)) ? str_replace ( "/media/", "/upload/", $url ) : 'upload/',
|
122 |
+
'runtimes' => 'html5,silverlight,flash,html4',
|
123 |
'browse_button' => 'rtmedia-whts-new-upload-button',
|
124 |
'container' => 'rtmedia-whts-new-upload-container',
|
125 |
'drop_element' => 'rtmedia-whts-new-drag-drop-area',
|
179 |
$activity_allowedtags[ 'li' ] = array( );
|
180 |
$activity_allowedtags[ 'li' ][ 'class' ] = array( );
|
181 |
|
182 |
+
/* Legacy Code */
|
183 |
+
$activity_allowedtags[ 'script' ] = array( );
|
184 |
+
$activity_allowedtags[ 'script' ][ 'type' ] = array( );
|
185 |
+
|
186 |
return $activity_allowedtags;
|
187 |
}
|
188 |
|
app/main/controllers/group/RTMediaGroupExtension.php
CHANGED
@@ -4,55 +4,55 @@
|
|
4 |
*
|
5 |
* @author faishal
|
6 |
*/
|
7 |
-
if (class_exists('BP_Group_Extension')) :// Recommended, to prevent problems during upgrade or when Groups are disabled
|
8 |
|
9 |
class RTMediaGroupExtension extends BP_Group_Extension {
|
10 |
-
|
|
|
11 |
$this->name = RTMEDIA_MEDIA_LABEL;
|
12 |
$this->slug = RTMEDIA_MEDIA_SLUG;
|
13 |
$this->create_step_position = 21;
|
14 |
$this->enable_nav_item = false;
|
15 |
-
|
16 |
}
|
17 |
|
18 |
-
function create_screen() {
|
19 |
-
|
20 |
-
if (!bp_is_group_creation_step($this->slug))
|
21 |
return false;
|
22 |
?>
|
23 |
-
<h4><?php _e("Album Creation Control", 'rtmedia'); ?></h4>
|
24 |
-
<p><?php _e("Who can create Albums in this group?", 'rtmedia'); ?></p>
|
25 |
<div class="radio">
|
26 |
<label>
|
27 |
<input name="rt_album_creation_control" type="radio" id="rt_media_group_level_all" checked="checked" value="all">
|
28 |
-
<strong><?php _e("All Group Members", 'rtmedia'); ?></strong>
|
29 |
</label>
|
30 |
<label>
|
31 |
<input name="rt_album_creation_control" type="radio" id="rt_media_group_level_moderators" value="moderators">
|
32 |
-
<strong><?php _e("Group Admins and Mods only", 'rtmedia'); ?></strong>
|
33 |
</label>
|
34 |
<label>
|
35 |
<input name="rt_album_creation_control" type="radio" id="rt_media_group_level_admin" value="admin">
|
36 |
-
<strong><?php _e("Group Admin only", 'rtmedia'); ?></strong>
|
37 |
</label>
|
38 |
</div>
|
39 |
|
40 |
<?php
|
41 |
-
wp_nonce_field('groups_create_save_' . $this->slug);
|
42 |
}
|
43 |
|
44 |
/**
|
45 |
*
|
46 |
* @global type $bp
|
47 |
*/
|
48 |
-
function create_screen_save() {
|
49 |
global $bp;
|
50 |
|
51 |
-
check_admin_referer('groups_create_save_' . $this->slug);
|
52 |
|
53 |
/* Save any details submitted here */
|
54 |
-
if (isset($_POST['rt_album_creation_control']) && $_POST['rt_album_creation_control'] != '')
|
55 |
-
groups_update_groupmeta($bp->groups->new_group_id, 'rt_media_group_control_level', $_POST['rt_album_creation_control']);
|
56 |
}
|
57 |
|
58 |
/**
|
@@ -60,36 +60,35 @@ if (class_exists('BP_Group_Extension')) :// Recommended, to prevent problems dur
|
|
60 |
* @global type $bp_media
|
61 |
* @return boolean
|
62 |
*/
|
63 |
-
function edit_screen() {
|
64 |
-
if (!bp_is_group_admin_screen($this->slug))
|
65 |
return false;
|
66 |
-
$current_level = groups_get_groupmeta(bp_get_current_group_id(), 'rt_media_group_control_level');
|
67 |
-
if(empty($current_level)){
|
68 |
$current_level = "all";
|
69 |
}
|
70 |
-
|
71 |
?>
|
72 |
|
73 |
-
<h4><?php _e("Album Creation Control", 'rtmedia'); ?></h4>
|
74 |
-
<p><?php _e("Who can create Albums in this group?", 'rtmedia'); ?></p>
|
75 |
<div class="radio">
|
76 |
<label>
|
77 |
-
<input name="rt_album_creation_control" type="radio" id="rt_media_group_level_moderators" value="all"<?php checked($current_level, 'all', true) ?>>
|
78 |
-
<strong><?php _e("All Group Members", 'rtmedia'); ?></strong>
|
79 |
</label>
|
80 |
<label>
|
81 |
-
<input name="rt_album_creation_control" type="radio" id="rt_media_group_level_moderators" value="moderators" <?php checked($current_level, 'moderators', true) ?>>
|
82 |
-
<strong><?php _e("Group Admins and Mods only", 'rtmedia'); ?></strong>
|
83 |
</label>
|
84 |
<label>
|
85 |
-
<input name="rt_album_creation_control" type="radio" id="rt_media_group_level_admin" value="admin" <?php checked($current_level, 'admin', true) ?>>
|
86 |
-
<strong><?php _e("Group Admin only", 'rtmedia'); ?></strong>
|
87 |
</label>
|
88 |
</div>
|
89 |
<hr>
|
90 |
-
<input type="submit" name="save" value="<?php _e("Save Changes", 'rtmedia'); ?>" />
|
91 |
<?php
|
92 |
-
wp_nonce_field('groups_edit_save_' . $this->slug);
|
93 |
}
|
94 |
|
95 |
/**
|
@@ -98,29 +97,29 @@ if (class_exists('BP_Group_Extension')) :// Recommended, to prevent problems dur
|
|
98 |
* @global type $bp_media
|
99 |
* @return boolean
|
100 |
*/
|
101 |
-
function edit_screen_save() {
|
102 |
global $bp;
|
103 |
|
104 |
-
if (!isset($_POST['save']))
|
105 |
return false;
|
106 |
|
107 |
-
check_admin_referer('groups_edit_save_' . $this->slug);
|
108 |
|
109 |
-
if (isset($_POST['rt_album_creation_control']) && $_POST['rt_album_creation_control'] != ''){
|
110 |
-
$success = groups_update_groupmeta(bp_get_current_group_id(), 'rt_media_group_control_level', $_POST['rt_album_creation_control']);
|
111 |
-
|
112 |
$success = true;
|
113 |
}
|
114 |
else
|
115 |
$success = false;
|
116 |
|
117 |
/* To post an error/success message to the screen, use the following */
|
118 |
-
if (
|
119 |
-
bp_core_add_message(__('There was an error saving, please try again', 'rtmedia'), 'error');
|
120 |
else
|
121 |
-
bp_core_add_message(__('Settings saved successfully', 'rtmedia'));
|
122 |
|
123 |
-
bp_core_redirect(bp_get_group_permalink($bp->groups->current_group) . '/admin/' . $this->slug);
|
124 |
}
|
125 |
|
126 |
/**
|
@@ -133,14 +132,14 @@ if (class_exists('BP_Group_Extension')) :// Recommended, to prevent problems dur
|
|
133 |
*
|
134 |
* @global type $bp_media
|
135 |
*/
|
136 |
-
function widget_display() {
|
137 |
?>
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
home screen.", 'rtmedia'); ?>
|
143 |
-
|
144 |
</div>
|
145 |
<?php
|
146 |
}
|
@@ -152,4 +151,10 @@ if (class_exists('BP_Group_Extension')) :// Recommended, to prevent problems dur
|
|
152 |
|
153 |
|
154 |
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
endif; // class_exists( 'BP_Group_Extension' )
|
4 |
*
|
5 |
* @author faishal
|
6 |
*/
|
7 |
+
if ( class_exists ( 'BP_Group_Extension' ) ) :// Recommended, to prevent problems during upgrade or when Groups are disabled
|
8 |
|
9 |
class RTMediaGroupExtension extends BP_Group_Extension {
|
10 |
+
|
11 |
+
function __construct () {
|
12 |
$this->name = RTMEDIA_MEDIA_LABEL;
|
13 |
$this->slug = RTMEDIA_MEDIA_SLUG;
|
14 |
$this->create_step_position = 21;
|
15 |
$this->enable_nav_item = false;
|
|
|
16 |
}
|
17 |
|
18 |
+
function create_screen ( $group_id = NULL ) {
|
19 |
+
|
20 |
+
if ( ! bp_is_group_creation_step ( $this->slug ) )
|
21 |
return false;
|
22 |
?>
|
23 |
+
<h4><?php _e ( "Album Creation Control", 'rtmedia' ); ?></h4>
|
24 |
+
<p><?php _e ( "Who can create Albums in this group?", 'rtmedia' ); ?></p>
|
25 |
<div class="radio">
|
26 |
<label>
|
27 |
<input name="rt_album_creation_control" type="radio" id="rt_media_group_level_all" checked="checked" value="all">
|
28 |
+
<strong><?php _e ( "All Group Members", 'rtmedia' ); ?></strong>
|
29 |
</label>
|
30 |
<label>
|
31 |
<input name="rt_album_creation_control" type="radio" id="rt_media_group_level_moderators" value="moderators">
|
32 |
+
<strong><?php _e ( "Group Admins and Mods only", 'rtmedia' ); ?></strong>
|
33 |
</label>
|
34 |
<label>
|
35 |
<input name="rt_album_creation_control" type="radio" id="rt_media_group_level_admin" value="admin">
|
36 |
+
<strong><?php _e ( "Group Admin only", 'rtmedia' ); ?></strong>
|
37 |
</label>
|
38 |
</div>
|
39 |
|
40 |
<?php
|
41 |
+
wp_nonce_field ( 'groups_create_save_' . $this->slug );
|
42 |
}
|
43 |
|
44 |
/**
|
45 |
*
|
46 |
* @global type $bp
|
47 |
*/
|
48 |
+
function create_screen_save ( $group_id = NULL ) {
|
49 |
global $bp;
|
50 |
|
51 |
+
check_admin_referer ( 'groups_create_save_' . $this->slug );
|
52 |
|
53 |
/* Save any details submitted here */
|
54 |
+
if ( isset ( $_POST[ 'rt_album_creation_control' ] ) && $_POST[ 'rt_album_creation_control' ] != '' )
|
55 |
+
groups_update_groupmeta ( $bp->groups->new_group_id, 'rt_media_group_control_level', $_POST[ 'rt_album_creation_control' ] );
|
56 |
}
|
57 |
|
58 |
/**
|
60 |
* @global type $bp_media
|
61 |
* @return boolean
|
62 |
*/
|
63 |
+
function edit_screen ( $group_id = NULL ) {
|
64 |
+
if ( ! bp_is_group_admin_screen ( $this->slug ) )
|
65 |
return false;
|
66 |
+
$current_level = groups_get_groupmeta ( bp_get_current_group_id (), 'rt_media_group_control_level' );
|
67 |
+
if ( empty ( $current_level ) ) {
|
68 |
$current_level = "all";
|
69 |
}
|
|
|
70 |
?>
|
71 |
|
72 |
+
<h4><?php _e ( "Album Creation Control", 'rtmedia' ); ?></h4>
|
73 |
+
<p><?php _e ( "Who can create Albums in this group?", 'rtmedia' ); ?></p>
|
74 |
<div class="radio">
|
75 |
<label>
|
76 |
+
<input name="rt_album_creation_control" type="radio" id="rt_media_group_level_moderators" value="all"<?php checked ( $current_level, 'all', true ) ?>>
|
77 |
+
<strong><?php _e ( "All Group Members", 'rtmedia' ); ?></strong>
|
78 |
</label>
|
79 |
<label>
|
80 |
+
<input name="rt_album_creation_control" type="radio" id="rt_media_group_level_moderators" value="moderators" <?php checked ( $current_level, 'moderators', true ) ?>>
|
81 |
+
<strong><?php _e ( "Group Admins and Mods only", 'rtmedia' ); ?></strong>
|
82 |
</label>
|
83 |
<label>
|
84 |
+
<input name="rt_album_creation_control" type="radio" id="rt_media_group_level_admin" value="admin" <?php checked ( $current_level, 'admin', true ) ?>>
|
85 |
+
<strong><?php _e ( "Group Admin only", 'rtmedia' ); ?></strong>
|
86 |
</label>
|
87 |
</div>
|
88 |
<hr>
|
89 |
+
<input type="submit" name="save" value="<?php _e ( "Save Changes", 'rtmedia' ); ?>" />
|
90 |
<?php
|
91 |
+
wp_nonce_field ( 'groups_edit_save_' . $this->slug );
|
92 |
}
|
93 |
|
94 |
/**
|
97 |
* @global type $bp_media
|
98 |
* @return boolean
|
99 |
*/
|
100 |
+
function edit_screen_save ( $group_id = NULL ) {
|
101 |
global $bp;
|
102 |
|
103 |
+
if ( ! isset ( $_POST[ 'save' ] ) )
|
104 |
return false;
|
105 |
|
106 |
+
check_admin_referer ( 'groups_edit_save_' . $this->slug );
|
107 |
|
108 |
+
if ( isset ( $_POST[ 'rt_album_creation_control' ] ) && $_POST[ 'rt_album_creation_control' ] != '' ) {
|
109 |
+
$success = groups_update_groupmeta ( bp_get_current_group_id (), 'rt_media_group_control_level', $_POST[ 'rt_album_creation_control' ] );
|
110 |
+
// $success = groups_update_groupmeta(bp_get_current_group_id(), 'rt_upload_media_control_level', $_POST['rt_upload_media_control']);
|
111 |
$success = true;
|
112 |
}
|
113 |
else
|
114 |
$success = false;
|
115 |
|
116 |
/* To post an error/success message to the screen, use the following */
|
117 |
+
if ( ! $success )
|
118 |
+
bp_core_add_message ( __ ( 'There was an error saving, please try again', 'rtmedia' ), 'error' );
|
119 |
else
|
120 |
+
bp_core_add_message ( __ ( 'Settings saved successfully', 'rtmedia' ) );
|
121 |
|
122 |
+
bp_core_redirect ( bp_get_group_permalink ( $bp->groups->current_group ) . '/admin/' . $this->slug );
|
123 |
}
|
124 |
|
125 |
/**
|
132 |
*
|
133 |
* @global type $bp_media
|
134 |
*/
|
135 |
+
function widget_display () {
|
136 |
?>
|
137 |
+
<div class="info-group" >
|
138 |
+
<h4><?php echo esc_attr ( $this->name ) ?></h4>
|
139 |
+
<p>
|
140 |
+
<?php _e ( "You could display a small snippet of information from your group extension here. It will show on the group
|
141 |
+
home screen.", 'rtmedia' ); ?>
|
142 |
+
</p>
|
143 |
</div>
|
144 |
<?php
|
145 |
}
|
151 |
|
152 |
|
153 |
|
154 |
+
|
155 |
+
|
156 |
+
|
157 |
+
|
158 |
+
|
159 |
+
|
160 |
endif; // class_exists( 'BP_Group_Extension' )
|
app/main/controllers/media/RTMediaComment.php
CHANGED
@@ -66,7 +66,7 @@ class RTMediaComment {
|
|
66 |
$attr['comment_date'] = current_time('mysql');
|
67 |
$id = $this->rtmedia_comment_model->insert($attr);
|
68 |
|
69 |
-
do_action('
|
70 |
|
71 |
return $id;
|
72 |
}
|
66 |
$attr['comment_date'] = current_time('mysql');
|
67 |
$id = $this->rtmedia_comment_model->insert($attr);
|
68 |
|
69 |
+
do_action('rtmedia_after_add_comment', $attr);
|
70 |
|
71 |
return $id;
|
72 |
}
|
app/main/controllers/media/RTMediaMedia.php
CHANGED
@@ -367,6 +367,13 @@ class RTMediaMedia {
|
|
367 |
$attachment_id = wp_insert_attachment ( $attachment, $file_object[ $key ][ 'file' ], $attachment[ 'post_parent' ] );
|
368 |
if ( ! is_wp_error ( $attachment_id ) ) {
|
369 |
add_filter ( 'intermediate_image_sizes', array( $this, 'image_sizes' ), 99 );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
370 |
wp_update_attachment_metadata ( $attachment_id, wp_generate_attachment_metadata ( $attachment_id, $file_object[ $key ][ 'file' ] ) );
|
371 |
} else {
|
372 |
unlink ( $file_object[ $key ][ 'file' ] );
|
367 |
$attachment_id = wp_insert_attachment ( $attachment, $file_object[ $key ][ 'file' ], $attachment[ 'post_parent' ] );
|
368 |
if ( ! is_wp_error ( $attachment_id ) ) {
|
369 |
add_filter ( 'intermediate_image_sizes', array( $this, 'image_sizes' ), 99 );
|
370 |
+
/**
|
371 |
+
* FIX WORDPRESS 3.6 METADATA
|
372 |
+
*/
|
373 |
+
require_once ( ABSPATH . 'wp-admin/includes/media.php' );
|
374 |
+
/**
|
375 |
+
*
|
376 |
+
*/
|
377 |
wp_update_attachment_metadata ( $attachment_id, wp_generate_attachment_metadata ( $attachment_id, $file_object[ $key ][ 'file' ] ) );
|
378 |
} else {
|
379 |
unlink ( $file_object[ $key ][ 'file' ] );
|
app/main/controllers/shortcodes/RTMediaGalleryShortcode.php
CHANGED
@@ -26,7 +26,7 @@ class RTMediaGalleryShortcode {
|
|
26 |
//add_action('wp_footer', array($this, 'print_script'));
|
27 |
}
|
28 |
|
29 |
-
function register_scripts () {
|
30 |
wp_enqueue_script ( 'plupload-all' );
|
31 |
wp_enqueue_script ( 'rtmedia-backbone', RTMEDIA_URL . 'app/assets/js/rtMedia.backbone.js', array( 'plupload', 'backbone' ), false, true );
|
32 |
$template_url = RTMediaTemplate::locate_template ( "media-gallery-item", "media/", true );
|
@@ -42,7 +42,7 @@ class RTMediaGalleryShortcode {
|
|
42 |
|
43 |
$params = array(
|
44 |
'url' => $url,
|
45 |
-
'runtimes' => '
|
46 |
'browse_button' => 'rtMedia-upload-button',
|
47 |
'container' => 'rtmedia-upload-container',
|
48 |
'drop_element' => 'drag-drop-area',
|
26 |
//add_action('wp_footer', array($this, 'print_script'));
|
27 |
}
|
28 |
|
29 |
+
static function register_scripts () {
|
30 |
wp_enqueue_script ( 'plupload-all' );
|
31 |
wp_enqueue_script ( 'rtmedia-backbone', RTMEDIA_URL . 'app/assets/js/rtMedia.backbone.js', array( 'plupload', 'backbone' ), false, true );
|
32 |
$template_url = RTMediaTemplate::locate_template ( "media-gallery-item", "media/", true );
|
42 |
|
43 |
$params = array(
|
44 |
'url' => $url,
|
45 |
+
'runtimes' => 'html5,silverlight,flash,html4',
|
46 |
'browse_button' => 'rtMedia-upload-button',
|
47 |
'container' => 'rtmedia-upload-container',
|
48 |
'drop_element' => 'drag-drop-area',
|
app/main/controllers/template/RTMediaTemplate.php
CHANGED
@@ -12,31 +12,31 @@ class RTMediaTemplate {
|
|
12 |
|
13 |
public $media_args;
|
14 |
|
15 |
-
function __construct() {
|
16 |
global $rtmedia_query;
|
17 |
-
if ($rtmedia_query) {
|
18 |
-
add_action('wp_enqueue_scripts', array($this, 'enqueue_scripts'));
|
19 |
-
add_action('wp_enqueue_scripts', array($this, 'enqueue_image_editor_scripts'));
|
20 |
}
|
21 |
}
|
22 |
|
23 |
/**
|
24 |
* Enqueues required scripts on the page
|
25 |
*/
|
26 |
-
function enqueue_scripts() {
|
27 |
-
wp_enqueue_script('rtmedia-backbone');
|
28 |
-
$is_album = is_rtmedia_album() ? true : false;
|
29 |
-
$is_edit_allowed = is_rtmedia_edit_allowed() ? true : false;
|
30 |
-
wp_localize_script('rtmedia-backbone', 'is_album', array($is_album));
|
31 |
-
wp_localize_script('rtmedia-backbone', 'is_edit_allowed', array($is_edit_allowed));
|
32 |
}
|
33 |
|
34 |
-
function enqueue_image_editor_scripts() {
|
35 |
-
$suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
|
36 |
-
wp_enqueue_script('wp-ajax-response');
|
37 |
-
wp_enqueue_script('rtmedia-image-edit', admin_url("js/image-edit$suffix.js"), array('jquery', 'json2', 'imgareaselect'), false, 1);
|
38 |
-
wp_enqueue_style('rtmedia-image-edit', RTMEDIA_URL . 'app/assets/css/image-edit.css');
|
39 |
-
wp_enqueue_style('rtmedia-image-area-select', includes_url('/js/imgareaselect/imgareaselect.css'));
|
40 |
}
|
41 |
|
42 |
/**
|
@@ -51,340 +51,344 @@ class RTMediaTemplate {
|
|
51 |
* @param type $shortcode_attr
|
52 |
* @return type
|
53 |
*/
|
54 |
-
function set_template($template, $shortcode_attr = false) {
|
55 |
|
56 |
global $rtmedia_query, $rtmedia_interaction, $rtmedia_media;
|
57 |
|
58 |
-
do_action('rtmedia_pre_template');
|
59 |
|
60 |
//print_r($rtmedia_query);
|
61 |
|
62 |
-
if (isset($rtmedia_query->action_query->action)) {
|
63 |
//echo $rtmedia_query->action_query->action;
|
64 |
-
do_action('rtmedia_pre_action_' . $rtmedia_query->action_query->action);
|
65 |
} else {
|
66 |
-
do_action('rtmedia_pre_action_default');
|
67 |
}
|
68 |
|
69 |
-
$this->check_return_json();
|
70 |
|
71 |
-
$this->check_return_upload();
|
72 |
|
73 |
-
if (in_array($rtmedia_interaction->context->type, array("profile", "group"))) {
|
74 |
|
75 |
|
76 |
-
$this->check_return_edit();
|
77 |
|
78 |
-
$this->check_return_delete();
|
79 |
|
80 |
-
$this->check_return_merge();
|
81 |
|
82 |
-
$this->check_return_comments();
|
83 |
|
84 |
-
return $this->get_default_template();
|
85 |
-
} else if (
|
86 |
-
return $this->get_default_template();
|
87 |
-
} else if ($shortcode_attr['name'] == 'gallery') {
|
88 |
-
$valid = $this->sanitize_gallery_attributes($shortcode_attr['attr']);
|
89 |
-
if ($valid) {
|
90 |
-
if (is_array($shortcode_attr['attr'])){
|
91 |
-
$this->update_global_query($shortcode_attr['attr']);
|
92 |
}
|
93 |
global $rtaccount;
|
94 |
-
if(!isset($rtaccount)){
|
95 |
$rtaccount = 0;
|
96 |
}
|
97 |
-
//add_action("rtmedia_before_media_gallery",array(&$this,"")) ;
|
98 |
-
$this->add_hidden_fields_in_gallery();
|
99 |
-
include $this->locate_template($template);
|
100 |
} else {
|
101 |
-
echo __('Invalid attribute passed for rtmedia_gallery shortcode.', 'rtmedia');
|
102 |
return false;
|
103 |
}
|
104 |
}
|
105 |
}
|
106 |
-
|
|
|
107 |
global $rtmedia_query;
|
108 |
-
$return_str= "";
|
109 |
-
if($rtmedia_query->original_query && is_array($rtmedia_query->original_query)){
|
110 |
-
foreach($rtmedia_query->original_query as $key
|
111 |
$return_str.= '<input name="' . $key . '" value="' . $val . '" type="hidden" />';
|
112 |
-
|
113 |
}
|
114 |
}
|
115 |
-
echo
|
116 |
}
|
117 |
-
|
|
|
118 |
global $rtmedia_query;
|
119 |
-
if ($rtmedia_query->format == 'json') {
|
120 |
-
$this->json_output();
|
121 |
} else {
|
122 |
return;
|
123 |
}
|
124 |
}
|
125 |
|
126 |
-
function check_return_upload() {
|
127 |
global $rtmedia_query;
|
128 |
-
if ($rtmedia_query->action_query->action != 'upload')
|
129 |
return;
|
130 |
$upload = new RTMediaUploadEndpoint();
|
131 |
-
$upload->template_redirect();
|
132 |
}
|
133 |
|
134 |
-
function json_output() {
|
135 |
global $rtmedia_query;
|
136 |
-
$media_array = array();
|
137 |
-
if ($rtmedia_query->media) {
|
138 |
-
foreach ($rtmedia_query->media as $key => $media) {
|
139 |
-
$media_array[$key] = $media;
|
140 |
-
list($src, $width, $height) = wp_get_attachment_image_src($media->media_id, 'rt_media_thumbnail');
|
141 |
-
if (
|
142 |
global $rtmedia;
|
143 |
-
$src = $rtmedia->allowed_types[$media->media_type]["thumbnail"];
|
144 |
}
|
145 |
-
$media_array[$key]->guid = $src;
|
146 |
-
$media_array[$key]->rt_permalink = get_rtmedia_permalink($media->id);
|
147 |
}
|
148 |
}
|
149 |
-
$return_array['data'] = $media_array;
|
150 |
-
$return_array['prev'] = rtmedia_page() - 1;
|
151 |
-
$return_array['next'] = (rtmedia_offset() + rtmedia_per_page_media() < rtmedia_count()) ? (rtmedia_page() + 1) : -1;
|
152 |
-
echo json_encode($return_array);
|
153 |
die;
|
154 |
}
|
155 |
|
156 |
-
function check_return_edit() {
|
157 |
global $rtmedia_query;
|
158 |
-
if ($rtmedia_query->action_query->action == 'edit' && count($_POST))
|
159 |
-
$this->save_edit();
|
160 |
-
return $this->get_default_template();
|
161 |
}
|
162 |
|
163 |
-
function save_edit() {
|
164 |
-
if (is_rtmedia_single()) {
|
165 |
-
$this->save_single_edit();
|
166 |
-
} elseif (is_rtmedia_album()) {
|
167 |
-
$this->save_album_edit();
|
168 |
}
|
169 |
}
|
170 |
|
171 |
-
function save_single_edit() {
|
172 |
global $rtmedia_query;
|
173 |
-
$nonce = $_POST['rtmedia_media_nonce'];
|
174 |
-
if (wp_verify_nonce($nonce, 'rtmedia_' . $rtmedia_query->action_query->id)) {
|
175 |
-
do_action('rtmedia_before_update_media'
|
176 |
-
$data = rtmedia_sanitize_object($_POST, array('media_title', 'description', 'privacy'));
|
177 |
$media = new RTMediaMedia();
|
178 |
-
$state = $media->update($rtmedia_query->action_query->id, $data, $rtmedia_query->media[0]->media_id);
|
179 |
-
$rtmedia_query->query(false);
|
180 |
-
do_action('rtmedia_after_update_media'
|
181 |
-
if($state!==false){
|
182 |
-
add_action("rtmedia_before_template_load", array(&$this,"media_update_success_messege"));
|
183 |
-
}else{
|
184 |
-
add_action("rtmedia_before_template_load", array(&$this, "media_update_success_error"));
|
185 |
}
|
186 |
} else {
|
187 |
-
echo __("Ooops !!! Invalid access. No nonce was found !!", "rtmedia");
|
188 |
}
|
189 |
}
|
190 |
-
|
191 |
-
|
192 |
-
$
|
193 |
-
|
|
|
194 |
}
|
195 |
-
|
196 |
-
|
197 |
-
$
|
198 |
-
|
|
|
199 |
}
|
200 |
-
|
|
|
201 |
global $rtmedia_query;
|
202 |
-
$nonce = $_REQUEST['rtmedia_media_nonce'];
|
203 |
-
if (wp_verify_nonce($nonce, 'rtmedia_' . $rtmedia_query->media_query['album_id'])) {
|
204 |
$media = new RTMediaMedia();
|
205 |
$model = new RTMediaModel();
|
206 |
-
if (isset($_POST['submit'])) {
|
207 |
$data = $_POST;
|
208 |
-
unset($data['rtmedia_media_nonce']);
|
209 |
-
unset($data['_wp_http_referer']);
|
210 |
-
unset($data['submit']);
|
211 |
-
$album = $model->get_media(array('id' => $rtmedia_query->media_query['album_id']), false, false);
|
212 |
-
$media->update($album[0]->id, $data, $album[0]->media_id);
|
213 |
-
} elseif (isset($_POST['move-selected'])) {
|
214 |
// print_r($_POST);die;
|
215 |
-
$album_move = $_POST['album'];
|
216 |
$selected_ids = NULL;
|
217 |
|
218 |
-
if (isset($_POST['selected'])) {
|
219 |
-
$selected_ids = $_POST['selected'];
|
220 |
-
unset($_POST['selected']);
|
221 |
}
|
222 |
-
if (!empty($selected_ids) && is_array($selected_ids)) {
|
223 |
-
$album_move_details = $model->get_media(array('id' => $album_move), false, false);
|
224 |
-
foreach ($selected_ids as $media_id) {
|
225 |
-
$media_details = $model->get_media(array('id' => $media_id), false, false);
|
226 |
-
$post_array['ID'] = $media_details[0]->media_id;
|
227 |
-
$post_array['post_parent'] = $album_move_details[0]->media_id;
|
228 |
-
wp_update_post($post_array);
|
229 |
-
$media->update($media_details[0]->id, array('album_id' => $album_move_details[0]->id), $media_details[0]->media_id);
|
230 |
}
|
231 |
}
|
232 |
}
|
233 |
-
wp_safe_redirect(get_rtmedia_permalink($rtmedia_query->media_query['album_id']) . 'edit/');
|
234 |
} else {
|
235 |
-
echo __("Ooops !!! Invalid access. No nonce was found !!", "rtmedia");
|
236 |
}
|
237 |
}
|
238 |
|
239 |
-
function check_return_delete() {
|
240 |
|
241 |
global $rtmedia_query;
|
242 |
-
if ($rtmedia_query->action_query->action != 'delete')
|
243 |
return;
|
244 |
-
if (!count($_POST))
|
245 |
return;
|
246 |
|
247 |
-
if (isset($rtmedia_query->action_query->default) && $rtmedia_query->action_query->default == 'delete') {
|
248 |
-
$this->bulk_delete();
|
249 |
} else {
|
250 |
-
if (is_rtmedia_single()) {
|
251 |
-
$this->single_delete();
|
252 |
-
} elseif (is_rtmedia_album()) {
|
253 |
|
254 |
-
$this->album_delete();
|
255 |
}
|
256 |
}
|
257 |
}
|
258 |
|
259 |
-
function bulk_delete() {
|
260 |
-
$nonce = $_POST['rtmedia_bulk_delete_nonce'];
|
261 |
|
262 |
$media = new RTMediaMedia();
|
263 |
-
if (wp_verify_nonce($nonce, 'rtmedia_bulk_delete_nonce') && isset($_POST['selected'])) {
|
264 |
-
$ids = $_POST['selected'];
|
265 |
-
foreach ($ids as $id) {
|
266 |
-
$media->delete($id);
|
267 |
}
|
268 |
}
|
269 |
-
wp_safe_redirect($_POST['_wp_http_referer']);
|
270 |
}
|
271 |
|
272 |
-
function single_delete() {
|
273 |
global $rtmedia_query;
|
274 |
-
$nonce = $_REQUEST['rtmedia_media_nonce'];
|
275 |
-
if (wp_verify_nonce($nonce, 'rtmedia_' . $rtmedia_query->media[0]->id)) {
|
276 |
|
277 |
// do_action('rtmedia_before_delete_media',$rtmedia_query->media[ 0 ]->id);
|
278 |
|
279 |
$id = $_POST;
|
280 |
-
unset($id['rtmedia_media_nonce']);
|
281 |
-
unset($id['_wp_http_referer']);
|
282 |
$media = new RTMediaMedia();
|
283 |
-
$media->delete($rtmedia_query->media[0]->id);
|
284 |
|
285 |
-
$post = get_post($rtmedia_query->media[0]);
|
286 |
|
287 |
$parent_link = '';
|
288 |
-
if (function_exists('bp_core_get_user_domain')) {
|
289 |
-
$parent_link = bp_core_get_user_domain($post->media_author);
|
290 |
} else {
|
291 |
-
$parent_link = get_author_posts_url($post->media_author);
|
292 |
}
|
293 |
|
294 |
// do_action('rtmedia_after_delete_media',$rtmedia_query->media[ 0 ]->id);
|
295 |
-
$redirect_url = $_SERVER["HTTP_REFERER"];
|
296 |
-
|
297 |
-
|
298 |
-
if( strpos($_SERVER["HTTP_REFERER"], "/" . $rtmedia_query->media[0]->id) > 0 ){
|
299 |
-
if(isset($rtmedia_query->media[0]->album_id) && intval($rtmedia_query->media[0]->album_id) > 0){
|
300 |
-
$redirect_url = trailingslashit($parent_link). "media/" . $rtmedia_query->media[0]->album_id;
|
301 |
-
}else{
|
302 |
-
$redirect_url = trailingslashit($parent_link). "media/";
|
303 |
}
|
304 |
}
|
305 |
-
|
306 |
-
wp_redirect($redirect_url);
|
307 |
} else {
|
308 |
-
echo __("Ooops !!! Invalid access. No nonce was found !!", "rtmedia");
|
309 |
}
|
310 |
}
|
311 |
|
312 |
-
function album_delete() {
|
313 |
global $rtmedia_query;
|
314 |
-
$nonce = $_REQUEST['rtmedia_delete_album_nonce'];
|
315 |
-
if (wp_verify_nonce($nonce, 'rtmedia_delete_album_' . $rtmedia_query->media_query['album_id'])) {
|
316 |
$media = new RTMediaMedia();
|
317 |
$model = new RTMediaModel();
|
318 |
-
$album_contents = $model->get(array('album_id' => $rtmedia_query->media_query['album_id']), false, false);
|
319 |
-
foreach ($album_contents as $album_media) {
|
320 |
-
$media->delete($album_media->id);
|
321 |
}
|
322 |
-
$media->delete($rtmedia_query->media_query['album_id']);
|
323 |
}
|
324 |
-
wp_safe_redirect(get_rtmedia_user_link(get_current_user_id()) . 'media/album/');
|
325 |
exit;
|
326 |
}
|
327 |
|
328 |
-
function check_return_merge() {
|
329 |
global $rtmedia_query;
|
330 |
-
if ($rtmedia_query->action_query->action != 'merge')
|
331 |
return;
|
332 |
-
$nonce = $_REQUEST['rtmedia_merge_album_nonce'];
|
333 |
-
if (wp_verify_nonce($nonce, 'rtmedia_merge_album_' . $rtmedia_query->media_query['album_id'])) {
|
334 |
$media = new RTMediaMedia();
|
335 |
$model = new RTMediaModel();
|
336 |
-
$album_contents = $model->get(array('album_id' => $rtmedia_query->media_query['album_id']), false, false);
|
337 |
// print_r($album_contents); die;
|
338 |
-
$album_move_details = $model->get_media(array('id' => $_POST['album']), false, false);
|
339 |
-
foreach ($album_contents as $album_media) {
|
340 |
|
341 |
-
$post_array['ID'] = $album_media->media_id;
|
342 |
-
$post_array['post_parent'] = $album_move_details[0]->media_id;
|
343 |
-
wp_update_post($post_array);
|
344 |
-
$media->update($album_media->id, array('album_id' => $album_move_details[0]->id), $album_media->media_id);
|
345 |
}
|
346 |
-
$media->delete($rtmedia_query->media_query['album_id']);
|
347 |
}
|
348 |
-
wp_safe_redirect(get_rtmedia_user_link(get_current_user_id()) . 'media/album/');
|
349 |
exit;
|
350 |
}
|
351 |
|
352 |
-
function check_return_comments() {
|
353 |
global $rtmedia_query;
|
354 |
|
355 |
-
if ($rtmedia_query->action_query->action != 'comment')
|
356 |
return;
|
357 |
-
if (isset($rtmedia_query->action_query->id) && count($_POST)) {
|
358 |
/**
|
359 |
* /media/comments [POST]
|
360 |
* Post a comment to the album by post id
|
361 |
*/
|
362 |
-
$nonce = $_REQUEST['rtmedia_comment_nonce'];
|
363 |
-
if (wp_verify_nonce($nonce, 'rtmedia_comment_nonce')) {
|
364 |
-
if (empty($_POST['comment_content'])) {
|
365 |
return false;
|
366 |
}
|
367 |
$comment = new RTMediaComment();
|
368 |
$attr = $_POST;
|
369 |
$mediaModel = new RTMediaModel();
|
370 |
-
$result = $mediaModel->get(array('id' => $rtmedia_query->action_query->id));
|
|
|
|
|
|
|
|
|
371 |
|
372 |
-
if (!isset($attr['comment_post_ID']))
|
373 |
-
$attr['comment_post_ID'] = $result[0]->media_id;
|
374 |
-
$id = $comment->add($attr);
|
375 |
|
376 |
-
|
377 |
-
if ($result[0]->activity_id != NULL) {
|
378 |
global $rtmedia_buddypress_activity;
|
379 |
-
remove_action("bp_activity_comment_posted", array($rtmedia_buddypress_activity, "comment_sync"), 10, 2);
|
380 |
-
if (function_exists('bp_activity_new_comment')) {
|
381 |
-
bp_activity_new_comment(array('content' => $_POST['comment_content'], 'activity_id' => $result[0]->activity_id));
|
382 |
}
|
383 |
}
|
384 |
-
if (isset($_POST["rtajax"])) {
|
385 |
global $wpdb;
|
386 |
-
$comments = $wpdb->get_row($wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_ID = %d", $id), ARRAY_A);
|
387 |
-
echo rmedia_single_comment($comments);
|
388 |
exit;
|
389 |
}
|
390 |
} else {
|
@@ -399,8 +403,8 @@ class RTMediaTemplate {
|
|
399 |
* @param type $allowed_type
|
400 |
* @return type
|
401 |
*/
|
402 |
-
function get_allowed_type_name($allowed_type) {
|
403 |
-
return $allowed_type['name'];
|
404 |
}
|
405 |
|
406 |
/**
|
@@ -410,44 +414,44 @@ class RTMediaTemplate {
|
|
410 |
* @param string $attr
|
411 |
* @return type
|
412 |
*/
|
413 |
-
function sanitize_gallery_attributes(&$attr) {
|
414 |
global $rtmedia;
|
415 |
|
416 |
$flag = true;
|
417 |
|
418 |
-
if (isset($attr['media_type'])) {
|
419 |
-
$allowed_type_names = array_map(array($this, 'get_allowed_type_name'), $rtmedia->allowed_types);
|
420 |
|
421 |
-
if (strtolower($attr['media_type']) == 'all') {
|
422 |
$flag = $flag && true;
|
423 |
-
unset($attr['media_type']);
|
424 |
}
|
425 |
else
|
426 |
-
$flag = $flag && in_array($attr['media_type'], $allowed_type_names);
|
427 |
}
|
428 |
|
429 |
-
if (isset($attr['order_by'])) {
|
430 |
|
431 |
-
$allowed_columns = array('date', 'views', 'downloads', 'ratings', 'likes', 'dislikes');
|
432 |
-
$allowed_columns = apply_filters('filter_allowed_sorting_columns', $allowed_columns);
|
433 |
|
434 |
-
$flag = $flag && in_array($attr['order_by'], $allowed_columns);
|
435 |
|
436 |
-
if (strtolower($attr['order_by']) == 'date')
|
437 |
-
$attr['order_by'] = 'media_id';
|
438 |
}
|
439 |
|
440 |
-
if (isset($attr['order'])) {
|
441 |
-
$flag = $flag && strtolower($attr['order']) == 'asc' || strtolower($attr['order']) == 'desc';
|
442 |
}
|
443 |
|
444 |
return $flag;
|
445 |
}
|
446 |
|
447 |
-
function update_global_query($attr) {
|
448 |
|
449 |
global $rtmedia_query;
|
450 |
-
$rtmedia_query->query($attr);
|
451 |
}
|
452 |
|
453 |
/**
|
@@ -455,9 +459,9 @@ class RTMediaTemplate {
|
|
455 |
*
|
456 |
* @return type
|
457 |
*/
|
458 |
-
function get_default_template() {
|
459 |
|
460 |
-
return apply_filters('rtmedia_media_template_include', self::locate_template('main', ''));
|
461 |
}
|
462 |
|
463 |
/**
|
@@ -466,27 +470,27 @@ class RTMediaTemplate {
|
|
466 |
* @param type $template
|
467 |
* @return string
|
468 |
*/
|
469 |
-
static function locate_template($template = false, $context = false
|
470 |
$located = '';
|
471 |
-
if (
|
472 |
global $rtmedia_query;
|
473 |
|
474 |
-
if (is_rtmedia_album_gallery()) {
|
475 |
$template = 'album-gallery';
|
476 |
-
} elseif (is_rtmedia_album() || is_rtmedia_gallery()) {
|
477 |
$template = 'media-gallery';
|
478 |
if (
|
479 |
-
is_rtmedia_album() &&
|
480 |
-
isset($rtmedia_query->media_query) &&
|
481 |
$rtmedia_query->action_query->action == 'edit'
|
482 |
) {
|
483 |
-
if (isset($rtmedia_query->media_query['media_author']) && (get_current_user_id() == $rtmedia_query->media_query['media_author'])) {
|
484 |
$template = 'album-single-edit';
|
485 |
}
|
486 |
}
|
487 |
-
} else if (is_rtmedia_single()) {
|
488 |
$template = 'media-single';
|
489 |
-
if ($rtmedia_query->action_query->action == 'edit')
|
490 |
$template = 'media-single-edit';
|
491 |
}else {
|
492 |
return;
|
@@ -496,10 +500,10 @@ class RTMediaTemplate {
|
|
496 |
|
497 |
$template_name = $template . '.php';
|
498 |
|
499 |
-
if ($context === false) {
|
500 |
$context = 'media/';
|
501 |
}
|
502 |
-
if (
|
503 |
$context .='/';
|
504 |
}
|
505 |
|
@@ -509,24 +513,23 @@ class RTMediaTemplate {
|
|
509 |
|
510 |
|
511 |
|
512 |
-
if (file_exists(trailingslashit(STYLESHEETPATH) . $path . $template_name)) {
|
513 |
-
if($url){
|
514 |
-
$located = trailingslashit(get_stylesheet_directory_uri()) . $path . $template_name;
|
515 |
-
}else{
|
516 |
-
$located = trailingslashit(STYLESHEETPATH) . $path . $template_name;
|
517 |
}
|
518 |
-
} else if (file_exists(trailingslashit(TEMPLATEPATH) . $path . $template_name)) {
|
519 |
-
if($url){
|
520 |
-
$located = trailingslashit(get_template_directory_uri()). $path . $template_name;
|
521 |
-
}else{
|
522 |
-
$located = trailingslashit(TEMPLATEPATH) . $path . $template_name;
|
523 |
}
|
524 |
-
|
525 |
} else {
|
526 |
-
if($url){
|
527 |
-
$located = trailingslashit(RTMEDIA_URL) . $ogpath . $template_name;
|
528 |
-
}else{
|
529 |
-
$located = trailingslashit(RTMEDIA_PATH) . $ogpath . $template_name;
|
530 |
}
|
531 |
}
|
532 |
|
12 |
|
13 |
public $media_args;
|
14 |
|
15 |
+
function __construct () {
|
16 |
global $rtmedia_query;
|
17 |
+
if ( $rtmedia_query ) {
|
18 |
+
add_action ( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
|
19 |
+
add_action ( 'wp_enqueue_scripts', array( $this, 'enqueue_image_editor_scripts' ) );
|
20 |
}
|
21 |
}
|
22 |
|
23 |
/**
|
24 |
* Enqueues required scripts on the page
|
25 |
*/
|
26 |
+
function enqueue_scripts () {
|
27 |
+
wp_enqueue_script ( 'rtmedia-backbone' );
|
28 |
+
$is_album = is_rtmedia_album () ? true : false;
|
29 |
+
$is_edit_allowed = is_rtmedia_edit_allowed () ? true : false;
|
30 |
+
wp_localize_script ( 'rtmedia-backbone', 'is_album', array( $is_album ) );
|
31 |
+
wp_localize_script ( 'rtmedia-backbone', 'is_edit_allowed', array( $is_edit_allowed ) );
|
32 |
}
|
33 |
|
34 |
+
function enqueue_image_editor_scripts () {
|
35 |
+
$suffix = defined ( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
|
36 |
+
wp_enqueue_script ( 'wp-ajax-response' );
|
37 |
+
wp_enqueue_script ( 'rtmedia-image-edit', admin_url ( "js/image-edit$suffix.js" ), array( 'jquery', 'json2', 'imgareaselect' ), false, 1 );
|
38 |
+
wp_enqueue_style ( 'rtmedia-image-edit', RTMEDIA_URL . 'app/assets/css/image-edit.css' );
|
39 |
+
wp_enqueue_style ( 'rtmedia-image-area-select', includes_url ( '/js/imgareaselect/imgareaselect.css' ) );
|
40 |
}
|
41 |
|
42 |
/**
|
51 |
* @param type $shortcode_attr
|
52 |
* @return type
|
53 |
*/
|
54 |
+
function set_template ( $template, $shortcode_attr = false ) {
|
55 |
|
56 |
global $rtmedia_query, $rtmedia_interaction, $rtmedia_media;
|
57 |
|
58 |
+
do_action ( 'rtmedia_pre_template' );
|
59 |
|
60 |
//print_r($rtmedia_query);
|
61 |
|
62 |
+
if ( isset ( $rtmedia_query->action_query->action ) ) {
|
63 |
//echo $rtmedia_query->action_query->action;
|
64 |
+
do_action ( 'rtmedia_pre_action_' . $rtmedia_query->action_query->action );
|
65 |
} else {
|
66 |
+
do_action ( 'rtmedia_pre_action_default' );
|
67 |
}
|
68 |
|
69 |
+
$this->check_return_json ();
|
70 |
|
71 |
+
$this->check_return_upload ();
|
72 |
|
73 |
+
if ( in_array ( $rtmedia_interaction->context->type, array( "profile", "group" ) ) ) {
|
74 |
|
75 |
|
76 |
+
$this->check_return_edit ();
|
77 |
|
78 |
+
$this->check_return_delete ();
|
79 |
|
80 |
+
$this->check_return_merge ();
|
81 |
|
82 |
+
$this->check_return_comments ();
|
83 |
|
84 |
+
return $this->get_default_template ();
|
85 |
+
} else if ( ! $shortcode_attr ) {
|
86 |
+
return $this->get_default_template ();
|
87 |
+
} else if ( $shortcode_attr[ 'name' ] == 'gallery' ) {
|
88 |
+
$valid = $this->sanitize_gallery_attributes ( $shortcode_attr[ 'attr' ] );
|
89 |
+
if ( $valid ) {
|
90 |
+
if ( is_array ( $shortcode_attr[ 'attr' ] ) ) {
|
91 |
+
$this->update_global_query ( $shortcode_attr[ 'attr' ] );
|
92 |
}
|
93 |
global $rtaccount;
|
94 |
+
if ( ! isset ( $rtaccount ) ) {
|
95 |
$rtaccount = 0;
|
96 |
}
|
97 |
+
//add_action("rtmedia_before_media_gallery",array(&$this,"")) ;
|
98 |
+
$this->add_hidden_fields_in_gallery ();
|
99 |
+
include $this->locate_template ( $template );
|
100 |
} else {
|
101 |
+
echo __ ( 'Invalid attribute passed for rtmedia_gallery shortcode.', 'rtmedia' );
|
102 |
return false;
|
103 |
}
|
104 |
}
|
105 |
}
|
106 |
+
|
107 |
+
function add_hidden_fields_in_gallery () {
|
108 |
global $rtmedia_query;
|
109 |
+
$return_str = "<input name='rtmedia_shortcode' value='true' type='hidden' />";
|
110 |
+
if ( $rtmedia_query->original_query && is_array ( $rtmedia_query->original_query ) ) {
|
111 |
+
foreach ( $rtmedia_query->original_query as $key => $val ) {
|
112 |
$return_str.= '<input name="' . $key . '" value="' . $val . '" type="hidden" />';
|
|
|
113 |
}
|
114 |
}
|
115 |
+
echo $return_str;
|
116 |
}
|
117 |
+
|
118 |
+
function check_return_json () {
|
119 |
global $rtmedia_query;
|
120 |
+
if ( $rtmedia_query->format == 'json' ) {
|
121 |
+
$this->json_output ();
|
122 |
} else {
|
123 |
return;
|
124 |
}
|
125 |
}
|
126 |
|
127 |
+
function check_return_upload () {
|
128 |
global $rtmedia_query;
|
129 |
+
if ( $rtmedia_query->action_query->action != 'upload' )
|
130 |
return;
|
131 |
$upload = new RTMediaUploadEndpoint();
|
132 |
+
$upload->template_redirect ();
|
133 |
}
|
134 |
|
135 |
+
function json_output () {
|
136 |
global $rtmedia_query;
|
137 |
+
$media_array = array( );
|
138 |
+
if ( $rtmedia_query->media ) {
|
139 |
+
foreach ( $rtmedia_query->media as $key => $media ) {
|
140 |
+
$media_array[ $key ] = $media;
|
141 |
+
list($src, $width, $height) = wp_get_attachment_image_src ( $media->media_id, 'rt_media_thumbnail' );
|
142 |
+
if ( ! $src ) {
|
143 |
global $rtmedia;
|
144 |
+
$src = $rtmedia->allowed_types[ $media->media_type ][ "thumbnail" ];
|
145 |
}
|
146 |
+
$media_array[ $key ]->guid = $src;
|
147 |
+
$media_array[ $key ]->rt_permalink = get_rtmedia_permalink ( $media->id );
|
148 |
}
|
149 |
}
|
150 |
+
$return_array[ 'data' ] = $media_array;
|
151 |
+
$return_array[ 'prev' ] = rtmedia_page () - 1;
|
152 |
+
$return_array[ 'next' ] = (rtmedia_offset () + rtmedia_per_page_media () < rtmedia_count ()) ? (rtmedia_page () + 1) : -1;
|
153 |
+
echo json_encode ( $return_array );
|
154 |
die;
|
155 |
}
|
156 |
|
157 |
+
function check_return_edit () {
|
158 |
global $rtmedia_query;
|
159 |
+
if ( $rtmedia_query->action_query->action == 'edit' && count ( $_POST ) )
|
160 |
+
$this->save_edit ();
|
161 |
+
return $this->get_default_template ();
|
162 |
}
|
163 |
|
164 |
+
function save_edit () {
|
165 |
+
if ( is_rtmedia_single () ) {
|
166 |
+
$this->save_single_edit ();
|
167 |
+
} elseif ( is_rtmedia_album () ) {
|
168 |
+
$this->save_album_edit ();
|
169 |
}
|
170 |
}
|
171 |
|
172 |
+
function save_single_edit () {
|
173 |
global $rtmedia_query;
|
174 |
+
$nonce = $_POST[ 'rtmedia_media_nonce' ];
|
175 |
+
if ( wp_verify_nonce ( $nonce, 'rtmedia_' . $rtmedia_query->action_query->id ) ) {
|
176 |
+
do_action ( 'rtmedia_before_update_media', $rtmedia_query->action_query->id );
|
177 |
+
$data = rtmedia_sanitize_object ( $_POST, array( 'media_title', 'description', 'privacy' ) );
|
178 |
$media = new RTMediaMedia();
|
179 |
+
$state = $media->update ( $rtmedia_query->action_query->id, $data, $rtmedia_query->media[ 0 ]->media_id );
|
180 |
+
$rtmedia_query->query ( false );
|
181 |
+
do_action ( 'rtmedia_after_update_media', $rtmedia_query->action_query->id, $state );
|
182 |
+
if ( $state !== false ) {
|
183 |
+
add_action ( "rtmedia_before_template_load", array( &$this, "media_update_success_messege" ) );
|
184 |
+
} else {
|
185 |
+
add_action ( "rtmedia_before_template_load", array( &$this, "media_update_success_error" ) );
|
186 |
}
|
187 |
} else {
|
188 |
+
echo __ ( "Ooops !!! Invalid access. No nonce was found !!", "rtmedia" );
|
189 |
}
|
190 |
}
|
191 |
+
|
192 |
+
function media_update_success_messege () {
|
193 |
+
$message = apply_filters ( "rtmedia_update_media_message", "Media updated Sucessfully", false );
|
194 |
+
$html = "<div class='rtmedia-success media-edit-messge'><p>" . __ ( $message, "rtmedia" ) . "</p></div>";
|
195 |
+
echo apply_filters ( "rtmedia_update_media_message_html", $html, $message, false );
|
196 |
}
|
197 |
+
|
198 |
+
function media_update_success_error () {
|
199 |
+
$message = apply_filters ( "rtmedia_update_media_message", "Error in updating Media", true );
|
200 |
+
$html = "<div class='rtmedia-error media-edit-messge'><p>" . __ ( $message, "rtmedia" ) . "</p></div>";
|
201 |
+
echo apply_filters ( "rtmedia_update_media_message_html", $html, $message, true );
|
202 |
}
|
203 |
+
|
204 |
+
function save_album_edit () {
|
205 |
global $rtmedia_query;
|
206 |
+
$nonce = $_REQUEST[ 'rtmedia_media_nonce' ];
|
207 |
+
if ( wp_verify_nonce ( $nonce, 'rtmedia_' . $rtmedia_query->media_query[ 'album_id' ] ) ) {
|
208 |
$media = new RTMediaMedia();
|
209 |
$model = new RTMediaModel();
|
210 |
+
if ( isset ( $_POST[ 'submit' ] ) ) {
|
211 |
$data = $_POST;
|
212 |
+
unset ( $data[ 'rtmedia_media_nonce' ] );
|
213 |
+
unset ( $data[ '_wp_http_referer' ] );
|
214 |
+
unset ( $data[ 'submit' ] );
|
215 |
+
$album = $model->get_media ( array( 'id' => $rtmedia_query->media_query[ 'album_id' ] ), false, false );
|
216 |
+
$media->update ( $album[ 0 ]->id, $data, $album[ 0 ]->media_id );
|
217 |
+
} elseif ( isset ( $_POST[ 'move-selected' ] ) ) {
|
218 |
// print_r($_POST);die;
|
219 |
+
$album_move = $_POST[ 'album' ];
|
220 |
$selected_ids = NULL;
|
221 |
|
222 |
+
if ( isset ( $_POST[ 'selected' ] ) ) {
|
223 |
+
$selected_ids = $_POST[ 'selected' ];
|
224 |
+
unset ( $_POST[ 'selected' ] );
|
225 |
}
|
226 |
+
if ( ! empty ( $selected_ids ) && is_array ( $selected_ids ) ) {
|
227 |
+
$album_move_details = $model->get_media ( array( 'id' => $album_move ), false, false );
|
228 |
+
foreach ( $selected_ids as $media_id ) {
|
229 |
+
$media_details = $model->get_media ( array( 'id' => $media_id ), false, false );
|
230 |
+
$post_array[ 'ID' ] = $media_details[ 0 ]->media_id;
|
231 |
+
$post_array[ 'post_parent' ] = $album_move_details[ 0 ]->media_id;
|
232 |
+
wp_update_post ( $post_array );
|
233 |
+
$media->update ( $media_details[ 0 ]->id, array( 'album_id' => $album_move_details[ 0 ]->id ), $media_details[ 0 ]->media_id );
|
234 |
}
|
235 |
}
|
236 |
}
|
237 |
+
wp_safe_redirect ( get_rtmedia_permalink ( $rtmedia_query->media_query[ 'album_id' ] ) . 'edit/' );
|
238 |
} else {
|
239 |
+
echo __ ( "Ooops !!! Invalid access. No nonce was found !!", "rtmedia" );
|
240 |
}
|
241 |
}
|
242 |
|
243 |
+
function check_return_delete () {
|
244 |
|
245 |
global $rtmedia_query;
|
246 |
+
if ( $rtmedia_query->action_query->action != 'delete' )
|
247 |
return;
|
248 |
+
if ( ! count ( $_POST ) )
|
249 |
return;
|
250 |
|
251 |
+
if ( isset ( $rtmedia_query->action_query->default ) && $rtmedia_query->action_query->default == 'delete' ) {
|
252 |
+
$this->bulk_delete ();
|
253 |
} else {
|
254 |
+
if ( is_rtmedia_single () ) {
|
255 |
+
$this->single_delete ();
|
256 |
+
} elseif ( is_rtmedia_album () ) {
|
257 |
|
258 |
+
$this->album_delete ();
|
259 |
}
|
260 |
}
|
261 |
}
|
262 |
|
263 |
+
function bulk_delete () {
|
264 |
+
$nonce = $_POST[ 'rtmedia_bulk_delete_nonce' ];
|
265 |
|
266 |
$media = new RTMediaMedia();
|
267 |
+
if ( wp_verify_nonce ( $nonce, 'rtmedia_bulk_delete_nonce' ) && isset ( $_POST[ 'selected' ] ) ) {
|
268 |
+
$ids = $_POST[ 'selected' ];
|
269 |
+
foreach ( $ids as $id ) {
|
270 |
+
$media->delete ( $id );
|
271 |
}
|
272 |
}
|
273 |
+
wp_safe_redirect ( $_POST[ '_wp_http_referer' ] );
|
274 |
}
|
275 |
|
276 |
+
function single_delete () {
|
277 |
global $rtmedia_query;
|
278 |
+
$nonce = $_REQUEST[ 'rtmedia_media_nonce' ];
|
279 |
+
if ( wp_verify_nonce ( $nonce, 'rtmedia_' . $rtmedia_query->media[ 0 ]->id ) ) {
|
280 |
|
281 |
// do_action('rtmedia_before_delete_media',$rtmedia_query->media[ 0 ]->id);
|
282 |
|
283 |
$id = $_POST;
|
284 |
+
unset ( $id[ 'rtmedia_media_nonce' ] );
|
285 |
+
unset ( $id[ '_wp_http_referer' ] );
|
286 |
$media = new RTMediaMedia();
|
287 |
+
$media->delete ( $rtmedia_query->media[ 0 ]->id );
|
288 |
|
289 |
+
$post = get_post ( $rtmedia_query->media[ 0 ] );
|
290 |
|
291 |
$parent_link = '';
|
292 |
+
if ( function_exists ( 'bp_core_get_user_domain' ) ) {
|
293 |
+
$parent_link = bp_core_get_user_domain ( $post->media_author );
|
294 |
} else {
|
295 |
+
$parent_link = get_author_posts_url ( $post->media_author );
|
296 |
}
|
297 |
|
298 |
// do_action('rtmedia_after_delete_media',$rtmedia_query->media[ 0 ]->id);
|
299 |
+
$redirect_url = $_SERVER[ "HTTP_REFERER" ];
|
300 |
+
|
301 |
+
|
302 |
+
if ( strpos ( $_SERVER[ "HTTP_REFERER" ], "/" . $rtmedia_query->media[ 0 ]->id ) > 0 ) {
|
303 |
+
if ( isset ( $rtmedia_query->media[ 0 ]->album_id ) && intval ( $rtmedia_query->media[ 0 ]->album_id ) > 0 ) {
|
304 |
+
$redirect_url = trailingslashit ( $parent_link ) . "media/" . $rtmedia_query->media[ 0 ]->album_id;
|
305 |
+
} else {
|
306 |
+
$redirect_url = trailingslashit ( $parent_link ) . "media/";
|
307 |
}
|
308 |
}
|
309 |
+
|
310 |
+
wp_redirect ( $redirect_url );
|
311 |
} else {
|
312 |
+
echo __ ( "Ooops !!! Invalid access. No nonce was found !!", "rtmedia" );
|
313 |
}
|
314 |
}
|
315 |
|
316 |
+
function album_delete () {
|
317 |
global $rtmedia_query;
|
318 |
+
$nonce = $_REQUEST[ 'rtmedia_delete_album_nonce' ];
|
319 |
+
if ( wp_verify_nonce ( $nonce, 'rtmedia_delete_album_' . $rtmedia_query->media_query[ 'album_id' ] ) ) {
|
320 |
$media = new RTMediaMedia();
|
321 |
$model = new RTMediaModel();
|
322 |
+
$album_contents = $model->get ( array( 'album_id' => $rtmedia_query->media_query[ 'album_id' ] ), false, false );
|
323 |
+
foreach ( $album_contents as $album_media ) {
|
324 |
+
$media->delete ( $album_media->id );
|
325 |
}
|
326 |
+
$media->delete ( $rtmedia_query->media_query[ 'album_id' ] );
|
327 |
}
|
328 |
+
wp_safe_redirect ( get_rtmedia_user_link ( get_current_user_id () ) . 'media/album/' );
|
329 |
exit;
|
330 |
}
|
331 |
|
332 |
+
function check_return_merge () {
|
333 |
global $rtmedia_query;
|
334 |
+
if ( $rtmedia_query->action_query->action != 'merge' )
|
335 |
return;
|
336 |
+
$nonce = $_REQUEST[ 'rtmedia_merge_album_nonce' ];
|
337 |
+
if ( wp_verify_nonce ( $nonce, 'rtmedia_merge_album_' . $rtmedia_query->media_query[ 'album_id' ] ) ) {
|
338 |
$media = new RTMediaMedia();
|
339 |
$model = new RTMediaModel();
|
340 |
+
$album_contents = $model->get ( array( 'album_id' => $rtmedia_query->media_query[ 'album_id' ] ), false, false );
|
341 |
// print_r($album_contents); die;
|
342 |
+
$album_move_details = $model->get_media ( array( 'id' => $_POST[ 'album' ] ), false, false );
|
343 |
+
foreach ( $album_contents as $album_media ) {
|
344 |
|
345 |
+
$post_array[ 'ID' ] = $album_media->media_id;
|
346 |
+
$post_array[ 'post_parent' ] = $album_move_details[ 0 ]->media_id;
|
347 |
+
wp_update_post ( $post_array );
|
348 |
+
$media->update ( $album_media->id, array( 'album_id' => $album_move_details[ 0 ]->id ), $album_media->media_id );
|
349 |
}
|
350 |
+
$media->delete ( $rtmedia_query->media_query[ 'album_id' ] );
|
351 |
}
|
352 |
+
wp_safe_redirect ( get_rtmedia_user_link ( get_current_user_id () ) . 'media/album/' );
|
353 |
exit;
|
354 |
}
|
355 |
|
356 |
+
function check_return_comments () {
|
357 |
global $rtmedia_query;
|
358 |
|
359 |
+
if ( $rtmedia_query->action_query->action != 'comment' )
|
360 |
return;
|
361 |
+
if ( isset ( $rtmedia_query->action_query->id ) && count ( $_POST ) ) {
|
362 |
/**
|
363 |
* /media/comments [POST]
|
364 |
* Post a comment to the album by post id
|
365 |
*/
|
366 |
+
$nonce = $_REQUEST[ 'rtmedia_comment_nonce' ];
|
367 |
+
if ( wp_verify_nonce ( $nonce, 'rtmedia_comment_nonce' ) ) {
|
368 |
+
if ( empty ( $_POST[ 'comment_content' ] ) ) {
|
369 |
return false;
|
370 |
}
|
371 |
$comment = new RTMediaComment();
|
372 |
$attr = $_POST;
|
373 |
$mediaModel = new RTMediaModel();
|
374 |
+
$result = $mediaModel->get ( array( 'id' => $rtmedia_query->action_query->id ) );
|
375 |
+
|
376 |
+
if ( ! isset ( $attr[ 'comment_post_ID' ] ) )
|
377 |
+
$attr[ 'comment_post_ID' ] = $result[ 0 ]->media_id;
|
378 |
+
$id = $comment->add ( $attr );
|
379 |
|
|
|
|
|
|
|
380 |
|
381 |
+
if ( $result[ 0 ]->activity_id != NULL ) {
|
|
|
382 |
global $rtmedia_buddypress_activity;
|
383 |
+
remove_action ( "bp_activity_comment_posted", array( $rtmedia_buddypress_activity, "comment_sync" ), 10, 2 );
|
384 |
+
if ( function_exists ( 'bp_activity_new_comment' ) ) {
|
385 |
+
bp_activity_new_comment ( array( 'content' => $_POST[ 'comment_content' ], 'activity_id' => $result[ 0 ]->activity_id ) );
|
386 |
}
|
387 |
}
|
388 |
+
if ( isset ( $_POST[ "rtajax" ] ) ) {
|
389 |
global $wpdb;
|
390 |
+
$comments = $wpdb->get_row ( $wpdb->prepare ( "SELECT * FROM $wpdb->comments WHERE comment_ID = %d", $id ), ARRAY_A );
|
391 |
+
echo rmedia_single_comment ( $comments );
|
392 |
exit;
|
393 |
}
|
394 |
} else {
|
403 |
* @param type $allowed_type
|
404 |
* @return type
|
405 |
*/
|
406 |
+
function get_allowed_type_name ( $allowed_type ) {
|
407 |
+
return $allowed_type[ 'name' ];
|
408 |
}
|
409 |
|
410 |
/**
|
414 |
* @param string $attr
|
415 |
* @return type
|
416 |
*/
|
417 |
+
function sanitize_gallery_attributes ( &$attr ) {
|
418 |
global $rtmedia;
|
419 |
|
420 |
$flag = true;
|
421 |
|
422 |
+
if ( isset ( $attr[ 'media_type' ] ) ) {
|
423 |
+
$allowed_type_names = array_map ( array( $this, 'get_allowed_type_name' ), $rtmedia->allowed_types );
|
424 |
|
425 |
+
if ( strtolower ( $attr[ 'media_type' ] ) == 'all' ) {
|
426 |
$flag = $flag && true;
|
427 |
+
unset ( $attr[ 'media_type' ] );
|
428 |
}
|
429 |
else
|
430 |
+
$flag = $flag && in_array ( $attr[ 'media_type' ], $allowed_type_names );
|
431 |
}
|
432 |
|
433 |
+
if ( isset ( $attr[ 'order_by' ] ) ) {
|
434 |
|
435 |
+
$allowed_columns = array( 'date', 'views', 'downloads', 'ratings', 'likes', 'dislikes' );
|
436 |
+
$allowed_columns = apply_filters ( 'filter_allowed_sorting_columns', $allowed_columns );
|
437 |
|
438 |
+
$flag = $flag && in_array ( $attr[ 'order_by' ], $allowed_columns );
|
439 |
|
440 |
+
if ( strtolower ( $attr[ 'order_by' ] ) == 'date' )
|
441 |
+
$attr[ 'order_by' ] = 'media_id';
|
442 |
}
|
443 |
|
444 |
+
if ( isset ( $attr[ 'order' ] ) ) {
|
445 |
+
$flag = $flag && strtolower ( $attr[ 'order' ] ) == 'asc' || strtolower ( $attr[ 'order' ] ) == 'desc';
|
446 |
}
|
447 |
|
448 |
return $flag;
|
449 |
}
|
450 |
|
451 |
+
function update_global_query ( $attr ) {
|
452 |
|
453 |
global $rtmedia_query;
|
454 |
+
$rtmedia_query->query ( $attr );
|
455 |
}
|
456 |
|
457 |
/**
|
459 |
*
|
460 |
* @return type
|
461 |
*/
|
462 |
+
function get_default_template () {
|
463 |
|
464 |
+
return apply_filters ( 'rtmedia_media_template_include', self::locate_template ( 'main', '' ) );
|
465 |
}
|
466 |
|
467 |
/**
|
470 |
* @param type $template
|
471 |
* @return string
|
472 |
*/
|
473 |
+
static function locate_template ( $template = false, $context = false, $url = false ) {
|
474 |
$located = '';
|
475 |
+
if ( ! $template ) {
|
476 |
global $rtmedia_query;
|
477 |
|
478 |
+
if ( is_rtmedia_album_gallery () ) {
|
479 |
$template = 'album-gallery';
|
480 |
+
} elseif ( is_rtmedia_album () || is_rtmedia_gallery () ) {
|
481 |
$template = 'media-gallery';
|
482 |
if (
|
483 |
+
is_rtmedia_album () &&
|
484 |
+
isset ( $rtmedia_query->media_query ) &&
|
485 |
$rtmedia_query->action_query->action == 'edit'
|
486 |
) {
|
487 |
+
if ( isset ( $rtmedia_query->media_query[ 'media_author' ] ) && (get_current_user_id () == $rtmedia_query->media_query[ 'media_author' ]) ) {
|
488 |
$template = 'album-single-edit';
|
489 |
}
|
490 |
}
|
491 |
+
} else if ( is_rtmedia_single () ) {
|
492 |
$template = 'media-single';
|
493 |
+
if ( $rtmedia_query->action_query->action == 'edit' )
|
494 |
$template = 'media-single-edit';
|
495 |
}else {
|
496 |
return;
|
500 |
|
501 |
$template_name = $template . '.php';
|
502 |
|
503 |
+
if ( $context === false ) {
|
504 |
$context = 'media/';
|
505 |
}
|
506 |
+
if ( ! $context === '' ) {
|
507 |
$context .='/';
|
508 |
}
|
509 |
|
513 |
|
514 |
|
515 |
|
516 |
+
if ( file_exists ( trailingslashit ( STYLESHEETPATH ) . $path . $template_name ) ) {
|
517 |
+
if ( $url ) {
|
518 |
+
$located = trailingslashit ( get_stylesheet_directory_uri () ) . $path . $template_name;
|
519 |
+
} else {
|
520 |
+
$located = trailingslashit ( STYLESHEETPATH ) . $path . $template_name;
|
521 |
}
|
522 |
+
} else if ( file_exists ( trailingslashit ( TEMPLATEPATH ) . $path . $template_name ) ) {
|
523 |
+
if ( $url ) {
|
524 |
+
$located = trailingslashit ( get_template_directory_uri () ) . $path . $template_name;
|
525 |
+
} else {
|
526 |
+
$located = trailingslashit ( TEMPLATEPATH ) . $path . $template_name;
|
527 |
}
|
|
|
528 |
} else {
|
529 |
+
if ( $url ) {
|
530 |
+
$located = trailingslashit ( RTMEDIA_URL ) . $ogpath . $template_name;
|
531 |
+
} else {
|
532 |
+
$located = trailingslashit ( RTMEDIA_PATH ) . $ogpath . $template_name;
|
533 |
}
|
534 |
}
|
535 |
|
app/main/controllers/template/rt-template-functions.php
CHANGED
@@ -49,6 +49,61 @@ function rtmedia_title () {
|
|
49 |
}
|
50 |
}
|
51 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
function rtmedia_media_gallery_class () {
|
53 |
global $rtmedia_query;
|
54 |
if ( isset ( $rtmedia_query->media_query ) && isset ( $rtmedia_query->media_query[ "context_id" ] ) )
|
@@ -114,14 +169,14 @@ function rtmedia_cover_art ( $id = false ) {
|
|
114 |
* echo parmalink of the media
|
115 |
* @global type $rtmedia_media
|
116 |
*/
|
117 |
-
function rtmedia_permalink () {
|
118 |
|
119 |
global $rtmedia_backbone;
|
120 |
|
121 |
if ( $rtmedia_backbone[ 'backbone' ] ) {
|
122 |
echo '<%= rt_permalink %>';
|
123 |
} else {
|
124 |
-
echo get_rtmedia_permalink ( rtmedia_id () );
|
125 |
}
|
126 |
}
|
127 |
|
@@ -130,16 +185,17 @@ function rtmedia_media ( $size_flag = true, $echo = true, $media_size = "rt_medi
|
|
130 |
global $rtmedia_media, $rtmedia;
|
131 |
if ( isset ( $rtmedia_media->media_type ) ) {
|
132 |
if ( $rtmedia_media->media_type == 'photo' ) {
|
133 |
-
$
|
|
|
134 |
} elseif ( $rtmedia_media->media_type == 'video' ) {
|
135 |
$size = " width=\"" . $rtmedia->options[ "defaultSizes_video_singlePlayer_width" ] . "\" height=\"" . $rtmedia->options[ "defaultSizes_video_singlePlayer_height" ] . "\" ";
|
136 |
|
137 |
-
$html = '<
|
138 |
} elseif ( $rtmedia_media->media_type == 'music' ) {
|
139 |
$size = ' width="600" height="0" ';
|
140 |
if ( ! $size_flag )
|
141 |
$size = '';
|
142 |
-
$html = '<audio src="' . wp_get_attachment_url ( $rtmedia_media->media_id ) . '" ' . $size . ' type="audio/mp3" class="wp-audio-shortcode" id="bp_media_audio_' . $rtmedia_media->id . '" controls="controls" preload="
|
143 |
} else {
|
144 |
$html = false;
|
145 |
}
|
49 |
}
|
50 |
}
|
51 |
|
52 |
+
function rtmedia_author_profile_pic ( $show_link = true ) {
|
53 |
+
global $rtmedia_backbone;
|
54 |
+
if ( $rtmedia_backbone[ 'backbone' ] ) {
|
55 |
+
echo '';
|
56 |
+
} else {
|
57 |
+
global $rtmedia_media;
|
58 |
+
$show_link = apply_filters ( "rtmedia_single_media_show_profile_picture_link", $show_link );
|
59 |
+
if ( $show_link ) {
|
60 |
+
echo "<a href='" . get_rtmedia_user_link ( $rtmedia_media->media_author ) . "' title='" . rtmedia_get_author_name ( $rtmedia_media->media_author ) . "'>";
|
61 |
+
}
|
62 |
+
$size = apply_filters ( "rtmedia_single_media_profile_picture_size", 90 );
|
63 |
+
if ( function_exists ( "bp_get_user_has_avatar" ) ) {
|
64 |
+
if ( bp_core_fetch_avatar ( array( 'item_id' => $rtmedia_media->media_author, 'object' => 'user', 'no_grav' => false, 'html' => false ) ) != bp_core_avatar_default () ) {
|
65 |
+
echo bp_core_fetch_avatar ( array( 'item_id' => $rtmedia_media->media_author, 'object' => 'user', 'no_grav' => false, 'html' => true, 'width' => $size, 'height' => $size ) );
|
66 |
+
} else {
|
67 |
+
echo "<img src='" . bp_core_avatar_default () . "' width='" . $size . "' height='" . $size . "'/>";
|
68 |
+
}
|
69 |
+
} else {
|
70 |
+
echo get_avatar ( $rtmedia_media->media_author, $size );
|
71 |
+
}
|
72 |
+
if ( $show_link ) {
|
73 |
+
echo "</a>";
|
74 |
+
}
|
75 |
+
}
|
76 |
+
}
|
77 |
+
|
78 |
+
function rtmedia_author_name ( $show_link = true ) {
|
79 |
+
|
80 |
+
global $rtmedia_backbone;
|
81 |
+
if ( $rtmedia_backbone[ 'backbone' ] ) {
|
82 |
+
echo '';
|
83 |
+
} else {
|
84 |
+
global $rtmedia_media;
|
85 |
+
$show_link = apply_filters ( "rtmedia_single_media_show_profile_name_link", $show_link );
|
86 |
+
if ( $show_link ) {
|
87 |
+
echo "<a href='" . get_rtmedia_user_link ( $rtmedia_media->media_author ) . "' title='" . rtmedia_get_author_name ( $rtmedia_media->media_author ) . "'>";
|
88 |
+
}
|
89 |
+
echo rtmedia_get_author_name ( $rtmedia_media->media_author );
|
90 |
+
if ( $show_link ) {
|
91 |
+
echo "</a>";
|
92 |
+
}
|
93 |
+
}
|
94 |
+
}
|
95 |
+
|
96 |
+
function rtmedia_get_author_name ( $user_id ) {
|
97 |
+
if ( function_exists ( "bp_core_get_user_displayname" ) ) {
|
98 |
+
return bp_core_get_user_displayname ( $user_id );
|
99 |
+
} else {
|
100 |
+
$user = get_userdata ( $user_id );
|
101 |
+
if ( $user ) {
|
102 |
+
return $user->display_name;
|
103 |
+
}
|
104 |
+
}
|
105 |
+
}
|
106 |
+
|
107 |
function rtmedia_media_gallery_class () {
|
108 |
global $rtmedia_query;
|
109 |
if ( isset ( $rtmedia_query->media_query ) && isset ( $rtmedia_query->media_query[ "context_id" ] ) )
|
169 |
* echo parmalink of the media
|
170 |
* @global type $rtmedia_media
|
171 |
*/
|
172 |
+
function rtmedia_permalink ( $media_id = false ) {
|
173 |
|
174 |
global $rtmedia_backbone;
|
175 |
|
176 |
if ( $rtmedia_backbone[ 'backbone' ] ) {
|
177 |
echo '<%= rt_permalink %>';
|
178 |
} else {
|
179 |
+
echo get_rtmedia_permalink ( rtmedia_id ( $media_id ) );
|
180 |
}
|
181 |
}
|
182 |
|
185 |
global $rtmedia_media, $rtmedia;
|
186 |
if ( isset ( $rtmedia_media->media_type ) ) {
|
187 |
if ( $rtmedia_media->media_type == 'photo' ) {
|
188 |
+
$src = wp_get_attachment_image_src ( $rtmedia_media->media_id, $media_size );
|
189 |
+
$html = "<img src='" . $src[ 0 ] . "' alt='' />";
|
190 |
} elseif ( $rtmedia_media->media_type == 'video' ) {
|
191 |
$size = " width=\"" . $rtmedia->options[ "defaultSizes_video_singlePlayer_width" ] . "\" height=\"" . $rtmedia->options[ "defaultSizes_video_singlePlayer_height" ] . "\" ";
|
192 |
|
193 |
+
$html = '<video src="' . wp_get_attachment_url ( $rtmedia_media->media_id ) . '" ' . $size . ' type="video/mp4" class="wp-video-shortcode" id="bp_media_video_' . $rtmedia_media->id . '" controls="controls" preload="true"></video>';
|
194 |
} elseif ( $rtmedia_media->media_type == 'music' ) {
|
195 |
$size = ' width="600" height="0" ';
|
196 |
if ( ! $size_flag )
|
197 |
$size = '';
|
198 |
+
$html = '<audio src="' . wp_get_attachment_url ( $rtmedia_media->media_id ) . '" ' . $size . ' type="audio/mp3" class="wp-audio-shortcode" id="bp_media_audio_' . $rtmedia_media->id . '" controls="controls" preload="true"></audio>';
|
199 |
} else {
|
200 |
$html = false;
|
201 |
}
|
app/main/controllers/upload/RTMediaUploadEndpoint.php
CHANGED
@@ -86,4 +86,4 @@ class RTMediaUploadEndpoint {
|
|
86 |
|
87 |
}
|
88 |
|
89 |
-
?>
|
86 |
|
87 |
}
|
88 |
|
89 |
+
?>
|
app/main/controllers/upload/processors/RTMediaUploadFile.php
CHANGED
@@ -185,7 +185,8 @@ class RTMediaUploadFile {
|
|
185 |
$type = $file_type[ 0 ];
|
186 |
switch ( $type ) {
|
187 |
case 'video' :
|
188 |
-
|
|
|
189 |
try {
|
190 |
$getID3 = new getID3;
|
191 |
$vid_info = $getID3->analyze ( $file[ 'tmp_name' ] );
|
@@ -213,7 +214,8 @@ class RTMediaUploadFile {
|
|
213 |
}
|
214 |
break;
|
215 |
case 'audio' :
|
216 |
-
|
|
|
217 |
try {
|
218 |
$getID3 = new getID3;
|
219 |
$file_info = $getID3->analyze ( $file[ 'tmp_name' ] );
|
185 |
$type = $file_type[ 0 ];
|
186 |
switch ( $type ) {
|
187 |
case 'video' :
|
188 |
+
if ( ! class_exists ( "getID3", true ) )
|
189 |
+
include_once(trailingslashit ( RTMEDIA_PATH ) . 'lib/getid3/getid3.php');
|
190 |
try {
|
191 |
$getID3 = new getID3;
|
192 |
$vid_info = $getID3->analyze ( $file[ 'tmp_name' ] );
|
214 |
}
|
215 |
break;
|
216 |
case 'audio' :
|
217 |
+
if ( ! class_exists ( "getID3" ) )
|
218 |
+
include_once(trailingslashit ( RTMEDIA_PATH ) . 'lib/getid3/getid3.php');
|
219 |
try {
|
220 |
$getID3 = new getID3;
|
221 |
$file_info = $getID3->analyze ( $file[ 'tmp_name' ] );
|
app/main/routers/query/RTMediaQuery.php
CHANGED
@@ -85,6 +85,7 @@ class RTMediaQuery {
|
|
85 |
add_filter ( 'rtmedia-model-where-query', array( $this, 'privacy_filter' ), 1, 2 );
|
86 |
|
87 |
// if no args were supplied, initialise the $args
|
|
|
88 |
if ( empty ( $args ) ) {
|
89 |
|
90 |
$this->init ();
|
@@ -375,7 +376,24 @@ class RTMediaQuery {
|
|
375 |
function &query ( $query ) {
|
376 |
$this->original_query = $query;
|
377 |
$this->query = wp_parse_args ( $query, $this->query );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
378 |
|
|
|
|
|
|
|
|
|
|
|
|
|
379 |
if ( isset ( $this->query ) && isset ( $this->query[ "global" ] ) && $this->query[ "global" ] == "true" ) {
|
380 |
if ( isset ( $this->query[ "context_id" ] ) )
|
381 |
unset ( $this->query[ "context_id" ] );
|
85 |
add_filter ( 'rtmedia-model-where-query', array( $this, 'privacy_filter' ), 1, 2 );
|
86 |
|
87 |
// if no args were supplied, initialise the $args
|
88 |
+
|
89 |
if ( empty ( $args ) ) {
|
90 |
|
91 |
$this->init ();
|
376 |
function &query ( $query ) {
|
377 |
$this->original_query = $query;
|
378 |
$this->query = wp_parse_args ( $query, $this->query );
|
379 |
+
//Set Json
|
380 |
+
if ( isset ( $_REQUEST[ "rtmedia_shortcode" ] ) ) {
|
381 |
+
$query_data = $_REQUEST;
|
382 |
+
$allowed_query = array( "id", "media_id", "media_type", "media_author", "albume_id", "context", "context_id", "global" );
|
383 |
+
foreach ( $query_data as $key => $val ) {
|
384 |
+
if ( ! in_array ( $key, $allowed_query ) ) {
|
385 |
+
unset ( $query_data[ $key ] );
|
386 |
+
}
|
387 |
+
}
|
388 |
+
$this->query = wp_parse_args ( $query_data, $this->query );
|
389 |
+
}
|
390 |
|
391 |
+
if ( isset ( $this->query[ "context" ] ) && $this->query[ "context" ] == "activity" ) {
|
392 |
+
$this->query[ "activity_id" ] = array( "value" );
|
393 |
+
global $wpdb;
|
394 |
+
$sql_query = "select id from {$wpdb->prefix}bp_activity where item_id = 0 and type = 'rtmedia_update'";
|
395 |
+
$this->query[ "activity_id" ][ "value" ] = $wpdb->get_col ( $sql_query );
|
396 |
+
}
|
397 |
if ( isset ( $this->query ) && isset ( $this->query[ "global" ] ) && $this->query[ "global" ] == "true" ) {
|
398 |
if ( isset ( $this->query[ "context_id" ] ) )
|
399 |
unset ( $this->query[ "context_id" ] );
|
index.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
Plugin Name: rtMedia for WordPress, BuddyPress and bbPress
|
5 |
Plugin URI: http://rtcamp.com/buddypress-media/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
|
6 |
Description: This plugin adds missing media rich features like photos, videos and audio uploading to BuddyPress which are essential if you are building social network, seriously!
|
7 |
-
Version: 3.0.
|
8 |
Author: rtCamp
|
9 |
Text Domain: rtmedia
|
10 |
Author URI: http://rtcamp.com/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
|
4 |
Plugin Name: rtMedia for WordPress, BuddyPress and bbPress
|
5 |
Plugin URI: http://rtcamp.com/buddypress-media/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
|
6 |
Description: This plugin adds missing media rich features like photos, videos and audio uploading to BuddyPress which are essential if you are building social network, seriously!
|
7 |
+
Version: 3.0.11
|
8 |
Author: rtCamp
|
9 |
Text Domain: rtmedia
|
10 |
Author URI: http://rtcamp.com/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
|
lib/getid3/getid3.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
/////////////////////////////////////////////////////////////////
|
3 |
/// getID3() by James Heinrich <info@getid3.org> //
|
4 |
// available at http://getid3.sourceforge.net //
|
@@ -8,692 +9,666 @@
|
|
8 |
// Please see readme.txt for more information //
|
9 |
// ///
|
10 |
/////////////////////////////////////////////////////////////////
|
11 |
-
|
12 |
// attempt to define temp dir as something flexible but reliable
|
13 |
-
|
14 |
-
if (
|
15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
}
|
17 |
-
if (
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
}
|
22 |
-
$temp_dir = realpath($temp_dir);
|
23 |
-
$open_basedir = ini_get('open_basedir');
|
24 |
-
if ($open_basedir) {
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
}
|
47 |
-
if (
|
48 |
-
|
49 |
}
|
50 |
// $temp_dir = '/something/else/'; // feel free to override temp dir here if it works better for your system
|
51 |
-
define('GETID3_TEMP_DIR', $temp_dir);
|
52 |
-
unset($open_basedir, $temp_dir);
|
53 |
|
54 |
|
55 |
// define a constant rather than looking up every time it is needed
|
56 |
-
if (!defined('GETID3_OS_ISWINDOWS')) {
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
}
|
63 |
|
64 |
// Get base path of getID3() - ONCE
|
65 |
-
if (!defined('GETID3_INCLUDEPATH')) {
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
}
|
73 |
|
74 |
// End: Defines
|
75 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
|
77 |
-
class getID3
|
78 |
-
{
|
79 |
-
// public: Settings
|
80 |
-
public $encoding = 'UTF-8'; // CASE SENSITIVE! - i.e. (must be supported by iconv()). Examples: ISO-8859-1 UTF-8 UTF-16 UTF-16BE
|
81 |
-
public $encoding_id3v1 = 'ISO-8859-1'; // Should always be 'ISO-8859-1', but some tags may be written in other encodings such as 'EUC-CN' or 'CP1252'
|
82 |
-
|
83 |
-
// public: Optional tag checks - disable for speed.
|
84 |
-
public $option_tag_id3v1 = true; // Read and process ID3v1 tags
|
85 |
-
public $option_tag_id3v2 = true; // Read and process ID3v2 tags
|
86 |
-
public $option_tag_lyrics3 = true; // Read and process Lyrics3 tags
|
87 |
-
public $option_tag_apetag = true; // Read and process APE tags
|
88 |
-
public $option_tags_process = true; // Copy tags to root key 'tags' and encode to $this->encoding
|
89 |
-
public $option_tags_html = true; // Copy tags to root key 'tags_html' properly translated from various encodings to HTML entities
|
90 |
-
|
91 |
-
// public: Optional tag/comment calucations
|
92 |
-
public $option_extra_info = true; // Calculate additional info such as bitrate, channelmode etc
|
93 |
-
|
94 |
-
// public: Optional handling of embedded attachments (e.g. images)
|
95 |
-
public $option_save_attachments = true; // defaults to true (ATTACHMENTS_INLINE) for backward compatibility
|
96 |
-
|
97 |
-
// public: Optional calculations
|
98 |
-
public $option_md5_data = false; // Get MD5 sum of data part - slow
|
99 |
-
public $option_md5_data_source = false; // Use MD5 of source file if availble - only FLAC and OptimFROG
|
100 |
-
public $option_sha1_data = false; // Get SHA1 sum of data part - slow
|
101 |
-
public $option_max_2gb_check = null; // Check whether file is larger than 2GB and thus not supported by 32-bit PHP (null: auto-detect based on PHP_INT_MAX)
|
102 |
-
|
103 |
-
// public: Read buffer size in bytes
|
104 |
-
public $option_fread_buffer_size = 32768;
|
105 |
-
|
106 |
-
// Public variables
|
107 |
-
public $filename; // Filename of file being analysed.
|
108 |
-
public $fp; // Filepointer to file being analysed.
|
109 |
-
public $info; // Result array.
|
110 |
-
|
111 |
-
// Protected variables
|
112 |
-
protected $startup_error = '';
|
113 |
-
protected $startup_warning = '';
|
114 |
-
protected $memory_limit = 0;
|
115 |
-
|
116 |
-
const VERSION = '1.9.3-20111213';
|
117 |
-
const FREAD_BUFFER_SIZE = 32768;
|
118 |
-
var $tempdir = GETID3_TEMP_DIR;
|
119 |
-
|
120 |
-
const ATTACHMENTS_NONE = false;
|
121 |
-
const ATTACHMENTS_INLINE = true;
|
122 |
-
|
123 |
-
// public: constructor
|
124 |
-
public function __construct() {
|
125 |
-
|
126 |
-
// Check for PHP version
|
127 |
-
$required_php_version = '5.0.5';
|
128 |
-
if (version_compare(PHP_VERSION, $required_php_version, '<')) {
|
129 |
-
$this->startup_error .= 'getID3() requires PHP v'.$required_php_version.' or higher - you are running v'.PHP_VERSION;
|
130 |
-
return false;
|
131 |
-
}
|
132 |
-
|
133 |
-
// Check memory
|
134 |
-
$this->memory_limit = ini_get('memory_limit');
|
135 |
-
if (preg_match('#([0-9]+)M#i', $this->memory_limit, $matches)) {
|
136 |
-
// could be stored as "16M" rather than 16777216 for example
|
137 |
-
$this->memory_limit = $matches[1] * 1048576;
|
138 |
-
} elseif (preg_match('#([0-9]+)G#i', $this->memory_limit, $matches)) { // The 'G' modifier is available since PHP 5.1.0
|
139 |
-
// could be stored as "2G" rather than 2147483648 for example
|
140 |
-
$this->memory_limit = $matches[1] * 1073741824;
|
141 |
-
}
|
142 |
-
if ($this->memory_limit <= 0) {
|
143 |
-
// memory limits probably disabled
|
144 |
-
} elseif ($this->memory_limit <= 4194304) {
|
145 |
-
$this->startup_error .= 'PHP has less than 4MB available memory and will very likely run out. Increase memory_limit in php.ini';
|
146 |
-
} elseif ($this->memory_limit <= 12582912) {
|
147 |
-
$this->startup_warning .= 'PHP has less than 12MB available memory and might run out if all modules are loaded. Increase memory_limit in php.ini';
|
148 |
-
}
|
149 |
-
|
150 |
-
// Check safe_mode off
|
151 |
-
if (preg_match('#(1|ON)#i', ini_get('safe_mode'))) {
|
152 |
-
$this->warning('WARNING: Safe mode is on, shorten support disabled, md5data/sha1data for ogg vorbis disabled, ogg vorbos/flac tag writing disabled.');
|
153 |
-
}
|
154 |
-
|
155 |
-
if (intval(ini_get('mbstring.func_overload')) > 0) {
|
156 |
-
$this->warning('WARNING: php.ini contains "mbstring.func_overload = '.ini_get('mbstring.func_overload').'", this may break things.');
|
157 |
-
}
|
158 |
-
|
159 |
-
// Check for magic_quotes_runtime
|
160 |
-
if (function_exists('get_magic_quotes_runtime')) {
|
161 |
-
if (get_magic_quotes_runtime()) {
|
162 |
-
return $this->startup_error('magic_quotes_runtime must be disabled before running getID3(). Surround getid3 block by set_magic_quotes_runtime(0) and set_magic_quotes_runtime(1).');
|
163 |
-
}
|
164 |
-
}
|
165 |
-
|
166 |
-
// Check for magic_quotes_gpc
|
167 |
-
if (function_exists('magic_quotes_gpc')) {
|
168 |
-
if (get_magic_quotes_gpc()) {
|
169 |
-
return $this->startup_error('magic_quotes_gpc must be disabled before running getID3(). Surround getid3 block by set_magic_quotes_gpc(0) and set_magic_quotes_gpc(1).');
|
170 |
-
}
|
171 |
-
}
|
172 |
-
|
173 |
-
// Load support library
|
174 |
-
if (!include_once(GETID3_INCLUDEPATH.'getid3.lib.php')) {
|
175 |
-
$this->startup_error .= 'getid3.lib.php is missing or corrupt';
|
176 |
-
}
|
177 |
-
|
178 |
-
if ($this->option_max_2gb_check === null) {
|
179 |
-
$this->option_max_2gb_check = (PHP_INT_MAX <= 2147483647);
|
180 |
-
}
|
181 |
-
|
182 |
-
|
183 |
-
// Needed for Windows only:
|
184 |
-
// Define locations of helper applications for Shorten, VorbisComment, MetaFLAC
|
185 |
-
// as well as other helper functions such as head, tail, md5sum, etc
|
186 |
-
// This path cannot contain spaces, but the below code will attempt to get the
|
187 |
-
// 8.3-equivalent path automatically
|
188 |
-
// IMPORTANT: This path must include the trailing slash
|
189 |
-
if (GETID3_OS_ISWINDOWS && !defined('GETID3_HELPERAPPSDIR')) {
|
190 |
-
|
191 |
-
$helperappsdir = GETID3_INCLUDEPATH.'..'.DIRECTORY_SEPARATOR.'helperapps'; // must not have any space in this path
|
192 |
-
|
193 |
-
if (!is_dir($helperappsdir)) {
|
194 |
-
$this->startup_warning .= '"'.$helperappsdir.'" cannot be defined as GETID3_HELPERAPPSDIR because it does not exist';
|
195 |
-
} elseif (strpos(realpath($helperappsdir), ' ') !== false) {
|
196 |
-
$DirPieces = explode(DIRECTORY_SEPARATOR, realpath($helperappsdir));
|
197 |
-
$path_so_far = array();
|
198 |
-
foreach ($DirPieces as $key => $value) {
|
199 |
-
if (strpos($value, ' ') !== false) {
|
200 |
-
if (!empty($path_so_far)) {
|
201 |
-
$commandline = 'dir /x '.escapeshellarg(implode(DIRECTORY_SEPARATOR, $path_so_far));
|
202 |
-
$dir_listing = `$commandline`;
|
203 |
-
$lines = explode("\n", $dir_listing);
|
204 |
-
foreach ($lines as $line) {
|
205 |
-
$line = trim($line);
|
206 |
-
if (preg_match('#^([0-9/]{10}) +([0-9:]{4,5}( [AP]M)?) +(<DIR>|[0-9,]+) +([^ ]{0,11}) +(.+)$#', $line, $matches)) {
|
207 |
-
list($dummy, $date, $time, $ampm, $filesize, $shortname, $filename) = $matches;
|
208 |
-
if ((strtoupper($filesize) == '<DIR>') && (strtolower($filename) == strtolower($value))) {
|
209 |
-
$value = $shortname;
|
210 |
-
}
|
211 |
-
}
|
212 |
-
}
|
213 |
-
} else {
|
214 |
-
$this->startup_warning .= 'GETID3_HELPERAPPSDIR must not have any spaces in it - use 8dot3 naming convention if neccesary. You can run "dir /x" from the commandline to see the correct 8.3-style names.';
|
215 |
-
}
|
216 |
-
}
|
217 |
-
$path_so_far[] = $value;
|
218 |
-
}
|
219 |
-
$helperappsdir = implode(DIRECTORY_SEPARATOR, $path_so_far);
|
220 |
-
}
|
221 |
-
define('GETID3_HELPERAPPSDIR', $helperappsdir.DIRECTORY_SEPARATOR);
|
222 |
-
}
|
223 |
-
|
224 |
-
return true;
|
225 |
-
}
|
226 |
-
|
227 |
-
public function version() {
|
228 |
-
return self::VERSION;
|
229 |
-
}
|
230 |
-
|
231 |
-
public function fread_buffer_size() {
|
232 |
-
return $this->option_fread_buffer_size;
|
233 |
-
}
|
234 |
-
|
235 |
-
|
236 |
-
// public: setOption
|
237 |
-
function setOption($optArray) {
|
238 |
-
if (!is_array($optArray) || empty($optArray)) {
|
239 |
-
return false;
|
240 |
-
}
|
241 |
-
foreach ($optArray as $opt => $val) {
|
242 |
-
if (isset($this->$opt) === false) {
|
243 |
-
continue;
|
244 |
-
}
|
245 |
-
$this->$opt = $val;
|
246 |
-
}
|
247 |
-
return true;
|
248 |
-
}
|
249 |
-
|
250 |
-
|
251 |
-
public function openfile($filename) {
|
252 |
-
try {
|
253 |
-
if (!empty($this->startup_error)) {
|
254 |
-
throw new getid3_exception($this->startup_error);
|
255 |
-
}
|
256 |
-
if (!empty($this->startup_warning)) {
|
257 |
-
$this->warning($this->startup_warning);
|
258 |
-
}
|
259 |
-
|
260 |
-
// init result array and set parameters
|
261 |
-
$this->filename = $filename;
|
262 |
-
$this->info = array();
|
263 |
-
$this->info['GETID3_VERSION'] = $this->version();
|
264 |
-
$this->info['php_memory_limit'] = $this->memory_limit;
|
265 |
-
|
266 |
-
// remote files not supported
|
267 |
-
if (preg_match('/^(ht|f)tp:\/\//', $filename)) {
|
268 |
-
throw new getid3_exception('Remote files are not supported - please copy the file locally first');
|
269 |
-
}
|
270 |
-
|
271 |
-
$filename = str_replace('/', DIRECTORY_SEPARATOR, $filename);
|
272 |
-
$filename = preg_replace('#(.+)'.preg_quote(DIRECTORY_SEPARATOR).'{2,}#U', '\1'.DIRECTORY_SEPARATOR, $filename);
|
273 |
-
|
274 |
-
// open local file
|
275 |
-
if (is_readable($filename) && is_file($filename) && ($this->fp = fopen($filename, 'rb'))) {
|
276 |
-
// great
|
277 |
-
} else {
|
278 |
-
throw new getid3_exception('Could not open "'.$filename.'" (does not exist, or is not a file)');
|
279 |
-
}
|
280 |
-
|
281 |
-
$this->info['filesize'] = filesize($filename);
|
282 |
-
// set redundant parameters - might be needed in some include file
|
283 |
-
$this->info['filename'] = basename($filename);
|
284 |
-
$this->info['filepath'] = str_replace('\\', '/', realpath(dirname($filename)));
|
285 |
-
$this->info['filenamepath'] = $this->info['filepath'].'/'.$this->info['filename'];
|
286 |
-
|
287 |
-
|
288 |
-
// option_max_2gb_check
|
289 |
-
if ($this->option_max_2gb_check) {
|
290 |
-
// PHP (32-bit all, and 64-bit Windows) doesn't support integers larger than 2^31 (~2GB)
|
291 |
-
// filesize() simply returns (filesize % (pow(2, 32)), no matter the actual filesize
|
292 |
-
// ftell() returns 0 if seeking to the end is beyond the range of unsigned integer
|
293 |
-
$fseek = fseek($this->fp, 0, SEEK_END);
|
294 |
-
if (($fseek < 0) || (($this->info['filesize'] != 0) && (ftell($this->fp) == 0)) ||
|
295 |
-
($this->info['filesize'] < 0) ||
|
296 |
-
(ftell($this->fp) < 0)) {
|
297 |
-
$real_filesize = false;
|
298 |
-
if (GETID3_OS_ISWINDOWS) {
|
299 |
-
$commandline = 'dir /-C "'.str_replace('/', DIRECTORY_SEPARATOR, $filename).'"';
|
300 |
-
$dir_output = `$commandline`;
|
301 |
-
if (preg_match('#1 File\(s\)[ ]+([0-9]+) bytes#i', $dir_output, $matches)) {
|
302 |
-
$real_filesize = (float) $matches[1];
|
303 |
-
}
|
304 |
-
} else {
|
305 |
-
$commandline = 'ls -o -g -G --time-style=long-iso '.escapeshellarg($filename);
|
306 |
-
$dir_output = `$commandline`;
|
307 |
-
if (preg_match('#([0-9]+) ([0-9]{4}-[0-9]{2}\-[0-9]{2} [0-9]{2}:[0-9]{2}) '.str_replace('#', '\\#', preg_quote($filename)).'$#', $dir_output, $matches)) {
|
308 |
-
$real_filesize = (float) $matches[1];
|
309 |
-
}
|
310 |
-
}
|
311 |
-
if ($real_filesize === false) {
|
312 |
-
unset($this->info['filesize']);
|
313 |
-
fclose($this->fp);
|
314 |
-
throw new getid3_exception('Unable to determine actual filesize. File is most likely larger than '.round(PHP_INT_MAX / 1073741824).'GB and is not supported by PHP.');
|
315 |
-
} elseif (getid3_lib::intValueSupported($real_filesize)) {
|
316 |
-
unset($this->info['filesize']);
|
317 |
-
fclose($this->fp);
|
318 |
-
throw new getid3_exception('PHP seems to think the file is larger than '.round(PHP_INT_MAX / 1073741824).'GB, but filesystem reports it as '.number_format($real_filesize, 3).'GB, please report to info@getid3.org');
|
319 |
-
}
|
320 |
-
$this->info['filesize'] = $real_filesize;
|
321 |
-
$this->error('File is larger than '.round(PHP_INT_MAX / 1073741824).'GB (filesystem reports it as '.number_format($real_filesize, 3).'GB) and is not properly supported by PHP.');
|
322 |
-
}
|
323 |
-
}
|
324 |
-
|
325 |
-
// set more parameters
|
326 |
-
$this->info['avdataoffset'] = 0;
|
327 |
-
$this->info['avdataend'] = $this->info['filesize'];
|
328 |
-
$this->info['fileformat'] = ''; // filled in later
|
329 |
-
$this->info['audio']['dataformat'] = ''; // filled in later, unset if not used
|
330 |
-
$this->info['video']['dataformat'] = ''; // filled in later, unset if not used
|
331 |
-
$this->info['tags'] = array(); // filled in later, unset if not used
|
332 |
-
$this->info['error'] = array(); // filled in later, unset if not used
|
333 |
-
$this->info['warning'] = array(); // filled in later, unset if not used
|
334 |
-
$this->info['comments'] = array(); // filled in later, unset if not used
|
335 |
-
$this->info['encoding'] = $this->encoding; // required by id3v2 and iso modules - can be unset at the end if desired
|
336 |
-
|
337 |
-
return true;
|
338 |
-
|
339 |
-
} catch (Exception $e) {
|
340 |
-
$this->error($e->getMessage());
|
341 |
-
}
|
342 |
-
return false;
|
343 |
-
}
|
344 |
-
|
345 |
-
// public: analyze file
|
346 |
-
function analyze($filename) {
|
347 |
-
try {
|
348 |
-
if (!$this->openfile($filename)) {
|
349 |
-
return $this->info;
|
350 |
-
}
|
351 |
-
|
352 |
-
// Handle tags
|
353 |
-
foreach (array('id3v2'=>'id3v2', 'id3v1'=>'id3v1', 'apetag'=>'ape', 'lyrics3'=>'lyrics3') as $tag_name => $tag_key) {
|
354 |
-
$option_tag = 'option_tag_'.$tag_name;
|
355 |
-
if ($this->$option_tag) {
|
356 |
-
$this->include_module('tag.'.$tag_name);
|
357 |
-
try {
|
358 |
-
$tag_class = 'getid3_'.$tag_name;
|
359 |
-
$tag = new $tag_class($this);
|
360 |
-
$tag->Analyze();
|
361 |
-
}
|
362 |
-
catch (getid3_exception $e) {
|
363 |
-
throw $e;
|
364 |
-
}
|
365 |
-
}
|
366 |
-
}
|
367 |
-
if (isset($this->info['id3v2']['tag_offset_start'])) {
|
368 |
-
$this->info['avdataoffset'] = max($this->info['avdataoffset'], $this->info['id3v2']['tag_offset_end']);
|
369 |
-
}
|
370 |
-
foreach (array('id3v1'=>'id3v1', 'apetag'=>'ape', 'lyrics3'=>'lyrics3') as $tag_name => $tag_key) {
|
371 |
-
if (isset($this->info[$tag_key]['tag_offset_start'])) {
|
372 |
-
$this->info['avdataend'] = min($this->info['avdataend'], $this->info[$tag_key]['tag_offset_start']);
|
373 |
-
}
|
374 |
-
}
|
375 |
-
|
376 |
-
// ID3v2 detection (NOT parsing), even if ($this->option_tag_id3v2 == false) done to make fileformat easier
|
377 |
-
if (!$this->option_tag_id3v2) {
|
378 |
-
fseek($this->fp, 0, SEEK_SET);
|
379 |
-
$header = fread($this->fp, 10);
|
380 |
-
if ((substr($header, 0, 3) == 'ID3') && (strlen($header) == 10)) {
|
381 |
-
$this->info['id3v2']['header'] = true;
|
382 |
-
$this->info['id3v2']['majorversion'] = ord($header{3});
|
383 |
-
$this->info['id3v2']['minorversion'] = ord($header{4});
|
384 |
-
$this->info['avdataoffset'] += getid3_lib::BigEndian2Int(substr($header, 6, 4), 1) + 10; // length of ID3v2 tag in 10-byte header doesn't include 10-byte header length
|
385 |
-
}
|
386 |
-
}
|
387 |
-
|
388 |
-
// read 32 kb file data
|
389 |
-
fseek($this->fp, $this->info['avdataoffset'], SEEK_SET);
|
390 |
-
$formattest = fread($this->fp, 32774);
|
391 |
-
|
392 |
-
// determine format
|
393 |
-
$determined_format = $this->GetFileFormat($formattest, $filename);
|
394 |
-
|
395 |
-
// unable to determine file format
|
396 |
-
if (!$determined_format) {
|
397 |
-
fclose($this->fp);
|
398 |
-
return $this->error('unable to determine file format');
|
399 |
-
}
|
400 |
-
|
401 |
-
// check for illegal ID3 tags
|
402 |
-
if (isset($determined_format['fail_id3']) && (in_array('id3v1', $this->info['tags']) || in_array('id3v2', $this->info['tags']))) {
|
403 |
-
if ($determined_format['fail_id3'] === 'ERROR') {
|
404 |
-
fclose($this->fp);
|
405 |
-
return $this->error('ID3 tags not allowed on this file type.');
|
406 |
-
} elseif ($determined_format['fail_id3'] === 'WARNING') {
|
407 |
-
$this->warning('ID3 tags not allowed on this file type.');
|
408 |
-
}
|
409 |
-
}
|
410 |
-
|
411 |
-
// check for illegal APE tags
|
412 |
-
if (isset($determined_format['fail_ape']) && in_array('ape', $this->info['tags'])) {
|
413 |
-
if ($determined_format['fail_ape'] === 'ERROR') {
|
414 |
-
fclose($this->fp);
|
415 |
-
return $this->error('APE tags not allowed on this file type.');
|
416 |
-
} elseif ($determined_format['fail_ape'] === 'WARNING') {
|
417 |
-
$this->warning('APE tags not allowed on this file type.');
|
418 |
-
}
|
419 |
-
}
|
420 |
-
|
421 |
-
// set mime type
|
422 |
-
$this->info['mime_type'] = $determined_format['mime_type'];
|
423 |
-
|
424 |
-
// supported format signature pattern detected, but module deleted
|
425 |
-
if (!file_exists(GETID3_INCLUDEPATH.$determined_format['include'])) {
|
426 |
-
fclose($this->fp);
|
427 |
-
return $this->error('Format not supported, module "'.$determined_format['include'].'" was removed.');
|
428 |
-
}
|
429 |
-
|
430 |
-
// module requires iconv support
|
431 |
-
// Check encoding/iconv support
|
432 |
-
if (!empty($determined_format['iconv_req']) && !function_exists('iconv') && !in_array($this->encoding, array('ISO-8859-1', 'UTF-8', 'UTF-16LE', 'UTF-16BE', 'UTF-16'))) {
|
433 |
-
$errormessage = 'iconv() support is required for this module ('.$determined_format['include'].') for encodings other than ISO-8859-1, UTF-8, UTF-16LE, UTF16-BE, UTF-16. ';
|
434 |
-
if (GETID3_OS_ISWINDOWS) {
|
435 |
-
$errormessage .= 'PHP does not have iconv() support. Please enable php_iconv.dll in php.ini, and copy iconv.dll from c:/php/dlls to c:/windows/system32';
|
436 |
-
} else {
|
437 |
-
$errormessage .= 'PHP is not compiled with iconv() support. Please recompile with the --with-iconv switch';
|
438 |
-
}
|
439 |
-
return $this->error($errormessage);
|
440 |
-
}
|
441 |
-
|
442 |
-
// include module
|
443 |
-
include_once(GETID3_INCLUDEPATH.$determined_format['include']);
|
444 |
-
|
445 |
-
// instantiate module class
|
446 |
-
$class_name = 'getid3_'.$determined_format['module'];
|
447 |
-
if (!class_exists($class_name)) {
|
448 |
-
return $this->error('Format not supported, module "'.$determined_format['include'].'" is corrupt.');
|
449 |
-
}
|
450 |
-
//if (isset($determined_format['option'])) {
|
451 |
-
// //$class = new $class_name($this->fp, $this->info, $determined_format['option']);
|
452 |
-
//} else {
|
453 |
-
//$class = new $class_name($this->fp, $this->info);
|
454 |
-
$class = new $class_name($this);
|
455 |
-
//}
|
456 |
-
|
457 |
-
if (!empty($determined_format['set_inline_attachments'])) {
|
458 |
-
$class->inline_attachments = $this->option_save_attachments;
|
459 |
-
}
|
460 |
-
$class->Analyze();
|
461 |
-
|
462 |
-
unset($class);
|
463 |
-
|
464 |
-
// close file
|
465 |
-
fclose($this->fp);
|
466 |
-
|
467 |
-
// process all tags - copy to 'tags' and convert charsets
|
468 |
-
if ($this->option_tags_process) {
|
469 |
-
$this->HandleAllTags();
|
470 |
-
}
|
471 |
-
|
472 |
-
// perform more calculations
|
473 |
-
if ($this->option_extra_info) {
|
474 |
-
$this->ChannelsBitratePlaytimeCalculations();
|
475 |
-
$this->CalculateCompressionRatioVideo();
|
476 |
-
$this->CalculateCompressionRatioAudio();
|
477 |
-
$this->CalculateReplayGain();
|
478 |
-
$this->ProcessAudioStreams();
|
479 |
-
}
|
480 |
-
|
481 |
-
// get the MD5 sum of the audio/video portion of the file - without ID3/APE/Lyrics3/etc header/footer tags
|
482 |
-
if ($this->option_md5_data) {
|
483 |
-
// do not cald md5_data if md5_data_source is present - set by flac only - future MPC/SV8 too
|
484 |
-
if (!$this->option_md5_data_source || empty($this->info['md5_data_source'])) {
|
485 |
-
$this->getHashdata('md5');
|
486 |
-
}
|
487 |
-
}
|
488 |
-
|
489 |
-
// get the SHA1 sum of the audio/video portion of the file - without ID3/APE/Lyrics3/etc header/footer tags
|
490 |
-
if ($this->option_sha1_data) {
|
491 |
-
$this->getHashdata('sha1');
|
492 |
-
}
|
493 |
-
|
494 |
-
// remove undesired keys
|
495 |
-
$this->CleanUp();
|
496 |
-
|
497 |
-
} catch (Exception $e) {
|
498 |
-
$this->error('Caught exception: '.$e->getMessage());
|
499 |
-
}
|
500 |
-
|
501 |
-
// return info array
|
502 |
-
return $this->info;
|
503 |
-
}
|
504 |
-
|
505 |
-
|
506 |
-
// private: error handling
|
507 |
-
function error($message) {
|
508 |
-
$this->CleanUp();
|
509 |
-
if (!isset($this->info['error'])) {
|
510 |
-
$this->info['error'] = array();
|
511 |
-
}
|
512 |
-
$this->info['error'][] = $message;
|
513 |
-
return $this->info;
|
514 |
-
}
|
515 |
-
|
516 |
-
|
517 |
-
// private: warning handling
|
518 |
-
function warning($message) {
|
519 |
-
$this->info['warning'][] = $message;
|
520 |
-
return true;
|
521 |
-
}
|
522 |
-
|
523 |
-
|
524 |
-
// private: CleanUp
|
525 |
-
function CleanUp() {
|
526 |
-
|
527 |
-
// remove possible empty keys
|
528 |
-
$AVpossibleEmptyKeys = array('dataformat', 'bits_per_sample', 'encoder_options', 'streams', 'bitrate');
|
529 |
-
foreach ($AVpossibleEmptyKeys as $dummy => $key) {
|
530 |
-
if (empty($this->info['audio'][$key]) && isset($this->info['audio'][$key])) {
|
531 |
-
unset($this->info['audio'][$key]);
|
532 |
-
}
|
533 |
-
if (empty($this->info['video'][$key]) && isset($this->info['video'][$key])) {
|
534 |
-
unset($this->info['video'][$key]);
|
535 |
-
}
|
536 |
-
}
|
537 |
-
|
538 |
-
// remove empty root keys
|
539 |
-
if (!empty($this->info)) {
|
540 |
-
foreach ($this->info as $key => $value) {
|
541 |
-
if (empty($this->info[$key]) && ($this->info[$key] !== 0) && ($this->info[$key] !== '0')) {
|
542 |
-
unset($this->info[$key]);
|
543 |
-
}
|
544 |
-
}
|
545 |
-
}
|
546 |
-
|
547 |
-
// remove meaningless entries from unknown-format files
|
548 |
-
if (empty($this->info['fileformat'])) {
|
549 |
-
if (isset($this->info['avdataoffset'])) {
|
550 |
-
unset($this->info['avdataoffset']);
|
551 |
-
}
|
552 |
-
if (isset($this->info['avdataend'])) {
|
553 |
-
unset($this->info['avdataend']);
|
554 |
-
}
|
555 |
-
}
|
556 |
-
|
557 |
-
// remove possible duplicated identical entries
|
558 |
-
if (!empty($this->info['error'])) {
|
559 |
-
$this->info['error'] = array_values(array_unique($this->info['error']));
|
560 |
-
}
|
561 |
-
if (!empty($this->info['warning'])) {
|
562 |
-
$this->info['warning'] = array_values(array_unique($this->info['warning']));
|
563 |
-
}
|
564 |
-
|
565 |
-
// remove "global variable" type keys
|
566 |
-
unset($this->info['php_memory_limit']);
|
567 |
-
|
568 |
-
return true;
|
569 |
-
}
|
570 |
-
|
571 |
-
|
572 |
-
// return array containing information about all supported formats
|
573 |
-
function GetFileFormatArray() {
|
574 |
-
static $format_info = array();
|
575 |
-
if (empty($format_info)) {
|
576 |
-
$format_info = array(
|
577 |
-
|
578 |
-
// Audio formats
|
579 |
-
|
580 |
-
// AC-3 - audio - Dolby AC-3 / Dolby Digital
|
581 |
-
'ac3' => array(
|
582 |
-
'pattern' => '^\x0B\x77',
|
583 |
-
'group' => 'audio',
|
584 |
-
'module' => 'ac3',
|
585 |
-
'mime_type' => 'audio/ac3',
|
586 |
-
),
|
587 |
-
|
588 |
-
// AAC - audio - Advanced Audio Coding (AAC) - ADIF format
|
589 |
-
'adif' => array(
|
590 |
-
'pattern' => '^ADIF',
|
591 |
-
'group' => 'audio',
|
592 |
-
'module' => 'aac',
|
593 |
-
'mime_type' => 'application/octet-stream',
|
594 |
-
'fail_ape' => 'WARNING',
|
595 |
-
),
|
596 |
-
|
597 |
-
|
598 |
-
// AA - audio - Audible Audiobook
|
599 |
-
'adts' => array(
|
600 |
-
'pattern' => '^.{4}\x57\x90\x75\x36',
|
601 |
-
'group' => 'audio',
|
602 |
-
'module' => 'aa',
|
603 |
-
'mime_type' => 'audio/audible ',
|
604 |
-
),
|
605 |
-
|
606 |
-
// AAC - audio - Advanced Audio Coding (AAC) - ADTS format (very similar to MP3)
|
607 |
-
'adts' => array(
|
608 |
-
'pattern' => '^\xFF[\xF0-\xF1\xF8-\xF9]',
|
609 |
-
'group' => 'audio',
|
610 |
-
'module' => 'aac',
|
611 |
-
'mime_type' => 'application/octet-stream',
|
612 |
-
'fail_ape' => 'WARNING',
|
613 |
-
),
|
614 |
-
|
615 |
-
|
616 |
-
// AU - audio - NeXT/Sun AUdio (AU)
|
617 |
-
'au' => array(
|
618 |
-
'pattern' => '^\.snd',
|
619 |
-
'group' => 'audio',
|
620 |
-
'module' => 'au',
|
621 |
-
'mime_type' => 'audio/basic',
|
622 |
-
),
|
623 |
-
|
624 |
-
// AVR - audio - Audio Visual Research
|
625 |
-
'avr' => array(
|
626 |
-
'pattern' => '^2BIT',
|
627 |
-
'group' => 'audio',
|
628 |
-
'module' => 'avr',
|
629 |
-
'mime_type' => 'application/octet-stream',
|
630 |
-
),
|
631 |
-
|
632 |
-
// BONK - audio - Bonk v0.9+
|
633 |
-
'bonk' => array(
|
634 |
-
'pattern' => '^\x00(BONK|INFO|META| ID3)',
|
635 |
-
'group' => 'audio',
|
636 |
-
'module' => 'bonk',
|
637 |
-
'mime_type' => 'audio/xmms-bonk',
|
638 |
-
),
|
639 |
-
|
640 |
-
// DSS - audio - Digital Speech Standard
|
641 |
-
'dss' => array(
|
642 |
-
'pattern' => '^[\x02-\x03]dss',
|
643 |
-
'group' => 'audio',
|
644 |
-
'module' => 'dss',
|
645 |
-
'mime_type' => 'application/octet-stream',
|
646 |
-
),
|
647 |
-
|
648 |
-
// DTS - audio - Dolby Theatre System
|
649 |
-
'dts' => array(
|
650 |
-
'pattern' => '^\x7F\xFE\x80\x01',
|
651 |
-
'group' => 'audio',
|
652 |
-
'module' => 'dts',
|
653 |
-
'mime_type' => 'audio/dts',
|
654 |
-
),
|
655 |
-
|
656 |
-
// FLAC - audio - Free Lossless Audio Codec
|
657 |
-
'flac' => array(
|
658 |
-
'pattern' => '^fLaC',
|
659 |
-
'group' => 'audio',
|
660 |
-
'module' => 'flac',
|
661 |
-
'mime_type' => 'audio/x-flac',
|
662 |
-
'set_inline_attachments' => true,
|
663 |
-
),
|
664 |
-
|
665 |
-
// LA - audio - Lossless Audio (LA)
|
666 |
-
'la' => array(
|
667 |
-
'pattern' => '^LA0[2-4]',
|
668 |
-
'group' => 'audio',
|
669 |
-
'module' => 'la',
|
670 |
-
'mime_type' => 'application/octet-stream',
|
671 |
-
),
|
672 |
-
|
673 |
-
// LPAC - audio - Lossless Predictive Audio Compression (LPAC)
|
674 |
-
'lpac' => array(
|
675 |
-
'pattern' => '^LPAC',
|
676 |
-
'group' => 'audio',
|
677 |
-
'module' => 'lpac',
|
678 |
-
'mime_type' => 'application/octet-stream',
|
679 |
-
),
|
680 |
-
|
681 |
-
// MIDI - audio - MIDI (Musical Instrument Digital Interface)
|
682 |
-
'midi' => array(
|
683 |
-
'pattern' => '^MThd',
|
684 |
-
'group' => 'audio',
|
685 |
-
'module' => 'midi',
|
686 |
-
'mime_type' => 'audio/midi',
|
687 |
-
),
|
688 |
-
|
689 |
-
// MAC - audio - Monkey's Audio Compressor
|
690 |
-
'mac' => array(
|
691 |
-
'pattern' => '^MAC ',
|
692 |
-
'group' => 'audio',
|
693 |
-
'module' => 'monkey',
|
694 |
-
'mime_type' => 'application/octet-stream',
|
695 |
-
),
|
696 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
697 |
// has been known to produce false matches in random files (e.g. JPEGs), leave out until more precise matching available
|
698 |
// // MOD - audio - MODule (assorted sub-formats)
|
699 |
// 'mod' => array(
|
@@ -703,1042 +678,961 @@ class getID3
|
|
703 |
// 'option' => 'mod',
|
704 |
// 'mime_type' => 'audio/mod',
|
705 |
// ),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
706 |
|
707 |
-
// MOD - audio - MODule (Impulse Tracker)
|
708 |
-
'it' => array(
|
709 |
-
'pattern' => '^IMPM',
|
710 |
-
'group' => 'audio',
|
711 |
-
'module' => 'mod',
|
712 |
-
//'option' => 'it',
|
713 |
-
'mime_type' => 'audio/it',
|
714 |
-
),
|
715 |
-
|
716 |
-
// MOD - audio - MODule (eXtended Module, various sub-formats)
|
717 |
-
'xm' => array(
|
718 |
-
'pattern' => '^Extended Module',
|
719 |
-
'group' => 'audio',
|
720 |
-
'module' => 'mod',
|
721 |
-
//'option' => 'xm',
|
722 |
-
'mime_type' => 'audio/xm',
|
723 |
-
),
|
724 |
-
|
725 |
-
// MOD - audio - MODule (ScreamTracker)
|
726 |
-
's3m' => array(
|
727 |
-
'pattern' => '^.{44}SCRM',
|
728 |
-
'group' => 'audio',
|
729 |
-
'module' => 'mod',
|
730 |
-
//'option' => 's3m',
|
731 |
-
'mime_type' => 'audio/s3m',
|
732 |
-
),
|
733 |
-
|
734 |
-
// MPC - audio - Musepack / MPEGplus
|
735 |
-
'mpc' => array(
|
736 |
-
'pattern' => '^(MPCK|MP\+|[\x00\x01\x10\x11\x40\x41\x50\x51\x80\x81\x90\x91\xC0\xC1\xD0\xD1][\x20-37][\x00\x20\x40\x60\x80\xA0\xC0\xE0])',
|
737 |
-
'group' => 'audio',
|
738 |
-
'module' => 'mpc',
|
739 |
-
'mime_type' => 'audio/x-musepack',
|
740 |
-
),
|
741 |
-
|
742 |
-
// MP3 - audio - MPEG-audio Layer 3 (very similar to AAC-ADTS)
|
743 |
-
'mp3' => array(
|
744 |
-
'pattern' => '^\xFF[\xE2-\xE7\xF2-\xF7\xFA-\xFF][\x00-\x0B\x10-\x1B\x20-\x2B\x30-\x3B\x40-\x4B\x50-\x5B\x60-\x6B\x70-\x7B\x80-\x8B\x90-\x9B\xA0-\xAB\xB0-\xBB\xC0-\xCB\xD0-\xDB\xE0-\xEB\xF0-\xFB]',
|
745 |
-
'group' => 'audio',
|
746 |
-
'module' => 'mp3',
|
747 |
-
'mime_type' => 'audio/mpeg',
|
748 |
-
),
|
749 |
-
|
750 |
-
// OFR - audio - OptimFROG
|
751 |
-
'ofr' => array(
|
752 |
-
'pattern' => '^(\*RIFF|OFR)',
|
753 |
-
'group' => 'audio',
|
754 |
-
'module' => 'optimfrog',
|
755 |
-
'mime_type' => 'application/octet-stream',
|
756 |
-
),
|
757 |
-
|
758 |
-
// RKAU - audio - RKive AUdio compressor
|
759 |
-
'rkau' => array(
|
760 |
-
'pattern' => '^RKA',
|
761 |
-
'group' => 'audio',
|
762 |
-
'module' => 'rkau',
|
763 |
-
'mime_type' => 'application/octet-stream',
|
764 |
-
),
|
765 |
-
|
766 |
-
// SHN - audio - Shorten
|
767 |
-
'shn' => array(
|
768 |
-
'pattern' => '^ajkg',
|
769 |
-
'group' => 'audio',
|
770 |
-
'module' => 'shorten',
|
771 |
-
'mime_type' => 'audio/xmms-shn',
|
772 |
-
'fail_id3' => 'ERROR',
|
773 |
-
'fail_ape' => 'ERROR',
|
774 |
-
),
|
775 |
-
|
776 |
-
// TTA - audio - TTA Lossless Audio Compressor (http://tta.corecodec.org)
|
777 |
-
'tta' => array(
|
778 |
-
'pattern' => '^TTA', // could also be '^TTA(\x01|\x02|\x03|2|1)'
|
779 |
-
'group' => 'audio',
|
780 |
-
'module' => 'tta',
|
781 |
-
'mime_type' => 'application/octet-stream',
|
782 |
-
),
|
783 |
-
|
784 |
-
// VOC - audio - Creative Voice (VOC)
|
785 |
-
'voc' => array(
|
786 |
-
'pattern' => '^Creative Voice File',
|
787 |
-
'group' => 'audio',
|
788 |
-
'module' => 'voc',
|
789 |
-
'mime_type' => 'audio/voc',
|
790 |
-
),
|
791 |
-
|
792 |
-
// VQF - audio - transform-domain weighted interleave Vector Quantization Format (VQF)
|
793 |
-
'vqf' => array(
|
794 |
-
'pattern' => '^TWIN',
|
795 |
-
'group' => 'audio',
|
796 |
-
'module' => 'vqf',
|
797 |
-
'mime_type' => 'application/octet-stream',
|
798 |
-
),
|
799 |
-
|
800 |
-
// WV - audio - WavPack (v4.0+)
|
801 |
-
'wv' => array(
|
802 |
-
'pattern' => '^wvpk',
|
803 |
-
'group' => 'audio',
|
804 |
-
'module' => 'wavpack',
|
805 |
-
'mime_type' => 'application/octet-stream',
|
806 |
-
),
|
807 |
-
|
808 |
-
|
809 |
-
// Audio-Video formats
|
810 |
-
|
811 |
-
// ASF - audio/video - Advanced Streaming Format, Windows Media Video, Windows Media Audio
|
812 |
-
'asf' => array(
|
813 |
-
'pattern' => '^\x30\x26\xB2\x75\x8E\x66\xCF\x11\xA6\xD9\x00\xAA\x00\x62\xCE\x6C',
|
814 |
-
'group' => 'audio-video',
|
815 |
-
'module' => 'asf',
|
816 |
-
'mime_type' => 'video/x-ms-asf',
|
817 |
-
'iconv_req' => false,
|
818 |
-
),
|
819 |
-
|
820 |
-
// BINK - audio/video - Bink / Smacker
|
821 |
-
'bink' => array(
|
822 |
-
'pattern' => '^(BIK|SMK)',
|
823 |
-
'group' => 'audio-video',
|
824 |
-
'module' => 'bink',
|
825 |
-
'mime_type' => 'application/octet-stream',
|
826 |
-
),
|
827 |
-
|
828 |
-
// FLV - audio/video - FLash Video
|
829 |
-
'flv' => array(
|
830 |
-
'pattern' => '^FLV\x01',
|
831 |
-
'group' => 'audio-video',
|
832 |
-
'module' => 'flv',
|
833 |
-
'mime_type' => 'video/x-flv',
|
834 |
-
),
|
835 |
-
|
836 |
-
// MKAV - audio/video - Mastroka
|
837 |
-
'matroska' => array(
|
838 |
-
'pattern' => '^\x1A\x45\xDF\xA3',
|
839 |
-
'group' => 'audio-video',
|
840 |
-
'module' => 'matroska',
|
841 |
-
'mime_type' => 'video/x-matroska', // may also be audio/x-matroska
|
842 |
-
'set_inline_attachments' => true,
|
843 |
-
),
|
844 |
-
|
845 |
-
// MPEG - audio/video - MPEG (Moving Pictures Experts Group)
|
846 |
-
'mpeg' => array(
|
847 |
-
'pattern' => '^\x00\x00\x01(\xBA|\xB3)',
|
848 |
-
'group' => 'audio-video',
|
849 |
-
'module' => 'mpeg',
|
850 |
-
'mime_type' => 'video/mpeg',
|
851 |
-
),
|
852 |
-
|
853 |
-
// NSV - audio/video - Nullsoft Streaming Video (NSV)
|
854 |
-
'nsv' => array(
|
855 |
-
'pattern' => '^NSV[sf]',
|
856 |
-
'group' => 'audio-video',
|
857 |
-
'module' => 'nsv',
|
858 |
-
'mime_type' => 'application/octet-stream',
|
859 |
-
),
|
860 |
-
|
861 |
-
// Ogg - audio/video - Ogg (Ogg-Vorbis, Ogg-FLAC, Speex, Ogg-Theora(*), Ogg-Tarkin(*))
|
862 |
-
'ogg' => array(
|
863 |
-
'pattern' => '^OggS',
|
864 |
-
'group' => 'audio',
|
865 |
-
'module' => 'ogg',
|
866 |
-
'mime_type' => 'application/ogg',
|
867 |
-
'fail_id3' => 'WARNING',
|
868 |
-
'fail_ape' => 'WARNING',
|
869 |
-
'set_inline_attachments' => true,
|
870 |
-
),
|
871 |
-
|
872 |
-
// QT - audio/video - Quicktime
|
873 |
-
'quicktime' => array(
|
874 |
-
'pattern' => '^.{4}(cmov|free|ftyp|mdat|moov|pnot|skip|wide)',
|
875 |
-
'group' => 'audio-video',
|
876 |
-
'module' => 'quicktime',
|
877 |
-
'mime_type' => 'video/quicktime',
|
878 |
-
),
|
879 |
-
|
880 |
-
// RIFF - audio/video - Resource Interchange File Format (RIFF) / WAV / AVI / CD-audio / SDSS = renamed variant used by SmartSound QuickTracks (www.smartsound.com) / FORM = Audio Interchange File Format (AIFF)
|
881 |
-
'riff' => array(
|
882 |
-
'pattern' => '^(RIFF|SDSS|FORM)',
|
883 |
-
'group' => 'audio-video',
|
884 |
-
'module' => 'riff',
|
885 |
-
'mime_type' => 'audio/x-wave',
|
886 |
-
'fail_ape' => 'WARNING',
|
887 |
-
),
|
888 |
-
|
889 |
-
// Real - audio/video - RealAudio, RealVideo
|
890 |
-
'real' => array(
|
891 |
-
'pattern' => '^(\\.RMF|\\.ra)',
|
892 |
-
'group' => 'audio-video',
|
893 |
-
'module' => 'real',
|
894 |
-
'mime_type' => 'audio/x-realaudio',
|
895 |
-
),
|
896 |
-
|
897 |
-
// SWF - audio/video - ShockWave Flash
|
898 |
-
'swf' => array(
|
899 |
-
'pattern' => '^(F|C)WS',
|
900 |
-
'group' => 'audio-video',
|
901 |
-
'module' => 'swf',
|
902 |
-
'mime_type' => 'application/x-shockwave-flash',
|
903 |
-
),
|
904 |
-
|
905 |
-
|
906 |
-
// Still-Image formats
|
907 |
-
|
908 |
-
// BMP - still image - Bitmap (Windows, OS/2; uncompressed, RLE8, RLE4)
|
909 |
-
'bmp' => array(
|
910 |
-
'pattern' => '^BM',
|
911 |
-
'group' => 'graphic',
|
912 |
-
'module' => 'bmp',
|
913 |
-
'mime_type' => 'image/bmp',
|
914 |
-
'fail_id3' => 'ERROR',
|
915 |
-
'fail_ape' => 'ERROR',
|
916 |
-
),
|
917 |
-
|
918 |
-
// GIF - still image - Graphics Interchange Format
|
919 |
-
'gif' => array(
|
920 |
-
'pattern' => '^GIF',
|
921 |
-
'group' => 'graphic',
|
922 |
-
'module' => 'gif',
|
923 |
-
'mime_type' => 'image/gif',
|
924 |
-
'fail_id3' => 'ERROR',
|
925 |
-
'fail_ape' => 'ERROR',
|
926 |
-
),
|
927 |
-
|
928 |
-
// JPEG - still image - Joint Photographic Experts Group (JPEG)
|
929 |
-
'jpg' => array(
|
930 |
-
'pattern' => '^\xFF\xD8\xFF',
|
931 |
-
'group' => 'graphic',
|
932 |
-
'module' => 'jpg',
|
933 |
-
'mime_type' => 'image/jpeg',
|
934 |
-
'fail_id3' => 'ERROR',
|
935 |
-
'fail_ape' => 'ERROR',
|
936 |
-
),
|
937 |
-
|
938 |
-
// PCD - still image - Kodak Photo CD
|
939 |
-
'pcd' => array(
|
940 |
-
'pattern' => '^.{2048}PCD_IPI\x00',
|
941 |
-
'group' => 'graphic',
|
942 |
-
'module' => 'pcd',
|
943 |
-
'mime_type' => 'image/x-photo-cd',
|
944 |
-
'fail_id3' => 'ERROR',
|
945 |
-
'fail_ape' => 'ERROR',
|
946 |
-
),
|
947 |
-
|
948 |
-
|
949 |
-
// PNG - still image - Portable Network Graphics (PNG)
|
950 |
-
'png' => array(
|
951 |
-
'pattern' => '^\x89\x50\x4E\x47\x0D\x0A\x1A\x0A',
|
952 |
-
'group' => 'graphic',
|
953 |
-
'module' => 'png',
|
954 |
-
'mime_type' => 'image/png',
|
955 |
-
'fail_id3' => 'ERROR',
|
956 |
-
'fail_ape' => 'ERROR',
|
957 |
-
),
|
958 |
-
|
959 |
-
|
960 |
-
// SVG - still image - Scalable Vector Graphics (SVG)
|
961 |
-
'svg' => array(
|
962 |
-
'pattern' => '(<!DOCTYPE svg PUBLIC |xmlns="http:\/\/www\.w3\.org\/2000\/svg")',
|
963 |
-
'group' => 'graphic',
|
964 |
-
'module' => 'svg',
|
965 |
-
'mime_type' => 'image/svg+xml',
|
966 |
-
'fail_id3' => 'ERROR',
|
967 |
-
'fail_ape' => 'ERROR',
|
968 |
-
),
|
969 |
-
|
970 |
-
|
971 |
-
// TIFF - still image - Tagged Information File Format (TIFF)
|
972 |
-
'tiff' => array(
|
973 |
-
'pattern' => '^(II\x2A\x00|MM\x00\x2A)',
|
974 |
-
'group' => 'graphic',
|
975 |
-
'module' => 'tiff',
|
976 |
-
'mime_type' => 'image/tiff',
|
977 |
-
'fail_id3' => 'ERROR',
|
978 |
-
'fail_ape' => 'ERROR',
|
979 |
-
),
|
980 |
-
|
981 |
-
|
982 |
-
// EFAX - still image - eFax (TIFF derivative)
|
983 |
-
'bmp' => array(
|
984 |
-
'pattern' => '^\xDC\xFE',
|
985 |
-
'group' => 'graphic',
|
986 |
-
'module' => 'efax',
|
987 |
-
'mime_type' => 'image/efax',
|
988 |
-
'fail_id3' => 'ERROR',
|
989 |
-
'fail_ape' => 'ERROR',
|
990 |
-
),
|
991 |
-
|
992 |
-
|
993 |
-
// Data formats
|
994 |
-
|
995 |
-
// ISO - data - International Standards Organization (ISO) CD-ROM Image
|
996 |
-
'iso' => array(
|
997 |
-
'pattern' => '^.{32769}CD001',
|
998 |
-
'group' => 'misc',
|
999 |
-
'module' => 'iso',
|
1000 |
-
'mime_type' => 'application/octet-stream',
|
1001 |
-
'fail_id3' => 'ERROR',
|
1002 |
-
'fail_ape' => 'ERROR',
|
1003 |
-
'iconv_req' => false,
|
1004 |
-
),
|
1005 |
-
|
1006 |
-
// RAR - data - RAR compressed data
|
1007 |
-
'rar' => array(
|
1008 |
-
'pattern' => '^Rar\!',
|
1009 |
-
'group' => 'archive',
|
1010 |
-
'module' => 'rar',
|
1011 |
-
'mime_type' => 'application/octet-stream',
|
1012 |
-
'fail_id3' => 'ERROR',
|
1013 |
-
'fail_ape' => 'ERROR',
|
1014 |
-
),
|
1015 |
-
|
1016 |
-
// SZIP - audio/data - SZIP compressed data
|
1017 |
-
'szip' => array(
|
1018 |
-
'pattern' => '^SZ\x0A\x04',
|
1019 |
-
'group' => 'archive',
|
1020 |
-
'module' => 'szip',
|
1021 |
-
'mime_type' => 'application/octet-stream',
|
1022 |
-
'fail_id3' => 'ERROR',
|
1023 |
-
'fail_ape' => 'ERROR',
|
1024 |
-
),
|
1025 |
-
|
1026 |
-
// TAR - data - TAR compressed data
|
1027 |
-
'tar' => array(
|
1028 |
-
'pattern' => '^.{100}[0-9\x20]{7}\x00[0-9\x20]{7}\x00[0-9\x20]{7}\x00[0-9\x20\x00]{12}[0-9\x20\x00]{12}',
|
1029 |
-
'group' => 'archive',
|
1030 |
-
'module' => 'tar',
|
1031 |
-
'mime_type' => 'application/x-tar',
|
1032 |
-
'fail_id3' => 'ERROR',
|
1033 |
-
'fail_ape' => 'ERROR',
|
1034 |
-
),
|
1035 |
-
|
1036 |
-
// GZIP - data - GZIP compressed data
|
1037 |
-
'gz' => array(
|
1038 |
-
'pattern' => '^\x1F\x8B\x08',
|
1039 |
-
'group' => 'archive',
|
1040 |
-
'module' => 'gzip',
|
1041 |
-
'mime_type' => 'application/x-gzip',
|
1042 |
-
'fail_id3' => 'ERROR',
|
1043 |
-
'fail_ape' => 'ERROR',
|
1044 |
-
),
|
1045 |
-
|
1046 |
-
// ZIP - data - ZIP compressed data
|
1047 |
-
'zip' => array(
|
1048 |
-
'pattern' => '^PK\x03\x04',
|
1049 |
-
'group' => 'archive',
|
1050 |
-
'module' => 'zip',
|
1051 |
-
'mime_type' => 'application/zip',
|
1052 |
-
'fail_id3' => 'ERROR',
|
1053 |
-
'fail_ape' => 'ERROR',
|
1054 |
-
),
|
1055 |
-
|
1056 |
-
|
1057 |
-
// Misc other formats
|
1058 |
-
|
1059 |
-
// PAR2 - data - Parity Volume Set Specification 2.0
|
1060 |
-
'par2' => array (
|
1061 |
-
'pattern' => '^PAR2\x00PKT',
|
1062 |
-
'group' => 'misc',
|
1063 |
-
'module' => 'par2',
|
1064 |
-
'mime_type' => 'application/octet-stream',
|
1065 |
-
'fail_id3' => 'ERROR',
|
1066 |
-
'fail_ape' => 'ERROR',
|
1067 |
-
),
|
1068 |
-
|
1069 |
-
// PDF - data - Portable Document Format
|
1070 |
-
'pdf' => array(
|
1071 |
-
'pattern' => '^\x25PDF',
|
1072 |
-
'group' => 'misc',
|
1073 |
-
'module' => 'pdf',
|
1074 |
-
'mime_type' => 'application/pdf',
|
1075 |
-
'fail_id3' => 'ERROR',
|
1076 |
-
'fail_ape' => 'ERROR',
|
1077 |
-
),
|
1078 |
-
|
1079 |
-
// MSOFFICE - data - ZIP compressed data
|
1080 |
-
'msoffice' => array(
|
1081 |
-
'pattern' => '^\xD0\xCF\x11\xE0\xA1\xB1\x1A\xE1', // D0CF11E == DOCFILE == Microsoft Office Document
|
1082 |
-
'group' => 'misc',
|
1083 |
-
'module' => 'msoffice',
|
1084 |
-
'mime_type' => 'application/octet-stream',
|
1085 |
-
'fail_id3' => 'ERROR',
|
1086 |
-
'fail_ape' => 'ERROR',
|
1087 |
-
),
|
1088 |
-
|
1089 |
-
// CUE - data - CUEsheet (index to single-file disc images)
|
1090 |
-
'cue' => array(
|
1091 |
-
'pattern' => '', // empty pattern means cannot be automatically detected, will fall through all other formats and match based on filename and very basic file contents
|
1092 |
-
'group' => 'misc',
|
1093 |
-
'module' => 'cue',
|
1094 |
-
'mime_type' => 'application/octet-stream',
|
1095 |
-
),
|
1096 |
-
|
1097 |
-
);
|
1098 |
-
}
|
1099 |
-
|
1100 |
-
return $format_info;
|
1101 |
-
}
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
function GetFileFormat(&$filedata, $filename='') {
|
1106 |
-
// this function will determine the format of a file based on usually
|
1107 |
-
// the first 2-4 bytes of the file (8 bytes for PNG, 16 bytes for JPG,
|
1108 |
-
// and in the case of ISO CD image, 6 bytes offset 32kb from the start
|
1109 |
-
// of the file).
|
1110 |
-
|
1111 |
-
// Identify file format - loop through $format_info and detect with reg expr
|
1112 |
-
foreach ($this->GetFileFormatArray() as $format_name => $info) {
|
1113 |
-
// The /s switch on preg_match() forces preg_match() NOT to treat
|
1114 |
-
// newline (0x0A) characters as special chars but do a binary match
|
1115 |
-
if (!empty($info['pattern']) && preg_match('#'.$info['pattern'].'#s', $filedata)) {
|
1116 |
-
$info['include'] = 'module.'.$info['group'].'.'.$info['module'].'.php';
|
1117 |
-
return $info;
|
1118 |
-
}
|
1119 |
-
}
|
1120 |
-
|
1121 |
-
|
1122 |
-
if (preg_match('#\.mp[123a]$#i', $filename)) {
|
1123 |
-
// Too many mp3 encoders on the market put gabage in front of mpeg files
|
1124 |
-
// use assume format on these if format detection failed
|
1125 |
-
$GetFileFormatArray = $this->GetFileFormatArray();
|
1126 |
-
$info = $GetFileFormatArray['mp3'];
|
1127 |
-
$info['include'] = 'module.'.$info['group'].'.'.$info['module'].'.php';
|
1128 |
-
return $info;
|
1129 |
-
} elseif (preg_match('/\.cue$/i', $filename) && preg_match('#FILE "[^"]+" (BINARY|MOTOROLA|AIFF|WAVE|MP3)#', $filedata)) {
|
1130 |
-
// there's not really a useful consistent "magic" at the beginning of .cue files to identify them
|
1131 |
-
// so until I think of something better, just go by filename if all other format checks fail
|
1132 |
-
// and verify there's at least one instance of "TRACK xx AUDIO" in the file
|
1133 |
-
$GetFileFormatArray = $this->GetFileFormatArray();
|
1134 |
-
$info = $GetFileFormatArray['cue'];
|
1135 |
-
$info['include'] = 'module.'.$info['group'].'.'.$info['module'].'.php';
|
1136 |
-
return $info;
|
1137 |
-
}
|
1138 |
-
|
1139 |
-
return false;
|
1140 |
-
}
|
1141 |
-
|
1142 |
-
|
1143 |
-
// converts array to $encoding charset from $this->encoding
|
1144 |
-
function CharConvert(&$array, $encoding) {
|
1145 |
-
|
1146 |
-
// identical encoding - end here
|
1147 |
-
if ($encoding == $this->encoding) {
|
1148 |
-
return;
|
1149 |
-
}
|
1150 |
-
|
1151 |
-
// loop thru array
|
1152 |
-
foreach ($array as $key => $value) {
|
1153 |
-
|
1154 |
-
// go recursive
|
1155 |
-
if (is_array($value)) {
|
1156 |
-
$this->CharConvert($array[$key], $encoding);
|
1157 |
-
}
|
1158 |
-
|
1159 |
-
// convert string
|
1160 |
-
elseif (is_string($value)) {
|
1161 |
-
$array[$key] = trim(getid3_lib::iconv_fallback($encoding, $this->encoding, $value));
|
1162 |
-
}
|
1163 |
-
}
|
1164 |
-
}
|
1165 |
-
|
1166 |
-
|
1167 |
-
function HandleAllTags() {
|
1168 |
-
|
1169 |
-
// key name => array (tag name, character encoding)
|
1170 |
-
static $tags;
|
1171 |
-
if (empty($tags)) {
|
1172 |
-
$tags = array(
|
1173 |
-
'asf' => array('asf' , 'UTF-16LE'),
|
1174 |
-
'midi' => array('midi' , 'ISO-8859-1'),
|
1175 |
-
'nsv' => array('nsv' , 'ISO-8859-1'),
|
1176 |
-
'ogg' => array('vorbiscomment' , 'UTF-8'),
|
1177 |
-
'png' => array('png' , 'UTF-8'),
|
1178 |
-
'tiff' => array('tiff' , 'ISO-8859-1'),
|
1179 |
-
'quicktime' => array('quicktime' , 'UTF-8'),
|
1180 |
-
'real' => array('real' , 'ISO-8859-1'),
|
1181 |
-
'vqf' => array('vqf' , 'ISO-8859-1'),
|
1182 |
-
'zip' => array('zip' , 'ISO-8859-1'),
|
1183 |
-
'riff' => array('riff' , 'ISO-8859-1'),
|
1184 |
-
'lyrics3' => array('lyrics3' , 'ISO-8859-1'),
|
1185 |
-
'id3v1' => array('id3v1' , $this->encoding_id3v1),
|
1186 |
-
'id3v2' => array('id3v2' , 'UTF-8'), // not according to the specs (every frame can have a different encoding), but getID3() force-converts all encodings to UTF-8
|
1187 |
-
'ape' => array('ape' , 'UTF-8'),
|
1188 |
-
'cue' => array('cue' , 'ISO-8859-1'),
|
1189 |
-
'matroska' => array('matroska' , 'UTF-8'),
|
1190 |
-
);
|
1191 |
-
}
|
1192 |
-
|
1193 |
-
// loop through comments array
|
1194 |
-
foreach ($tags as $comment_name => $tagname_encoding_array) {
|
1195 |
-
list($tag_name, $encoding) = $tagname_encoding_array;
|
1196 |
-
|
1197 |
-
// fill in default encoding type if not already present
|
1198 |
-
if (isset($this->info[$comment_name]) && !isset($this->info[$comment_name]['encoding'])) {
|
1199 |
-
$this->info[$comment_name]['encoding'] = $encoding;
|
1200 |
-
}
|
1201 |
-
|
1202 |
-
// copy comments if key name set
|
1203 |
-
if (!empty($this->info[$comment_name]['comments'])) {
|
1204 |
-
|
1205 |
-
foreach ($this->info[$comment_name]['comments'] as $tag_key => $valuearray) {
|
1206 |
-
foreach ($valuearray as $key => $value) {
|
1207 |
-
if (is_string($value)) {
|
1208 |
-
$value = trim($value, " \r\n\t"); // do not trim nulls from $value!! Unicode characters will get mangled if trailing nulls are removed!
|
1209 |
-
}
|
1210 |
-
if ($value) {
|
1211 |
-
$this->info['tags'][trim($tag_name)][trim($tag_key)][] = $value;
|
1212 |
-
}
|
1213 |
-
}
|
1214 |
-
}
|
1215 |
-
|
1216 |
-
if (!isset($this->info['tags'][$tag_name])) {
|
1217 |
-
// comments are set but contain nothing but empty strings, so skip
|
1218 |
-
continue;
|
1219 |
-
}
|
1220 |
-
|
1221 |
-
if ($this->option_tags_html) {
|
1222 |
-
foreach ($this->info['tags'][$tag_name] as $tag_key => $valuearray) {
|
1223 |
-
foreach ($valuearray as $key => $value) {
|
1224 |
-
if (is_string($value)) {
|
1225 |
-
//$this->info['tags_html'][$tag_name][$tag_key][$key] = getid3_lib::MultiByteCharString2HTML($value, $encoding);
|
1226 |
-
$this->info['tags_html'][$tag_name][$tag_key][$key] = str_replace('�', '', trim(getid3_lib::MultiByteCharString2HTML($value, $encoding)));
|
1227 |
-
} else {
|
1228 |
-
$this->info['tags_html'][$tag_name][$tag_key][$key] = $value;
|
1229 |
-
}
|
1230 |
-
}
|
1231 |
-
}
|
1232 |
-
}
|
1233 |
-
|
1234 |
-
$this->CharConvert($this->info['tags'][$tag_name], $encoding); // only copy gets converted!
|
1235 |
-
}
|
1236 |
-
|
1237 |
-
}
|
1238 |
-
|
1239 |
-
// pictures can take up a lot of space, and we don't need multiple copies of them
|
1240 |
-
// let there be a single copy in [comments][picture], and not elsewhere
|
1241 |
-
if (!empty($this->info['tags'])) {
|
1242 |
-
$unset_keys = array('tags', 'tags_html');
|
1243 |
-
foreach ($this->info['tags'] as $tagtype => $tagarray) {
|
1244 |
-
foreach ($tagarray as $tagname => $tagdata) {
|
1245 |
-
if ($tagname == 'picture') {
|
1246 |
-
foreach ($tagdata as $key => $tagarray) {
|
1247 |
-
$this->info['comments']['picture'][] = $tagarray;
|
1248 |
-
if (isset($tagarray['data']) && isset($tagarray['image_mime'])) {
|
1249 |
-
if (isset($this->info['tags'][$tagtype][$tagname][$key])) {
|
1250 |
-
unset($this->info['tags'][$tagtype][$tagname][$key]);
|
1251 |
-
}
|
1252 |
-
if (isset($this->info['tags_html'][$tagtype][$tagname][$key])) {
|
1253 |
-
unset($this->info['tags_html'][$tagtype][$tagname][$key]);
|
1254 |
-
}
|
1255 |
-
}
|
1256 |
-
}
|
1257 |
-
}
|
1258 |
-
}
|
1259 |
-
foreach ($unset_keys as $unset_key) {
|
1260 |
-
// remove possible empty keys from (e.g. [tags][id3v2][picture])
|
1261 |
-
if (empty($this->info[$unset_key][$tagtype]['picture'])) {
|
1262 |
-
unset($this->info[$unset_key][$tagtype]['picture']);
|
1263 |
-
}
|
1264 |
-
if (empty($this->info[$unset_key][$tagtype])) {
|
1265 |
-
unset($this->info[$unset_key][$tagtype]);
|
1266 |
-
}
|
1267 |
-
if (empty($this->info[$unset_key])) {
|
1268 |
-
unset($this->info[$unset_key]);
|
1269 |
-
}
|
1270 |
-
}
|
1271 |
-
// remove duplicate copy of picture data from (e.g. [id3v2][comments][picture])
|
1272 |
-
if (isset($this->info[$tagtype]['comments']['picture'])) {
|
1273 |
-
unset($this->info[$tagtype]['comments']['picture']);
|
1274 |
-
}
|
1275 |
-
if (empty($this->info[$tagtype]['comments'])) {
|
1276 |
-
unset($this->info[$tagtype]['comments']);
|
1277 |
-
}
|
1278 |
-
if (empty($this->info[$tagtype])) {
|
1279 |
-
unset($this->info[$tagtype]);
|
1280 |
-
}
|
1281 |
-
}
|
1282 |
-
}
|
1283 |
-
return true;
|
1284 |
-
}
|
1285 |
-
|
1286 |
-
|
1287 |
-
function getHashdata($algorithm) {
|
1288 |
-
switch ($algorithm) {
|
1289 |
-
case 'md5':
|
1290 |
-
case 'sha1':
|
1291 |
-
break;
|
1292 |
-
|
1293 |
-
default:
|
1294 |
-
return $this->error('bad algorithm "'.$algorithm.'" in getHashdata()');
|
1295 |
-
break;
|
1296 |
-
}
|
1297 |
-
|
1298 |
-
if (!empty($this->info['fileformat']) && !empty($this->info['dataformat']) && ($this->info['fileformat'] == 'ogg') && ($this->info['audio']['dataformat'] == 'vorbis')) {
|
1299 |
-
|
1300 |
-
// We cannot get an identical md5_data value for Ogg files where the comments
|
1301 |
-
// span more than 1 Ogg page (compared to the same audio data with smaller
|
1302 |
-
// comments) using the normal getID3() method of MD5'ing the data between the
|
1303 |
-
// end of the comments and the end of the file (minus any trailing tags),
|
1304 |
-
// because the page sequence numbers of the pages that the audio data is on
|
1305 |
-
// do not match. Under normal circumstances, where comments are smaller than
|
1306 |
-
// the nominal 4-8kB page size, then this is not a problem, but if there are
|
1307 |
-
// very large comments, the only way around it is to strip off the comment
|
1308 |
-
// tags with vorbiscomment and MD5 that file.
|
1309 |
-
// This procedure must be applied to ALL Ogg files, not just the ones with
|
1310 |
-
// comments larger than 1 page, because the below method simply MD5's the
|
1311 |
-
// whole file with the comments stripped, not just the portion after the
|
1312 |
-
// comments block (which is the standard getID3() method.
|
1313 |
-
|
1314 |
-
// The above-mentioned problem of comments spanning multiple pages and changing
|
1315 |
-
// page sequence numbers likely happens for OggSpeex and OggFLAC as well, but
|
1316 |
-
// currently vorbiscomment only works on OggVorbis files.
|
1317 |
-
|
1318 |
-
if (preg_match('#(1|ON)#i', ini_get('safe_mode'))) {
|
1319 |
-
|
1320 |
-
$this->warning('Failed making system call to vorbiscomment.exe - '.$algorithm.'_data is incorrect - error returned: PHP running in Safe Mode (backtick operator not available)');
|
1321 |
-
$this->info[$algorithm.'_data'] = false;
|
1322 |
-
|
1323 |
-
} else {
|
1324 |
-
|
1325 |
-
// Prevent user from aborting script
|
1326 |
-
$old_abort = ignore_user_abort(true);
|
1327 |
-
|
1328 |
-
// Create empty file
|
1329 |
-
$empty = tempnam(GETID3_TEMP_DIR, 'getID3');
|
1330 |
-
touch($empty);
|
1331 |
-
|
1332 |
-
// Use vorbiscomment to make temp file without comments
|
1333 |
-
$temp = tempnam(GETID3_TEMP_DIR, 'getID3');
|
1334 |
-
$file = $this->info['filenamepath'];
|
1335 |
-
|
1336 |
-
if (GETID3_OS_ISWINDOWS) {
|
1337 |
-
|
1338 |
-
if (file_exists(GETID3_HELPERAPPSDIR.'vorbiscomment.exe')) {
|
1339 |
-
|
1340 |
-
$commandline = '"'.GETID3_HELPERAPPSDIR.'vorbiscomment.exe" -w -c "'.$empty.'" "'.$file.'" "'.$temp.'"';
|
1341 |
-
$VorbisCommentError = `$commandline`;
|
1342 |
-
|
1343 |
-
} else {
|
1344 |
-
|
1345 |
-
$VorbisCommentError = 'vorbiscomment.exe not found in '.GETID3_HELPERAPPSDIR;
|
1346 |
-
|
1347 |
-
}
|
1348 |
-
|
1349 |
-
} else {
|
1350 |
-
|
1351 |
-
$commandline = 'vorbiscomment -w -c "'.$empty.'" "'.$file.'" "'.$temp.'" 2>&1';
|
1352 |
-
$commandline = 'vorbiscomment -w -c '.escapeshellarg($empty).' '.escapeshellarg($file).' '.escapeshellarg($temp).' 2>&1';
|
1353 |
-
$VorbisCommentError = `$commandline`;
|
1354 |
-
|
1355 |
-
}
|
1356 |
-
|
1357 |
-
if (!empty($VorbisCommentError)) {
|
1358 |
-
|
1359 |
-
$this->info['warning'][] = 'Failed making system call to vorbiscomment(.exe) - '.$algorithm.'_data will be incorrect. If vorbiscomment is unavailable, please download from http://www.vorbis.com/download.psp and put in the getID3() directory. Error returned: '.$VorbisCommentError;
|
1360 |
-
$this->info[$algorithm.'_data'] = false;
|
1361 |
-
|
1362 |
-
} else {
|
1363 |
-
|
1364 |
-
// Get hash of newly created file
|
1365 |
-
switch ($algorithm) {
|
1366 |
-
case 'md5':
|
1367 |
-
$this->info[$algorithm.'_data'] = md5_file($temp);
|
1368 |
-
break;
|
1369 |
-
|
1370 |
-
case 'sha1':
|
1371 |
-
$this->info[$algorithm.'_data'] = sha1_file($temp);
|
1372 |
-
break;
|
1373 |
-
}
|
1374 |
-
}
|
1375 |
-
|
1376 |
-
// Clean up
|
1377 |
-
unlink($empty);
|
1378 |
-
unlink($temp);
|
1379 |
-
|
1380 |
-
// Reset abort setting
|
1381 |
-
ignore_user_abort($old_abort);
|
1382 |
-
|
1383 |
-
}
|
1384 |
-
|
1385 |
-
} else {
|
1386 |
-
|
1387 |
-
if (!empty($this->info['avdataoffset']) || (isset($this->info['avdataend']) && ($this->info['avdataend'] < $this->info['filesize']))) {
|
1388 |
-
|
1389 |
-
// get hash from part of file
|
1390 |
-
$this->info[$algorithm.'_data'] = getid3_lib::hash_data($this->info['filenamepath'], $this->info['avdataoffset'], $this->info['avdataend'], $algorithm);
|
1391 |
-
|
1392 |
-
} else {
|
1393 |
-
|
1394 |
-
// get hash from whole file
|
1395 |
-
switch ($algorithm) {
|
1396 |
-
case 'md5':
|
1397 |
-
$this->info[$algorithm.'_data'] = md5_file($this->info['filenamepath']);
|
1398 |
-
break;
|
1399 |
-
|
1400 |
-
case 'sha1':
|
1401 |
-
$this->info[$algorithm.'_data'] = sha1_file($this->info['filenamepath']);
|
1402 |
-
break;
|
1403 |
-
}
|
1404 |
-
}
|
1405 |
-
|
1406 |
-
}
|
1407 |
-
return true;
|
1408 |
-
}
|
1409 |
-
|
1410 |
-
|
1411 |
-
function ChannelsBitratePlaytimeCalculations() {
|
1412 |
-
|
1413 |
-
// set channelmode on audio
|
1414 |
-
if (!empty($this->info['audio']['channelmode']) || !isset($this->info['audio']['channels'])) {
|
1415 |
-
// ignore
|
1416 |
-
} elseif ($this->info['audio']['channels'] == 1) {
|
1417 |
-
$this->info['audio']['channelmode'] = 'mono';
|
1418 |
-
} elseif ($this->info['audio']['channels'] == 2) {
|
1419 |
-
$this->info['audio']['channelmode'] = 'stereo';
|
1420 |
-
}
|
1421 |
-
|
1422 |
-
// Calculate combined bitrate - audio + video
|
1423 |
-
$CombinedBitrate = 0;
|
1424 |
-
$CombinedBitrate += (isset($this->info['audio']['bitrate']) ? $this->info['audio']['bitrate'] : 0);
|
1425 |
-
$CombinedBitrate += (isset($this->info['video']['bitrate']) ? $this->info['video']['bitrate'] : 0);
|
1426 |
-
if (($CombinedBitrate > 0) && empty($this->info['bitrate'])) {
|
1427 |
-
$this->info['bitrate'] = $CombinedBitrate;
|
1428 |
-
}
|
1429 |
-
//if ((isset($this->info['video']) && !isset($this->info['video']['bitrate'])) || (isset($this->info['audio']) && !isset($this->info['audio']['bitrate']))) {
|
1430 |
-
// // for example, VBR MPEG video files cannot determine video bitrate:
|
1431 |
-
// // should not set overall bitrate and playtime from audio bitrate only
|
1432 |
-
// unset($this->info['bitrate']);
|
1433 |
-
//}
|
1434 |
-
|
1435 |
-
// video bitrate undetermined, but calculable
|
1436 |
-
if (isset($this->info['video']['dataformat']) && $this->info['video']['dataformat'] && (!isset($this->info['video']['bitrate']) || ($this->info['video']['bitrate'] == 0))) {
|
1437 |
-
// if video bitrate not set
|
1438 |
-
if (isset($this->info['audio']['bitrate']) && ($this->info['audio']['bitrate'] > 0) && ($this->info['audio']['bitrate'] == $this->info['bitrate'])) {
|
1439 |
-
// AND if audio bitrate is set to same as overall bitrate
|
1440 |
-
if (isset($this->info['playtime_seconds']) && ($this->info['playtime_seconds'] > 0)) {
|
1441 |
-
// AND if playtime is set
|
1442 |
-
if (isset($this->info['avdataend']) && isset($this->info['avdataoffset'])) {
|
1443 |
-
// AND if AV data offset start/end is known
|
1444 |
-
// THEN we can calculate the video bitrate
|
1445 |
-
$this->info['bitrate'] = round((($this->info['avdataend'] - $this->info['avdataoffset']) * 8) / $this->info['playtime_seconds']);
|
1446 |
-
$this->info['video']['bitrate'] = $this->info['bitrate'] - $this->info['audio']['bitrate'];
|
1447 |
-
}
|
1448 |
-
}
|
1449 |
-
}
|
1450 |
-
}
|
1451 |
-
|
1452 |
-
if ((!isset($this->info['playtime_seconds']) || ($this->info['playtime_seconds'] <= 0)) && !empty($this->info['bitrate'])) {
|
1453 |
-
$this->info['playtime_seconds'] = (($this->info['avdataend'] - $this->info['avdataoffset']) * 8) / $this->info['bitrate'];
|
1454 |
-
}
|
1455 |
-
|
1456 |
-
if (!isset($this->info['bitrate']) && !empty($this->info['playtime_seconds'])) {
|
1457 |
-
$this->info['bitrate'] = (($this->info['avdataend'] - $this->info['avdataoffset']) * 8) / $this->info['playtime_seconds'];
|
1458 |
-
}
|
1459 |
-
if (isset($this->info['bitrate']) && empty($this->info['audio']['bitrate']) && empty($this->info['video']['bitrate'])) {
|
1460 |
-
if (isset($this->info['audio']['dataformat']) && empty($this->info['video']['resolution_x'])) {
|
1461 |
-
// audio only
|
1462 |
-
$this->info['audio']['bitrate'] = $this->info['bitrate'];
|
1463 |
-
} elseif (isset($this->info['video']['resolution_x']) && empty($this->info['audio']['dataformat'])) {
|
1464 |
-
// video only
|
1465 |
-
$this->info['video']['bitrate'] = $this->info['bitrate'];
|
1466 |
-
}
|
1467 |
-
}
|
1468 |
-
|
1469 |
-
// Set playtime string
|
1470 |
-
if (!empty($this->info['playtime_seconds']) && empty($this->info['playtime_string'])) {
|
1471 |
-
$this->info['playtime_string'] = getid3_lib::PlaytimeString($this->info['playtime_seconds']);
|
1472 |
-
}
|
1473 |
-
}
|
1474 |
-
|
1475 |
-
|
1476 |
-
function CalculateCompressionRatioVideo() {
|
1477 |
-
if (empty($this->info['video'])) {
|
1478 |
-
return false;
|
1479 |
-
}
|
1480 |
-
if (empty($this->info['video']['resolution_x']) || empty($this->info['video']['resolution_y'])) {
|
1481 |
-
return false;
|
1482 |
-
}
|
1483 |
-
if (empty($this->info['video']['bits_per_sample'])) {
|
1484 |
-
return false;
|
1485 |
-
}
|
1486 |
-
|
1487 |
-
switch ($this->info['video']['dataformat']) {
|
1488 |
-
case 'bmp':
|
1489 |
-
case 'gif':
|
1490 |
-
case 'jpeg':
|
1491 |
-
case 'jpg':
|
1492 |
-
case 'png':
|
1493 |
-
case 'tiff':
|
1494 |
-
$FrameRate = 1;
|
1495 |
-
$PlaytimeSeconds = 1;
|
1496 |
-
$BitrateCompressed = $this->info['filesize'] * 8;
|
1497 |
-
break;
|
1498 |
-
|
1499 |
-
default:
|
1500 |
-
if (!empty($this->info['video']['frame_rate'])) {
|
1501 |
-
$FrameRate = $this->info['video']['frame_rate'];
|
1502 |
-
} else {
|
1503 |
-
return false;
|
1504 |
-
}
|
1505 |
-
if (!empty($this->info['playtime_seconds'])) {
|
1506 |
-
$PlaytimeSeconds = $this->info['playtime_seconds'];
|
1507 |
-
} else {
|
1508 |
-
return false;
|
1509 |
-
}
|
1510 |
-
if (!empty($this->info['video']['bitrate'])) {
|
1511 |
-
$BitrateCompressed = $this->info['video']['bitrate'];
|
1512 |
-
} else {
|
1513 |
-
return false;
|
1514 |
-
}
|
1515 |
-
break;
|
1516 |
-
}
|
1517 |
-
$BitrateUncompressed = $this->info['video']['resolution_x'] * $this->info['video']['resolution_y'] * $this->info['video']['bits_per_sample'] * $FrameRate;
|
1518 |
-
|
1519 |
-
$this->info['video']['compression_ratio'] = $BitrateCompressed / $BitrateUncompressed;
|
1520 |
-
return true;
|
1521 |
-
}
|
1522 |
-
|
1523 |
-
|
1524 |
-
function CalculateCompressionRatioAudio() {
|
1525 |
-
if (empty($this->info['audio']['bitrate']) || empty($this->info['audio']['channels']) || empty($this->info['audio']['sample_rate'])) {
|
1526 |
-
return false;
|
1527 |
-
}
|
1528 |
-
$this->info['audio']['compression_ratio'] = $this->info['audio']['bitrate'] / ($this->info['audio']['channels'] * $this->info['audio']['sample_rate'] * (!empty($this->info['audio']['bits_per_sample']) ? $this->info['audio']['bits_per_sample'] : 16));
|
1529 |
-
|
1530 |
-
if (!empty($this->info['audio']['streams'])) {
|
1531 |
-
foreach ($this->info['audio']['streams'] as $streamnumber => $streamdata) {
|
1532 |
-
if (!empty($streamdata['bitrate']) && !empty($streamdata['channels']) && !empty($streamdata['sample_rate'])) {
|
1533 |
-
$this->info['audio']['streams'][$streamnumber]['compression_ratio'] = $streamdata['bitrate'] / ($streamdata['channels'] * $streamdata['sample_rate'] * (!empty($streamdata['bits_per_sample']) ? $streamdata['bits_per_sample'] : 16));
|
1534 |
-
}
|
1535 |
-
}
|
1536 |
-
}
|
1537 |
-
return true;
|
1538 |
-
}
|
1539 |
-
|
1540 |
-
|
1541 |
-
function CalculateReplayGain() {
|
1542 |
-
if (isset($this->info['replay_gain'])) {
|
1543 |
-
if (!isset($this->info['replay_gain']['reference_volume'])) {
|
1544 |
-
$this->info['replay_gain']['reference_volume'] = (double) 89.0;
|
1545 |
-
}
|
1546 |
-
if (isset($this->info['replay_gain']['track']['adjustment'])) {
|
1547 |
-
$this->info['replay_gain']['track']['volume'] = $this->info['replay_gain']['reference_volume'] - $this->info['replay_gain']['track']['adjustment'];
|
1548 |
-
}
|
1549 |
-
if (isset($this->info['replay_gain']['album']['adjustment'])) {
|
1550 |
-
$this->info['replay_gain']['album']['volume'] = $this->info['replay_gain']['reference_volume'] - $this->info['replay_gain']['album']['adjustment'];
|
1551 |
-
}
|
1552 |
-
|
1553 |
-
if (isset($this->info['replay_gain']['track']['peak'])) {
|
1554 |
-
$this->info['replay_gain']['track']['max_noclip_gain'] = 0 - getid3_lib::RGADamplitude2dB($this->info['replay_gain']['track']['peak']);
|
1555 |
-
}
|
1556 |
-
if (isset($this->info['replay_gain']['album']['peak'])) {
|
1557 |
-
$this->info['replay_gain']['album']['max_noclip_gain'] = 0 - getid3_lib::RGADamplitude2dB($this->info['replay_gain']['album']['peak']);
|
1558 |
-
}
|
1559 |
-
}
|
1560 |
-
return true;
|
1561 |
-
}
|
1562 |
-
|
1563 |
-
function ProcessAudioStreams() {
|
1564 |
-
if (!empty($this->info['audio']['bitrate']) || !empty($this->info['audio']['channels']) || !empty($this->info['audio']['sample_rate'])) {
|
1565 |
-
if (!isset($this->info['audio']['streams'])) {
|
1566 |
-
foreach ($this->info['audio'] as $key => $value) {
|
1567 |
-
if ($key != 'streams') {
|
1568 |
-
$this->info['audio']['streams'][0][$key] = $value;
|
1569 |
-
}
|
1570 |
-
}
|
1571 |
-
}
|
1572 |
-
}
|
1573 |
-
return true;
|
1574 |
-
}
|
1575 |
-
|
1576 |
-
function getid3_tempnam() {
|
1577 |
-
return tempnam($this->tempdir, 'gI3');
|
1578 |
-
}
|
1579 |
-
|
1580 |
-
|
1581 |
-
public function saveAttachment(&$ThisFileInfoIndex, $filename, $offset, $length) {
|
1582 |
-
try {
|
1583 |
-
if (!getid3_lib::intValueSupported($offset + $length)) {
|
1584 |
-
throw new Exception('cannot extract attachment, it extends beyond the '.round(PHP_INT_MAX / 1073741824).'GB limit');
|
1585 |
-
}
|
1586 |
-
|
1587 |
-
// do not extract at all
|
1588 |
-
if ($this->option_save_attachments === getID3::ATTACHMENTS_NONE) {
|
1589 |
-
|
1590 |
-
unset($ThisFileInfoIndex); // do not set any
|
1591 |
-
|
1592 |
-
// extract to return array
|
1593 |
-
} elseif ($this->option_save_attachments === getID3::ATTACHMENTS_INLINE) {
|
1594 |
-
|
1595 |
-
// get whole data in one pass, till it is anyway stored in memory
|
1596 |
-
$ThisFileInfoIndex = file_get_contents($this->info['filenamepath'], false, null, $offset, $length);
|
1597 |
-
if (($ThisFileInfoIndex === false) || (strlen($ThisFileInfoIndex) != $length)) { // verify
|
1598 |
-
throw new Exception('failed to read attachment data');
|
1599 |
-
}
|
1600 |
-
|
1601 |
-
// assume directory path is given
|
1602 |
-
} else {
|
1603 |
-
|
1604 |
-
$dir = rtrim(str_replace(array('/', '\\'), DIRECTORY_SEPARATOR, $this->option_save_attachments), DIRECTORY_SEPARATOR);
|
1605 |
-
// check supplied directory
|
1606 |
-
if (!is_dir($dir) || !is_writable($dir)) {
|
1607 |
-
throw new Exception('getID3::saveAttachment() -- supplied path ('.$dir.') does not exist, or is not writable');
|
1608 |
-
}
|
1609 |
-
|
1610 |
-
// set up destination path
|
1611 |
-
$dest = $dir.DIRECTORY_SEPARATOR.$filename;
|
1612 |
-
|
1613 |
-
// optimize speed if read buffer size is configured to be large enough
|
1614 |
-
// here stream_copy_to_stream() may also be used. need to do speed-compare tests
|
1615 |
-
if ($length <= $this->fread_buffer_size()) {
|
1616 |
-
$data = file_get_contents($this->info['filenamepath'], false, null, $offset, $length);
|
1617 |
-
if (($data === false) || (strlen($data) != $length)) { // verify
|
1618 |
-
throw new Exception('failed to read attachment data');
|
1619 |
-
}
|
1620 |
-
if (!file_put_contents($dest, $data)) {
|
1621 |
-
throw new Exception('failed to create file '.$dest);
|
1622 |
-
}
|
1623 |
-
} else {
|
1624 |
-
// optimization not available - copy data in loop
|
1625 |
-
// here stream_copy_to_stream() shouldn't be used because it's internal read buffer may be larger than ours!
|
1626 |
-
getid3_lib::CopyFileParts($this->info['filenamepath'], $dest, $offset, $length);
|
1627 |
-
}
|
1628 |
-
$ThisFileInfoIndex = $dest;
|
1629 |
-
}
|
1630 |
-
|
1631 |
-
} catch (Exception $e) {
|
1632 |
-
|
1633 |
-
unset($ThisFileInfoIndex); // do not set any is case of error
|
1634 |
-
$this->warning('Failed to extract attachment '.$filename.': '.$e->getMessage());
|
1635 |
-
return false;
|
1636 |
-
|
1637 |
-
}
|
1638 |
-
return true;
|
1639 |
-
}
|
1640 |
-
|
1641 |
-
|
1642 |
-
public function include_module($name) {
|
1643 |
-
//if (!file_exists($this->include_path.'module.'.$name.'.php')) {
|
1644 |
-
if (!file_exists(GETID3_INCLUDEPATH.'module.'.$name.'.php')) {
|
1645 |
-
throw new getid3_exception('Required module.'.$name.'.php is missing.');
|
1646 |
-
}
|
1647 |
-
include_once(GETID3_INCLUDEPATH.'module.'.$name.'.php');
|
1648 |
-
return true;
|
1649 |
-
}
|
1650 |
|
1651 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1652 |
|
|
|
|
|
1653 |
|
1654 |
-
|
1655 |
-
{
|
1656 |
-
protected $getid3; // pointer
|
1657 |
|
1658 |
-
|
1659 |
-
|
1660 |
-
|
|
|
1661 |
|
|
|
|
|
1662 |
|
1663 |
-
|
1664 |
-
|
1665 |
-
|
|
|
1666 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1667 |
|
1668 |
-
|
1669 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1670 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1671 |
|
1672 |
-
|
1673 |
-
|
1674 |
-
|
1675 |
-
|
1676 |
-
|
1677 |
|
1678 |
-
|
1679 |
-
|
1680 |
-
|
1681 |
-
|
1682 |
|
1683 |
-
|
1684 |
-
|
1685 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1686 |
|
1687 |
-
|
1688 |
-
$this->Analyze();
|
1689 |
|
1690 |
-
|
1691 |
-
|
1692 |
-
|
1693 |
-
|
|
|
|
|
|
|
|
|
1694 |
|
1695 |
-
|
1696 |
-
|
1697 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1698 |
|
|
|
|
|
|
|
1699 |
|
1700 |
-
|
1701 |
-
|
1702 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1703 |
}
|
1704 |
-
return ftell($this->getid3->fp);
|
1705 |
-
}
|
1706 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1707 |
|
1708 |
-
|
1709 |
-
|
1710 |
-
|
1711 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1712 |
}
|
1713 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1714 |
}
|
1715 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1716 |
|
1717 |
-
|
1718 |
-
|
1719 |
-
|
1720 |
-
|
1721 |
-
|
1722 |
-
return;
|
1723 |
|
1724 |
-
|
1725 |
-
|
1726 |
-
|
|
|
1727 |
|
1728 |
-
|
1729 |
-
|
1730 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1731 |
}
|
|
|
1732 |
}
|
1733 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1734 |
}
|
1735 |
|
1736 |
}
|
1737 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1738 |
|
1739 |
-
class getid3_exception extends Exception
|
1740 |
-
{
|
1741 |
-
public $message;
|
1742 |
}
|
1743 |
|
1744 |
-
|
1 |
<?php
|
2 |
+
|
3 |
/////////////////////////////////////////////////////////////////
|
4 |
/// getID3() by James Heinrich <info@getid3.org> //
|
5 |
// available at http://getid3.sourceforge.net //
|
9 |
// Please see readme.txt for more information //
|
10 |
// ///
|
11 |
/////////////////////////////////////////////////////////////////
|
|
|
12 |
// attempt to define temp dir as something flexible but reliable
|
13 |
+
|
14 |
+
if ( ! class_exists ( "getID3" ) ) {
|
15 |
+
return;
|
16 |
+
}
|
17 |
+
if ( ! class_exists ( "getid3_exception" ) ) {
|
18 |
+
return;
|
19 |
+
}
|
20 |
+
$temp_dir = ini_get ( 'upload_tmp_dir' );
|
21 |
+
if ( $temp_dir && ( ! is_dir ( $temp_dir ) || ! is_readable ( $temp_dir )) ) {
|
22 |
+
$temp_dir = '';
|
23 |
}
|
24 |
+
if ( ! $temp_dir && function_exists ( 'sys_get_temp_dir' ) ) {
|
25 |
+
// PHP v5.2.1+
|
26 |
+
// sys_get_temp_dir() may give inaccessible temp dir, e.g. with open_basedir on virtual hosts
|
27 |
+
$temp_dir = sys_get_temp_dir ();
|
28 |
}
|
29 |
+
$temp_dir = realpath ( $temp_dir );
|
30 |
+
$open_basedir = ini_get ( 'open_basedir' );
|
31 |
+
if ( $open_basedir ) {
|
32 |
+
// e.g. "/var/www/vhosts/getid3.org/httpdocs/:/tmp/"
|
33 |
+
$temp_dir = str_replace ( array( '/', '\\' ), DIRECTORY_SEPARATOR, $temp_dir );
|
34 |
+
$open_basedir = str_replace ( array( '/', '\\' ), DIRECTORY_SEPARATOR, $open_basedir );
|
35 |
+
if ( substr ( $temp_dir, -1, 1 ) != DIRECTORY_SEPARATOR ) {
|
36 |
+
$temp_dir .= DIRECTORY_SEPARATOR;
|
37 |
+
}
|
38 |
+
$found_valid_tempdir = false;
|
39 |
+
$open_basedirs = explode ( ':', $open_basedir );
|
40 |
+
foreach ( $open_basedirs as $basedir ) {
|
41 |
+
if ( substr ( $basedir, -1, 1 ) != DIRECTORY_SEPARATOR ) {
|
42 |
+
$basedir .= DIRECTORY_SEPARATOR;
|
43 |
+
}
|
44 |
+
if ( preg_match ( '#^' . preg_quote ( $basedir ) . '#', $temp_dir ) ) {
|
45 |
+
$found_valid_tempdir = true;
|
46 |
+
break;
|
47 |
+
}
|
48 |
+
}
|
49 |
+
if ( ! $found_valid_tempdir ) {
|
50 |
+
$temp_dir = '';
|
51 |
+
}
|
52 |
+
unset ( $open_basedirs, $found_valid_tempdir, $basedir );
|
53 |
}
|
54 |
+
if ( ! $temp_dir ) {
|
55 |
+
$temp_dir = '*'; // invalid directory name should force tempnam() to use system default temp dir
|
56 |
}
|
57 |
// $temp_dir = '/something/else/'; // feel free to override temp dir here if it works better for your system
|
58 |
+
define ( 'GETID3_TEMP_DIR', $temp_dir );
|
59 |
+
unset ( $open_basedir, $temp_dir );
|
60 |
|
61 |
|
62 |
// define a constant rather than looking up every time it is needed
|
63 |
+
if ( ! defined ( 'GETID3_OS_ISWINDOWS' ) ) {
|
64 |
+
if ( strtoupper ( substr ( PHP_OS, 0, 3 ) ) == 'WIN' ) {
|
65 |
+
define ( 'GETID3_OS_ISWINDOWS', true );
|
66 |
+
} else {
|
67 |
+
define ( 'GETID3_OS_ISWINDOWS', false );
|
68 |
+
}
|
69 |
}
|
70 |
|
71 |
// Get base path of getID3() - ONCE
|
72 |
+
if ( ! defined ( 'GETID3_INCLUDEPATH' ) ) {
|
73 |
+
foreach ( get_included_files () as $key => $val ) {
|
74 |
+
if ( basename ( $val ) == 'getid3.php' ) {
|
75 |
+
define ( 'GETID3_INCLUDEPATH', dirname ( $val ) . DIRECTORY_SEPARATOR );
|
76 |
+
break;
|
77 |
+
}
|
78 |
+
}
|
79 |
}
|
80 |
|
81 |
// End: Defines
|
82 |
|
83 |
+
if ( ! class_exists ( "getID3" ) ) {
|
84 |
+
|
85 |
+
class getID3 {
|
86 |
+
|
87 |
+
// public: Settings
|
88 |
+
public $encoding = 'UTF-8'; // CASE SENSITIVE! - i.e. (must be supported by iconv()). Examples: ISO-8859-1 UTF-8 UTF-16 UTF-16BE
|
89 |
+
public $encoding_id3v1 = 'ISO-8859-1'; // Should always be 'ISO-8859-1', but some tags may be written in other encodings such as 'EUC-CN' or 'CP1252'
|
90 |
+
// public: Optional tag checks - disable for speed.
|
91 |
+
public $option_tag_id3v1 = true; // Read and process ID3v1 tags
|
92 |
+
public $option_tag_id3v2 = true; // Read and process ID3v2 tags
|
93 |
+
public $option_tag_lyrics3 = true; // Read and process Lyrics3 tags
|
94 |
+
public $option_tag_apetag = true; // Read and process APE tags
|
95 |
+
public $option_tags_process = true; // Copy tags to root key 'tags' and encode to $this->encoding
|
96 |
+
public $option_tags_html = true; // Copy tags to root key 'tags_html' properly translated from various encodings to HTML entities
|
97 |
+
// public: Optional tag/comment calucations
|
98 |
+
public $option_extra_info = true; // Calculate additional info such as bitrate, channelmode etc
|
99 |
+
// public: Optional handling of embedded attachments (e.g. images)
|
100 |
+
public $option_save_attachments = true; // defaults to true (ATTACHMENTS_INLINE) for backward compatibility
|
101 |
+
// public: Optional calculations
|
102 |
+
public $option_md5_data = false; // Get MD5 sum of data part - slow
|
103 |
+
public $option_md5_data_source = false; // Use MD5 of source file if availble - only FLAC and OptimFROG
|
104 |
+
public $option_sha1_data = false; // Get SHA1 sum of data part - slow
|
105 |
+
public $option_max_2gb_check = null; // Check whether file is larger than 2GB and thus not supported by 32-bit PHP (null: auto-detect based on PHP_INT_MAX)
|
106 |
+
// public: Read buffer size in bytes
|
107 |
+
public $option_fread_buffer_size = 32768;
|
108 |
+
// Public variables
|
109 |
+
public $filename; // Filename of file being analysed.
|
110 |
+
public $fp; // Filepointer to file being analysed.
|
111 |
+
public $info; // Result array.
|
112 |
+
// Protected variables
|
113 |
+
protected $startup_error = '';
|
114 |
+
protected $startup_warning = '';
|
115 |
+
protected $memory_limit = 0;
|
116 |
+
|
117 |
+
const VERSION = '1.9.3-20111213';
|
118 |
+
const FREAD_BUFFER_SIZE = 32768;
|
119 |
+
|
120 |
+
var $tempdir = GETID3_TEMP_DIR;
|
121 |
+
|
122 |
+
const ATTACHMENTS_NONE = false;
|
123 |
+
const ATTACHMENTS_INLINE = true;
|
124 |
+
|
125 |
+
// public: constructor
|
126 |
+
public function __construct () {
|
127 |
+
|
128 |
+
// Check for PHP version
|
129 |
+
$required_php_version = '5.0.5';
|
130 |
+
if ( version_compare ( PHP_VERSION, $required_php_version, '<' ) ) {
|
131 |
+
$this->startup_error .= 'getID3() requires PHP v' . $required_php_version . ' or higher - you are running v' . PHP_VERSION;
|
132 |
+
return false;
|
133 |
+
}
|
134 |
+
|
135 |
+
// Check memory
|
136 |
+
$this->memory_limit = ini_get ( 'memory_limit' );
|
137 |
+
if ( preg_match ( '#([0-9]+)M#i', $this->memory_limit, $matches ) ) {
|
138 |
+
// could be stored as "16M" rather than 16777216 for example
|
139 |
+
$this->memory_limit = $matches[ 1 ] * 1048576;
|
140 |
+
} elseif ( preg_match ( '#([0-9]+)G#i', $this->memory_limit, $matches ) ) { // The 'G' modifier is available since PHP 5.1.0
|
141 |
+
// could be stored as "2G" rather than 2147483648 for example
|
142 |
+
$this->memory_limit = $matches[ 1 ] * 1073741824;
|
143 |
+
}
|
144 |
+
if ( $this->memory_limit <= 0 ) {
|
145 |
+
// memory limits probably disabled
|
146 |
+
} elseif ( $this->memory_limit <= 4194304 ) {
|
147 |
+
$this->startup_error .= 'PHP has less than 4MB available memory and will very likely run out. Increase memory_limit in php.ini';
|
148 |
+
} elseif ( $this->memory_limit <= 12582912 ) {
|
149 |
+
$this->startup_warning .= 'PHP has less than 12MB available memory and might run out if all modules are loaded. Increase memory_limit in php.ini';
|
150 |
+
}
|
151 |
+
|
152 |
+
// Check safe_mode off
|
153 |
+
if ( preg_match ( '#(1|ON)#i', ini_get ( 'safe_mode' ) ) ) {
|
154 |
+
$this->warning ( 'WARNING: Safe mode is on, shorten support disabled, md5data/sha1data for ogg vorbis disabled, ogg vorbos/flac tag writing disabled.' );
|
155 |
+
}
|
156 |
+
|
157 |
+
if ( intval ( ini_get ( 'mbstring.func_overload' ) ) > 0 ) {
|
158 |
+
$this->warning ( 'WARNING: php.ini contains "mbstring.func_overload = ' . ini_get ( 'mbstring.func_overload' ) . '", this may break things.' );
|
159 |
+
}
|
160 |
+
|
161 |
+
// Check for magic_quotes_runtime
|
162 |
+
if ( function_exists ( 'get_magic_quotes_runtime' ) ) {
|
163 |
+
if ( get_magic_quotes_runtime () ) {
|
164 |
+
return $this->startup_error ( 'magic_quotes_runtime must be disabled before running getID3(). Surround getid3 block by set_magic_quotes_runtime(0) and set_magic_quotes_runtime(1).' );
|
165 |
+
}
|
166 |
+
}
|
167 |
+
|
168 |
+
// Check for magic_quotes_gpc
|
169 |
+
if ( function_exists ( 'magic_quotes_gpc' ) ) {
|
170 |
+
if ( get_magic_quotes_gpc () ) {
|
171 |
+
return $this->startup_error ( 'magic_quotes_gpc must be disabled before running getID3(). Surround getid3 block by set_magic_quotes_gpc(0) and set_magic_quotes_gpc(1).' );
|
172 |
+
}
|
173 |
+
}
|
174 |
+
|
175 |
+
// Load support library
|
176 |
+
if ( ! include_once(GETID3_INCLUDEPATH . 'getid3.lib.php') ) {
|
177 |
+
$this->startup_error .= 'getid3.lib.php is missing or corrupt';
|
178 |
+
}
|
179 |
+
|
180 |
+
if ( $this->option_max_2gb_check === null ) {
|
181 |
+
$this->option_max_2gb_check = (PHP_INT_MAX <= 2147483647);
|
182 |
+
}
|
183 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
184 |
|
185 |
+
// Needed for Windows only:
|
186 |
+
// Define locations of helper applications for Shorten, VorbisComment, MetaFLAC
|
187 |
+
// as well as other helper functions such as head, tail, md5sum, etc
|
188 |
+
// This path cannot contain spaces, but the below code will attempt to get the
|
189 |
+
// 8.3-equivalent path automatically
|
190 |
+
// IMPORTANT: This path must include the trailing slash
|
191 |
+
if ( GETID3_OS_ISWINDOWS && ! defined ( 'GETID3_HELPERAPPSDIR' ) ) {
|
192 |
+
|
193 |
+
$helperappsdir = GETID3_INCLUDEPATH . '..' . DIRECTORY_SEPARATOR . 'helperapps'; // must not have any space in this path
|
194 |
+
|
195 |
+
if ( ! is_dir ( $helperappsdir ) ) {
|
196 |
+
$this->startup_warning .= '"' . $helperappsdir . '" cannot be defined as GETID3_HELPERAPPSDIR because it does not exist';
|
197 |
+
} elseif ( strpos ( realpath ( $helperappsdir ), ' ' ) !== false ) {
|
198 |
+
$DirPieces = explode ( DIRECTORY_SEPARATOR, realpath ( $helperappsdir ) );
|
199 |
+
$path_so_far = array( );
|
200 |
+
foreach ( $DirPieces as $key => $value ) {
|
201 |
+
if ( strpos ( $value, ' ' ) !== false ) {
|
202 |
+
if ( ! empty ( $path_so_far ) ) {
|
203 |
+
$commandline = 'dir /x ' . escapeshellarg ( implode ( DIRECTORY_SEPARATOR, $path_so_far ) );
|
204 |
+
$dir_listing = `$commandline`;
|
205 |
+
$lines = explode ( "\n", $dir_listing );
|
206 |
+
foreach ( $lines as $line ) {
|
207 |
+
$line = trim ( $line );
|
208 |
+
if ( preg_match ( '#^([0-9/]{10}) +([0-9:]{4,5}( [AP]M)?) +(<DIR>|[0-9,]+) +([^ ]{0,11}) +(.+)$#', $line, $matches ) ) {
|
209 |
+
list($dummy, $date, $time, $ampm, $filesize, $shortname, $filename) = $matches;
|
210 |
+
if ( (strtoupper ( $filesize ) == '<DIR>') && (strtolower ( $filename ) == strtolower ( $value )) ) {
|
211 |
+
$value = $shortname;
|
212 |
+
}
|
213 |
+
}
|
214 |
+
}
|
215 |
+
} else {
|
216 |
+
$this->startup_warning .= 'GETID3_HELPERAPPSDIR must not have any spaces in it - use 8dot3 naming convention if neccesary. You can run "dir /x" from the commandline to see the correct 8.3-style names.';
|
217 |
+
}
|
218 |
+
}
|
219 |
+
$path_so_far[ ] = $value;
|
220 |
+
}
|
221 |
+
$helperappsdir = implode ( DIRECTORY_SEPARATOR, $path_so_far );
|
222 |
+
}
|
223 |
+
define ( 'GETID3_HELPERAPPSDIR', $helperappsdir . DIRECTORY_SEPARATOR );
|
224 |
+
}
|
225 |
+
|
226 |
+
return true;
|
227 |
+
}
|
228 |
+
|
229 |
+
public function version () {
|
230 |
+
return self::VERSION;
|
231 |
+
}
|
232 |
+
|
233 |
+
public function fread_buffer_size () {
|
234 |
+
return $this->option_fread_buffer_size;
|
235 |
+
}
|
236 |
+
|
237 |
+
// public: setOption
|
238 |
+
function setOption ( $optArray ) {
|
239 |
+
if ( ! is_array ( $optArray ) || empty ( $optArray ) ) {
|
240 |
+
return false;
|
241 |
+
}
|
242 |
+
foreach ( $optArray as $opt => $val ) {
|
243 |
+
if ( isset ( $this->$opt ) === false ) {
|
244 |
+
continue;
|
245 |
+
}
|
246 |
+
$this->$opt = $val;
|
247 |
+
}
|
248 |
+
return true;
|
249 |
+
}
|
250 |
+
|
251 |
+
public function openfile ( $filename ) {
|
252 |
+
try {
|
253 |
+
if ( ! empty ( $this->startup_error ) ) {
|
254 |
+
throw new getid3_exception ( $this->startup_error );
|
255 |
+
}
|
256 |
+
if ( ! empty ( $this->startup_warning ) ) {
|
257 |
+
$this->warning ( $this->startup_warning );
|
258 |
+
}
|
259 |
+
|
260 |
+
// init result array and set parameters
|
261 |
+
$this->filename = $filename;
|
262 |
+
$this->info = array( );
|
263 |
+
$this->info[ 'GETID3_VERSION' ] = $this->version ();
|
264 |
+
$this->info[ 'php_memory_limit' ] = $this->memory_limit;
|
265 |
+
|
266 |
+
// remote files not supported
|
267 |
+
if ( preg_match ( '/^(ht|f)tp:\/\//', $filename ) ) {
|
268 |
+
throw new getid3_exception ( 'Remote files are not supported - please copy the file locally first' );
|
269 |
+
}
|
270 |
+
|
271 |
+
$filename = str_replace ( '/', DIRECTORY_SEPARATOR, $filename );
|
272 |
+
$filename = preg_replace ( '#(.+)' . preg_quote ( DIRECTORY_SEPARATOR ) . '{2,}#U', '\1' . DIRECTORY_SEPARATOR, $filename );
|
273 |
+
|
274 |
+
// open local file
|
275 |
+
if ( is_readable ( $filename ) && is_file ( $filename ) && ($this->fp = fopen ( $filename, 'rb' )) ) {
|
276 |
+
// great
|
277 |
+
} else {
|
278 |
+
throw new getid3_exception ( 'Could not open "' . $filename . '" (does not exist, or is not a file)' );
|
279 |
+
}
|
280 |
+
|
281 |
+
$this->info[ 'filesize' ] = filesize ( $filename );
|
282 |
+
// set redundant parameters - might be needed in some include file
|
283 |
+
$this->info[ 'filename' ] = basename ( $filename );
|
284 |
+
$this->info[ 'filepath' ] = str_replace ( '\\', '/', realpath ( dirname ( $filename ) ) );
|
285 |
+
$this->info[ 'filenamepath' ] = $this->info[ 'filepath' ] . '/' . $this->info[ 'filename' ];
|
286 |
+
|
287 |
+
|
288 |
+
// option_max_2gb_check
|
289 |
+
if ( $this->option_max_2gb_check ) {
|
290 |
+
// PHP (32-bit all, and 64-bit Windows) doesn't support integers larger than 2^31 (~2GB)
|
291 |
+
// filesize() simply returns (filesize % (pow(2, 32)), no matter the actual filesize
|
292 |
+
// ftell() returns 0 if seeking to the end is beyond the range of unsigned integer
|
293 |
+
$fseek = fseek ( $this->fp, 0, SEEK_END );
|
294 |
+
if ( ($fseek < 0) || (($this->info[ 'filesize' ] != 0) && (ftell ( $this->fp ) == 0)) ||
|
295 |
+
($this->info[ 'filesize' ] < 0) ||
|
296 |
+
(ftell ( $this->fp ) < 0) ) {
|
297 |
+
$real_filesize = false;
|
298 |
+
if ( GETID3_OS_ISWINDOWS ) {
|
299 |
+
$commandline = 'dir /-C "' . str_replace ( '/', DIRECTORY_SEPARATOR, $filename ) . '"';
|
300 |
+
$dir_output = `$commandline`;
|
301 |
+
if ( preg_match ( '#1 File\(s\)[ ]+([0-9]+) bytes#i', $dir_output, $matches ) ) {
|
302 |
+
$real_filesize = ( float ) $matches[ 1 ];
|
303 |
+
}
|
304 |
+
} else {
|
305 |
+
$commandline = 'ls -o -g -G --time-style=long-iso ' . escapeshellarg ( $filename );
|
306 |
+
$dir_output = `$commandline`;
|
307 |
+
if ( preg_match ( '#([0-9]+) ([0-9]{4}-[0-9]{2}\-[0-9]{2} [0-9]{2}:[0-9]{2}) ' . str_replace ( '#', '\\#', preg_quote ( $filename ) ) . '$#', $dir_output, $matches ) ) {
|
308 |
+
$real_filesize = ( float ) $matches[ 1 ];
|
309 |
+
}
|
310 |
+
}
|
311 |
+
if ( $real_filesize === false ) {
|
312 |
+
unset ( $this->info[ 'filesize' ] );
|
313 |
+
fclose ( $this->fp );
|
314 |
+
throw new getid3_exception ( 'Unable to determine actual filesize. File is most likely larger than ' . round ( PHP_INT_MAX / 1073741824 ) . 'GB and is not supported by PHP.' );
|
315 |
+
} elseif ( getid3_lib::intValueSupported ( $real_filesize ) ) {
|
316 |
+
unset ( $this->info[ 'filesize' ] );
|
317 |
+
fclose ( $this->fp );
|
318 |
+
throw new getid3_exception ( 'PHP seems to think the file is larger than ' . round ( PHP_INT_MAX / 1073741824 ) . 'GB, but filesystem reports it as ' . number_format ( $real_filesize, 3 ) . 'GB, please report to info@getid3.org' );
|
319 |
+
}
|
320 |
+
$this->info[ 'filesize' ] = $real_filesize;
|
321 |
+
$this->error ( 'File is larger than ' . round ( PHP_INT_MAX / 1073741824 ) . 'GB (filesystem reports it as ' . number_format ( $real_filesize, 3 ) . 'GB) and is not properly supported by PHP.' );
|
322 |
+
}
|
323 |
+
}
|
324 |
+
|
325 |
+
// set more parameters
|
326 |
+
$this->info[ 'avdataoffset' ] = 0;
|
327 |
+
$this->info[ 'avdataend' ] = $this->info[ 'filesize' ];
|
328 |
+
$this->info[ 'fileformat' ] = ''; // filled in later
|
329 |
+
$this->info[ 'audio' ][ 'dataformat' ] = ''; // filled in later, unset if not used
|
330 |
+
$this->info[ 'video' ][ 'dataformat' ] = ''; // filled in later, unset if not used
|
331 |
+
$this->info[ 'tags' ] = array( ); // filled in later, unset if not used
|
332 |
+
$this->info[ 'error' ] = array( ); // filled in later, unset if not used
|
333 |
+
$this->info[ 'warning' ] = array( ); // filled in later, unset if not used
|
334 |
+
$this->info[ 'comments' ] = array( ); // filled in later, unset if not used
|
335 |
+
$this->info[ 'encoding' ] = $this->encoding; // required by id3v2 and iso modules - can be unset at the end if desired
|
336 |
+
|
337 |
+
return true;
|
338 |
+
} catch ( Exception $e ) {
|
339 |
+
$this->error ( $e->getMessage () );
|
340 |
+
}
|
341 |
+
return false;
|
342 |
+
}
|
343 |
+
|
344 |
+
// public: analyze file
|
345 |
+
function analyze ( $filename ) {
|
346 |
+
try {
|
347 |
+
if ( ! $this->openfile ( $filename ) ) {
|
348 |
+
return $this->info;
|
349 |
+
}
|
350 |
+
|
351 |
+
// Handle tags
|
352 |
+
foreach ( array( 'id3v2' => 'id3v2', 'id3v1' => 'id3v1', 'apetag' => 'ape', 'lyrics3' => 'lyrics3' ) as $tag_name => $tag_key ) {
|
353 |
+
$option_tag = 'option_tag_' . $tag_name;
|
354 |
+
if ( $this->$option_tag ) {
|
355 |
+
$this->include_module ( 'tag.' . $tag_name );
|
356 |
+
try {
|
357 |
+
$tag_class = 'getid3_' . $tag_name;
|
358 |
+
$tag = new $tag_class ( $this );
|
359 |
+
$tag->Analyze ();
|
360 |
+
} catch ( getid3_exception $e ) {
|
361 |
+
throw $e;
|
362 |
+
}
|
363 |
+
}
|
364 |
+
}
|
365 |
+
if ( isset ( $this->info[ 'id3v2' ][ 'tag_offset_start' ] ) ) {
|
366 |
+
$this->info[ 'avdataoffset' ] = max ( $this->info[ 'avdataoffset' ], $this->info[ 'id3v2' ][ 'tag_offset_end' ] );
|
367 |
+
}
|
368 |
+
foreach ( array( 'id3v1' => 'id3v1', 'apetag' => 'ape', 'lyrics3' => 'lyrics3' ) as $tag_name => $tag_key ) {
|
369 |
+
if ( isset ( $this->info[ $tag_key ][ 'tag_offset_start' ] ) ) {
|
370 |
+
$this->info[ 'avdataend' ] = min ( $this->info[ 'avdataend' ], $this->info[ $tag_key ][ 'tag_offset_start' ] );
|
371 |
+
}
|
372 |
+
}
|
373 |
+
|
374 |
+
// ID3v2 detection (NOT parsing), even if ($this->option_tag_id3v2 == false) done to make fileformat easier
|
375 |
+
if ( ! $this->option_tag_id3v2 ) {
|
376 |
+
fseek ( $this->fp, 0, SEEK_SET );
|
377 |
+
$header = fread ( $this->fp, 10 );
|
378 |
+
if ( (substr ( $header, 0, 3 ) == 'ID3') && (strlen ( $header ) == 10) ) {
|
379 |
+
$this->info[ 'id3v2' ][ 'header' ] = true;
|
380 |
+
$this->info[ 'id3v2' ][ 'majorversion' ] = ord ( $header{3} );
|
381 |
+
$this->info[ 'id3v2' ][ 'minorversion' ] = ord ( $header{4} );
|
382 |
+
$this->info[ 'avdataoffset' ] += getid3_lib::BigEndian2Int ( substr ( $header, 6, 4 ), 1 ) + 10; // length of ID3v2 tag in 10-byte header doesn't include 10-byte header length
|
383 |
+
}
|
384 |
+
}
|
385 |
+
|
386 |
+
// read 32 kb file data
|
387 |
+
fseek ( $this->fp, $this->info[ 'avdataoffset' ], SEEK_SET );
|
388 |
+
$formattest = fread ( $this->fp, 32774 );
|
389 |
+
|
390 |
+
// determine format
|
391 |
+
$determined_format = $this->GetFileFormat ( $formattest, $filename );
|
392 |
+
|
393 |
+
// unable to determine file format
|
394 |
+
if ( ! $determined_format ) {
|
395 |
+
fclose ( $this->fp );
|
396 |
+
return $this->error ( 'unable to determine file format' );
|
397 |
+
}
|
398 |
+
|
399 |
+
// check for illegal ID3 tags
|
400 |
+
if ( isset ( $determined_format[ 'fail_id3' ] ) && (in_array ( 'id3v1', $this->info[ 'tags' ] ) || in_array ( 'id3v2', $this->info[ 'tags' ] )) ) {
|
401 |
+
if ( $determined_format[ 'fail_id3' ] === 'ERROR' ) {
|
402 |
+
fclose ( $this->fp );
|
403 |
+
return $this->error ( 'ID3 tags not allowed on this file type.' );
|
404 |
+
} elseif ( $determined_format[ 'fail_id3' ] === 'WARNING' ) {
|
405 |
+
$this->warning ( 'ID3 tags not allowed on this file type.' );
|
406 |
+
}
|
407 |
+
}
|
408 |
+
|
409 |
+
// check for illegal APE tags
|
410 |
+
if ( isset ( $determined_format[ 'fail_ape' ] ) && in_array ( 'ape', $this->info[ 'tags' ] ) ) {
|
411 |
+
if ( $determined_format[ 'fail_ape' ] === 'ERROR' ) {
|
412 |
+
fclose ( $this->fp );
|
413 |
+
return $this->error ( 'APE tags not allowed on this file type.' );
|
414 |
+
} elseif ( $determined_format[ 'fail_ape' ] === 'WARNING' ) {
|
415 |
+
$this->warning ( 'APE tags not allowed on this file type.' );
|
416 |
+
}
|
417 |
+
}
|
418 |
+
|
419 |
+
// set mime type
|
420 |
+
$this->info[ 'mime_type' ] = $determined_format[ 'mime_type' ];
|
421 |
+
|
422 |
+
// supported format signature pattern detected, but module deleted
|
423 |
+
if ( ! file_exists ( GETID3_INCLUDEPATH . $determined_format[ 'include' ] ) ) {
|
424 |
+
fclose ( $this->fp );
|
425 |
+
return $this->error ( 'Format not supported, module "' . $determined_format[ 'include' ] . '" was removed.' );
|
426 |
+
}
|
427 |
+
|
428 |
+
// module requires iconv support
|
429 |
+
// Check encoding/iconv support
|
430 |
+
if ( ! empty ( $determined_format[ 'iconv_req' ] ) && ! function_exists ( 'iconv' ) && ! in_array ( $this->encoding, array( 'ISO-8859-1', 'UTF-8', 'UTF-16LE', 'UTF-16BE', 'UTF-16' ) ) ) {
|
431 |
+
$errormessage = 'iconv() support is required for this module (' . $determined_format[ 'include' ] . ') for encodings other than ISO-8859-1, UTF-8, UTF-16LE, UTF16-BE, UTF-16. ';
|
432 |
+
if ( GETID3_OS_ISWINDOWS ) {
|
433 |
+
$errormessage .= 'PHP does not have iconv() support. Please enable php_iconv.dll in php.ini, and copy iconv.dll from c:/php/dlls to c:/windows/system32';
|
434 |
+
} else {
|
435 |
+
$errormessage .= 'PHP is not compiled with iconv() support. Please recompile with the --with-iconv switch';
|
436 |
+
}
|
437 |
+
return $this->error ( $errormessage );
|
438 |
+
}
|
439 |
+
|
440 |
+
// include module
|
441 |
+
include_once(GETID3_INCLUDEPATH . $determined_format[ 'include' ]);
|
442 |
+
|
443 |
+
// instantiate module class
|
444 |
+
$class_name = 'getid3_' . $determined_format[ 'module' ];
|
445 |
+
if ( ! class_exists ( $class_name ) ) {
|
446 |
+
return $this->error ( 'Format not supported, module "' . $determined_format[ 'include' ] . '" is corrupt.' );
|
447 |
+
}
|
448 |
+
//if (isset($determined_format['option'])) {
|
449 |
+
// //$class = new $class_name($this->fp, $this->info, $determined_format['option']);
|
450 |
+
//} else {
|
451 |
+
//$class = new $class_name($this->fp, $this->info);
|
452 |
+
$class = new $class_name ( $this );
|
453 |
+
//}
|
454 |
+
|
455 |
+
if ( ! empty ( $determined_format[ 'set_inline_attachments' ] ) ) {
|
456 |
+
$class->inline_attachments = $this->option_save_attachments;
|
457 |
+
}
|
458 |
+
$class->Analyze ();
|
459 |
+
|
460 |
+
unset ( $class );
|
461 |
+
|
462 |
+
// close file
|
463 |
+
fclose ( $this->fp );
|
464 |
+
|
465 |
+
// process all tags - copy to 'tags' and convert charsets
|
466 |
+
if ( $this->option_tags_process ) {
|
467 |
+
$this->HandleAllTags ();
|
468 |
+
}
|
469 |
+
|
470 |
+
// perform more calculations
|
471 |
+
if ( $this->option_extra_info ) {
|
472 |
+
$this->ChannelsBitratePlaytimeCalculations ();
|
473 |
+
$this->CalculateCompressionRatioVideo ();
|
474 |
+
$this->CalculateCompressionRatioAudio ();
|
475 |
+
$this->CalculateReplayGain ();
|
476 |
+
$this->ProcessAudioStreams ();
|
477 |
+
}
|
478 |
+
|
479 |
+
// get the MD5 sum of the audio/video portion of the file - without ID3/APE/Lyrics3/etc header/footer tags
|
480 |
+
if ( $this->option_md5_data ) {
|
481 |
+
// do not cald md5_data if md5_data_source is present - set by flac only - future MPC/SV8 too
|
482 |
+
if ( ! $this->option_md5_data_source || empty ( $this->info[ 'md5_data_source' ] ) ) {
|
483 |
+
$this->getHashdata ( 'md5' );
|
484 |
+
}
|
485 |
+
}
|
486 |
+
|
487 |
+
// get the SHA1 sum of the audio/video portion of the file - without ID3/APE/Lyrics3/etc header/footer tags
|
488 |
+
if ( $this->option_sha1_data ) {
|
489 |
+
$this->getHashdata ( 'sha1' );
|
490 |
+
}
|
491 |
+
|
492 |
+
// remove undesired keys
|
493 |
+
$this->CleanUp ();
|
494 |
+
} catch ( Exception $e ) {
|
495 |
+
$this->error ( 'Caught exception: ' . $e->getMessage () );
|
496 |
+
}
|
497 |
+
|
498 |
+
// return info array
|
499 |
+
return $this->info;
|
500 |
+
}
|
501 |
+
|
502 |
+
// private: error handling
|
503 |
+
function error ( $message ) {
|
504 |
+
$this->CleanUp ();
|
505 |
+
if ( ! isset ( $this->info[ 'error' ] ) ) {
|
506 |
+
$this->info[ 'error' ] = array( );
|
507 |
+
}
|
508 |
+
$this->info[ 'error' ][ ] = $message;
|
509 |
+
return $this->info;
|
510 |
+
}
|
511 |
+
|
512 |
+
// private: warning handling
|
513 |
+
function warning ( $message ) {
|
514 |
+
$this->info[ 'warning' ][ ] = $message;
|
515 |
+
return true;
|
516 |
+
}
|
517 |
+
|
518 |
+
// private: CleanUp
|
519 |
+
function CleanUp () {
|
520 |
+
|
521 |
+
// remove possible empty keys
|
522 |
+
$AVpossibleEmptyKeys = array( 'dataformat', 'bits_per_sample', 'encoder_options', 'streams', 'bitrate' );
|
523 |
+
foreach ( $AVpossibleEmptyKeys as $dummy => $key ) {
|
524 |
+
if ( empty ( $this->info[ 'audio' ][ $key ] ) && isset ( $this->info[ 'audio' ][ $key ] ) ) {
|
525 |
+
unset ( $this->info[ 'audio' ][ $key ] );
|
526 |
+
}
|
527 |
+
if ( empty ( $this->info[ 'video' ][ $key ] ) && isset ( $this->info[ 'video' ][ $key ] ) ) {
|
528 |
+
unset ( $this->info[ 'video' ][ $key ] );
|
529 |
+
}
|
530 |
+
}
|
531 |
+
|
532 |
+
// remove empty root keys
|
533 |
+
if ( ! empty ( $this->info ) ) {
|
534 |
+
foreach ( $this->info as $key => $value ) {
|
535 |
+
if ( empty ( $this->info[ $key ] ) && ($this->info[ $key ] !== 0) && ($this->info[ $key ] !== '0') ) {
|
536 |
+
unset ( $this->info[ $key ] );
|
537 |
+
}
|
538 |
+
}
|
539 |
+
}
|
540 |
+
|
541 |
+
// remove meaningless entries from unknown-format files
|
542 |
+
if ( empty ( $this->info[ 'fileformat' ] ) ) {
|
543 |
+
if ( isset ( $this->info[ 'avdataoffset' ] ) ) {
|
544 |
+
unset ( $this->info[ 'avdataoffset' ] );
|
545 |
+
}
|
546 |
+
if ( isset ( $this->info[ 'avdataend' ] ) ) {
|
547 |
+
unset ( $this->info[ 'avdataend' ] );
|
548 |
+
}
|
549 |
+
}
|
550 |
+
|
551 |
+
// remove possible duplicated identical entries
|
552 |
+
if ( ! empty ( $this->info[ 'error' ] ) ) {
|
553 |
+
$this->info[ 'error' ] = array_values ( array_unique ( $this->info[ 'error' ] ) );
|
554 |
+
}
|
555 |
+
if ( ! empty ( $this->info[ 'warning' ] ) ) {
|
556 |
+
$this->info[ 'warning' ] = array_values ( array_unique ( $this->info[ 'warning' ] ) );
|
557 |
+
}
|
558 |
+
|
559 |
+
// remove "global variable" type keys
|
560 |
+
unset ( $this->info[ 'php_memory_limit' ] );
|
561 |
+
|
562 |
+
return true;
|
563 |
+
}
|
564 |
+
|
565 |
+
// return array containing information about all supported formats
|
566 |
+
function GetFileFormatArray () {
|
567 |
+
static $format_info = array( );
|
568 |
+
if ( empty ( $format_info ) ) {
|
569 |
+
$format_info = array(
|
570 |
+
// Audio formats
|
571 |
+
// AC-3 - audio - Dolby AC-3 / Dolby Digital
|
572 |
+
'ac3' => array(
|
573 |
+
'pattern' => '^\x0B\x77',
|
574 |
+
'group' => 'audio',
|
575 |
+
'module' => 'ac3',
|
576 |
+
'mime_type' => 'audio/ac3',
|
577 |
+
),
|
578 |
+
// AAC - audio - Advanced Audio Coding (AAC) - ADIF format
|
579 |
+
'adif' => array(
|
580 |
+
'pattern' => '^ADIF',
|
581 |
+
'group' => 'audio',
|
582 |
+
'module' => 'aac',
|
583 |
+
'mime_type' => 'application/octet-stream',
|
584 |
+
'fail_ape' => 'WARNING',
|
585 |
+
),
|
586 |
+
// AA - audio - Audible Audiobook
|
587 |
+
'adts' => array(
|
588 |
+
'pattern' => '^.{4}\x57\x90\x75\x36',
|
589 |
+
'group' => 'audio',
|
590 |
+
'module' => 'aa',
|
591 |
+
'mime_type' => 'audio/audible ',
|
592 |
+
),
|
593 |
+
// AAC - audio - Advanced Audio Coding (AAC) - ADTS format (very similar to MP3)
|
594 |
+
'adts' => array(
|
595 |
+
'pattern' => '^\xFF[\xF0-\xF1\xF8-\xF9]',
|
596 |
+
'group' => 'audio',
|
597 |
+
'module' => 'aac',
|
598 |
+
'mime_type' => 'application/octet-stream',
|
599 |
+
'fail_ape' => 'WARNING',
|
600 |
+
),
|
601 |
+
// AU - audio - NeXT/Sun AUdio (AU)
|
602 |
+
'au' => array(
|
603 |
+
'pattern' => '^\.snd',
|
604 |
+
'group' => 'audio',
|
605 |
+
'module' => 'au',
|
606 |
+
'mime_type' => 'audio/basic',
|
607 |
+
),
|
608 |
+
// AVR - audio - Audio Visual Research
|
609 |
+
'avr' => array(
|
610 |
+
'pattern' => '^2BIT',
|
611 |
+
'group' => 'audio',
|
612 |
+
'module' => 'avr',
|
613 |
+
'mime_type' => 'application/octet-stream',
|
614 |
+
),
|
615 |
+
// BONK - audio - Bonk v0.9+
|
616 |
+
'bonk' => array(
|
617 |
+
'pattern' => '^\x00(BONK|INFO|META| ID3)',
|
618 |
+
'group' => 'audio',
|
619 |
+
'module' => 'bonk',
|
620 |
+
'mime_type' => 'audio/xmms-bonk',
|
621 |
+
),
|
622 |
+
// DSS - audio - Digital Speech Standard
|
623 |
+
'dss' => array(
|
624 |
+
'pattern' => '^[\x02-\x03]dss',
|
625 |
+
'group' => 'audio',
|
626 |
+
'module' => 'dss',
|
627 |
+
'mime_type' => 'application/octet-stream',
|
628 |
+
),
|
629 |
+
// DTS - audio - Dolby Theatre System
|
630 |
+
'dts' => array(
|
631 |
+
'pattern' => '^\x7F\xFE\x80\x01',
|
632 |
+
'group' => 'audio',
|
633 |
+
'module' => 'dts',
|
634 |
+
'mime_type' => 'audio/dts',
|
635 |
+
),
|
636 |
+
// FLAC - audio - Free Lossless Audio Codec
|
637 |
+
'flac' => array(
|
638 |
+
'pattern' => '^fLaC',
|
639 |
+
'group' => 'audio',
|
640 |
+
'module' => 'flac',
|
641 |
+
'mime_type' => 'audio/x-flac',
|
642 |
+
'set_inline_attachments' => true,
|
643 |
+
),
|
644 |
+
// LA - audio - Lossless Audio (LA)
|
645 |
+
'la' => array(
|
646 |
+
'pattern' => '^LA0[2-4]',
|
647 |
+
'group' => 'audio',
|
648 |
+
'module' => 'la',
|
649 |
+
'mime_type' => 'application/octet-stream',
|
650 |
+
),
|
651 |
+
// LPAC - audio - Lossless Predictive Audio Compression (LPAC)
|
652 |
+
'lpac' => array(
|
653 |
+
'pattern' => '^LPAC',
|
654 |
+
'group' => 'audio',
|
655 |
+
'module' => 'lpac',
|
656 |
+
'mime_type' => 'application/octet-stream',
|
657 |
+
),
|
658 |
+
// MIDI - audio - MIDI (Musical Instrument Digital Interface)
|
659 |
+
'midi' => array(
|
660 |
+
'pattern' => '^MThd',
|
661 |
+
'group' => 'audio',
|
662 |
+
'module' => 'midi',
|
663 |
+
'mime_type' => 'audio/midi',
|
664 |
+
),
|
665 |
+
// MAC - audio - Monkey's Audio Compressor
|
666 |
+
'mac' => array(
|
667 |
+
'pattern' => '^MAC ',
|
668 |
+
'group' => 'audio',
|
669 |
+
'module' => 'monkey',
|
670 |
+
'mime_type' => 'application/octet-stream',
|
671 |
+
),
|
672 |
// has been known to produce false matches in random files (e.g. JPEGs), leave out until more precise matching available
|
673 |
// // MOD - audio - MODule (assorted sub-formats)
|
674 |
// 'mod' => array(
|
678 |
// 'option' => 'mod',
|
679 |
// 'mime_type' => 'audio/mod',
|
680 |
// ),
|
681 |
+
// MOD - audio - MODule (Impulse Tracker)
|
682 |
+
'it' => array(
|
683 |
+
'pattern' => '^IMPM',
|
684 |
+
'group' => 'audio',
|
685 |
+
'module' => 'mod',
|
686 |
+
//'option' => 'it',
|
687 |
+
'mime_type' => 'audio/it',
|
688 |
+
),
|
689 |
+
// MOD - audio - MODule (eXtended Module, various sub-formats)
|
690 |
+
'xm' => array(
|
691 |
+
'pattern' => '^Extended Module',
|
692 |
+
'group' => 'audio',
|
693 |
+
'module' => 'mod',
|
694 |
+
//'option' => 'xm',
|
695 |
+
'mime_type' => 'audio/xm',
|
696 |
+
),
|
697 |
+
// MOD - audio - MODule (ScreamTracker)
|
698 |
+
's3m' => array(
|
699 |
+
'pattern' => '^.{44}SCRM',
|
700 |
+
'group' => 'audio',
|
701 |
+
'module' => 'mod',
|
702 |
+
//'option' => 's3m',
|
703 |
+
'mime_type' => 'audio/s3m',
|
704 |
+
),
|
705 |
+
// MPC - audio - Musepack / MPEGplus
|
706 |
+
'mpc' => array(
|
707 |
+
'pattern' => '^(MPCK|MP\+|[\x00\x01\x10\x11\x40\x41\x50\x51\x80\x81\x90\x91\xC0\xC1\xD0\xD1][\x20-37][\x00\x20\x40\x60\x80\xA0\xC0\xE0])',
|
708 |
+
'group' => 'audio',
|
709 |
+
'module' => 'mpc',
|
710 |
+
'mime_type' => 'audio/x-musepack',
|
711 |
+
),
|
712 |
+
// MP3 - audio - MPEG-audio Layer 3 (very similar to AAC-ADTS)
|
713 |
+
'mp3' => array(
|
714 |
+
'pattern' => '^\xFF[\xE2-\xE7\xF2-\xF7\xFA-\xFF][\x00-\x0B\x10-\x1B\x20-\x2B\x30-\x3B\x40-\x4B\x50-\x5B\x60-\x6B\x70-\x7B\x80-\x8B\x90-\x9B\xA0-\xAB\xB0-\xBB\xC0-\xCB\xD0-\xDB\xE0-\xEB\xF0-\xFB]',
|
715 |
+
'group' => 'audio',
|
716 |
+
'module' => 'mp3',
|
717 |
+
'mime_type' => 'audio/mpeg',
|
718 |
+
),
|
719 |
+
// OFR - audio - OptimFROG
|
720 |
+
'ofr' => array(
|
721 |
+
'pattern' => '^(\*RIFF|OFR)',
|
722 |
+
'group' => 'audio',
|
723 |
+
'module' => 'optimfrog',
|
724 |
+
'mime_type' => 'application/octet-stream',
|
725 |
+
),
|
726 |
+
// RKAU - audio - RKive AUdio compressor
|
727 |
+
'rkau' => array(
|
728 |
+
'pattern' => '^RKA',
|
729 |
+
'group' => 'audio',
|
730 |
+
'module' => 'rkau',
|
731 |
+
'mime_type' => 'application/octet-stream',
|
732 |
+
),
|
733 |
+
// SHN - audio - Shorten
|
734 |
+
'shn' => array(
|
735 |
+
'pattern' => '^ajkg',
|
736 |
+
'group' => 'audio',
|
737 |
+
'module' => 'shorten',
|
738 |
+
'mime_type' => 'audio/xmms-shn',
|
739 |
+
'fail_id3' => 'ERROR',
|
740 |
+
'fail_ape' => 'ERROR',
|
741 |
+
),
|
742 |
+
// TTA - audio - TTA Lossless Audio Compressor (http://tta.corecodec.org)
|
743 |
+
'tta' => array(
|
744 |
+
'pattern' => '^TTA', // could also be '^TTA(\x01|\x02|\x03|2|1)'
|
745 |
+
'group' => 'audio',
|
746 |
+
'module' => 'tta',
|
747 |
+
'mime_type' => 'application/octet-stream',
|
748 |
+
),
|
749 |
+
// VOC - audio - Creative Voice (VOC)
|
750 |
+
'voc' => array(
|
751 |
+
'pattern' => '^Creative Voice File',
|
752 |
+
'group' => 'audio',
|
753 |
+
'module' => 'voc',
|
754 |
+
'mime_type' => 'audio/voc',
|
755 |
+
),
|
756 |
+
// VQF - audio - transform-domain weighted interleave Vector Quantization Format (VQF)
|
757 |
+
'vqf' => array(
|
758 |
+
'pattern' => '^TWIN',
|
759 |
+
'group' => 'audio',
|
760 |
+
'module' => 'vqf',
|
761 |
+
'mime_type' => 'application/octet-stream',
|
762 |
+
),
|
763 |
+
// WV - audio - WavPack (v4.0+)
|
764 |
+
'wv' => array(
|
765 |
+
'pattern' => '^wvpk',
|
766 |
+
'group' => 'audio',
|
767 |
+
'module' => 'wavpack',
|
768 |
+
'mime_type' => 'application/octet-stream',
|
769 |
+
),
|
770 |
+
// Audio-Video formats
|
771 |
+
// ASF - audio/video - Advanced Streaming Format, Windows Media Video, Windows Media Audio
|
772 |
+
'asf' => array(
|
773 |
+
'pattern' => '^\x30\x26\xB2\x75\x8E\x66\xCF\x11\xA6\xD9\x00\xAA\x00\x62\xCE\x6C',
|
774 |
+
'group' => 'audio-video',
|
775 |
+
'module' => 'asf',
|
776 |
+
'mime_type' => 'video/x-ms-asf',
|
777 |
+
'iconv_req' => false,
|
778 |
+
),
|
779 |
+
// BINK - audio/video - Bink / Smacker
|
780 |
+
'bink' => array(
|
781 |
+
'pattern' => '^(BIK|SMK)',
|
782 |
+
'group' => 'audio-video',
|
783 |
+
'module' => 'bink',
|
784 |
+
'mime_type' => 'application/octet-stream',
|
785 |
+
),
|
786 |
+
// FLV - audio/video - FLash Video
|
787 |
+
'flv' => array(
|
788 |
+
'pattern' => '^FLV\x01',
|
789 |
+
'group' => 'audio-video',
|
790 |
+
'module' => 'flv',
|
791 |
+
'mime_type' => 'video/x-flv',
|
792 |
+
),
|
793 |
+
// MKAV - audio/video - Mastroka
|
794 |
+
'matroska' => array(
|
795 |
+
'pattern' => '^\x1A\x45\xDF\xA3',
|
796 |
+
'group' => 'audio-video',
|
797 |
+
'module' => 'matroska',
|
798 |
+
'mime_type' => 'video/x-matroska', // may also be audio/x-matroska
|
799 |
+
'set_inline_attachments' => true,
|
800 |
+
),
|
801 |
+
// MPEG - audio/video - MPEG (Moving Pictures Experts Group)
|
802 |
+
'mpeg' => array(
|
803 |
+
'pattern' => '^\x00\x00\x01(\xBA|\xB3)',
|
804 |
+
'group' => 'audio-video',
|
805 |
+
'module' => 'mpeg',
|
806 |
+
'mime_type' => 'video/mpeg',
|
807 |
+
),
|
808 |
+
// NSV - audio/video - Nullsoft Streaming Video (NSV)
|
809 |
+
'nsv' => array(
|
810 |
+
'pattern' => '^NSV[sf]',
|
811 |
+
'group' => 'audio-video',
|
812 |
+
'module' => 'nsv',
|
813 |
+
'mime_type' => 'application/octet-stream',
|
814 |
+
),
|
815 |
+
// Ogg - audio/video - Ogg (Ogg-Vorbis, Ogg-FLAC, Speex, Ogg-Theora(*), Ogg-Tarkin(*))
|
816 |
+
'ogg' => array(
|
817 |
+
'pattern' => '^OggS',
|
818 |
+
'group' => 'audio',
|
819 |
+
'module' => 'ogg',
|
820 |
+
'mime_type' => 'application/ogg',
|
821 |
+
'fail_id3' => 'WARNING',
|
822 |
+
'fail_ape' => 'WARNING',
|
823 |
+
'set_inline_attachments' => true,
|
824 |
+
),
|
825 |
+
// QT - audio/video - Quicktime
|
826 |
+
'quicktime' => array(
|
827 |
+
'pattern' => '^.{4}(cmov|free|ftyp|mdat|moov|pnot|skip|wide)',
|
828 |
+
'group' => 'audio-video',
|
829 |
+
'module' => 'quicktime',
|
830 |
+
'mime_type' => 'video/quicktime',
|
831 |
+
),
|
832 |
+
// RIFF - audio/video - Resource Interchange File Format (RIFF) / WAV / AVI / CD-audio / SDSS = renamed variant used by SmartSound QuickTracks (www.smartsound.com) / FORM = Audio Interchange File Format (AIFF)
|
833 |
+
'riff' => array(
|
834 |
+
'pattern' => '^(RIFF|SDSS|FORM)',
|
835 |
+
'group' => 'audio-video',
|
836 |
+
'module' => 'riff',
|
837 |
+
'mime_type' => 'audio/x-wave',
|
838 |
+
'fail_ape' => 'WARNING',
|
839 |
+
),
|
840 |
+
// Real - audio/video - RealAudio, RealVideo
|
841 |
+
'real' => array(
|
842 |
+
'pattern' => '^(\\.RMF|\\.ra)',
|
843 |
+
'group' => 'audio-video',
|
844 |
+
'module' => 'real',
|
845 |
+
'mime_type' => 'audio/x-realaudio',
|
846 |
+
),
|
847 |
+
// SWF - audio/video - ShockWave Flash
|
848 |
+
'swf' => array(
|
849 |
+
'pattern' => '^(F|C)WS',
|
850 |
+
'group' => 'audio-video',
|
851 |
+
'module' => 'swf',
|
852 |
+
'mime_type' => 'application/x-shockwave-flash',
|
853 |
+
),
|
854 |
+
// Still-Image formats
|
855 |
+
// BMP - still image - Bitmap (Windows, OS/2; uncompressed, RLE8, RLE4)
|
856 |
+
'bmp' => array(
|
857 |
+
'pattern' => '^BM',
|
858 |
+
'group' => 'graphic',
|
859 |
+
'module' => 'bmp',
|
860 |
+
'mime_type' => 'image/bmp',
|
861 |
+
'fail_id3' => 'ERROR',
|
862 |
+
'fail_ape' => 'ERROR',
|
863 |
+
),
|
864 |
+
// GIF - still image - Graphics Interchange Format
|
865 |
+
'gif' => array(
|
866 |
+
'pattern' => '^GIF',
|
867 |
+
'group' => 'graphic',
|
868 |
+
'module' => 'gif',
|
869 |
+
'mime_type' => 'image/gif',
|
870 |
+
'fail_id3' => 'ERROR',
|
871 |
+
'fail_ape' => 'ERROR',
|
872 |
+
),
|
873 |
+
// JPEG - still image - Joint Photographic Experts Group (JPEG)
|
874 |
+
'jpg' => array(
|
875 |
+
'pattern' => '^\xFF\xD8\xFF',
|
876 |
+
'group' => 'graphic',
|
877 |
+
'module' => 'jpg',
|
878 |
+
'mime_type' => 'image/jpeg',
|
879 |
+
'fail_id3' => 'ERROR',
|
880 |
+
'fail_ape' => 'ERROR',
|
881 |
+
),
|
882 |
+
// PCD - still image - Kodak Photo CD
|
883 |
+
'pcd' => array(
|
884 |
+
'pattern' => '^.{2048}PCD_IPI\x00',
|
885 |
+
'group' => 'graphic',
|
886 |
+
'module' => 'pcd',
|
887 |
+
'mime_type' => 'image/x-photo-cd',
|
888 |
+
'fail_id3' => 'ERROR',
|
889 |
+
'fail_ape' => 'ERROR',
|
890 |
+
),
|
891 |
+
// PNG - still image - Portable Network Graphics (PNG)
|
892 |
+
'png' => array(
|
893 |
+
'pattern' => '^\x89\x50\x4E\x47\x0D\x0A\x1A\x0A',
|
894 |
+
'group' => 'graphic',
|
895 |
+
'module' => 'png',
|
896 |
+
'mime_type' => 'image/png',
|
897 |
+
'fail_id3' => 'ERROR',
|
898 |
+
'fail_ape' => 'ERROR',
|
899 |
+
),
|
900 |
+
// SVG - still image - Scalable Vector Graphics (SVG)
|
901 |
+
'svg' => array(
|
902 |
+
'pattern' => '(<!DOCTYPE svg PUBLIC |xmlns="http:\/\/www\.w3\.org\/2000\/svg")',
|
903 |
+
'group' => 'graphic',
|
904 |
+
'module' => 'svg',
|
905 |
+
'mime_type' => 'image/svg+xml',
|
906 |
+
'fail_id3' => 'ERROR',
|
907 |
+
'fail_ape' => 'ERROR',
|
908 |
+
),
|
909 |
+
// TIFF - still image - Tagged Information File Format (TIFF)
|
910 |
+
'tiff' => array(
|
911 |
+
'pattern' => '^(II\x2A\x00|MM\x00\x2A)',
|
912 |
+
'group' => 'graphic',
|
913 |
+
'module' => 'tiff',
|
914 |
+
'mime_type' => 'image/tiff',
|
915 |
+
'fail_id3' => 'ERROR',
|
916 |
+
'fail_ape' => 'ERROR',
|
917 |
+
),
|
918 |
+
// EFAX - still image - eFax (TIFF derivative)
|
919 |
+
'bmp' => array(
|
920 |
+
'pattern' => '^\xDC\xFE',
|
921 |
+
'group' => 'graphic',
|
922 |
+
'module' => 'efax',
|
923 |
+
'mime_type' => 'image/efax',
|
924 |
+
'fail_id3' => 'ERROR',
|
925 |
+
'fail_ape' => 'ERROR',
|
926 |
+
),
|
927 |
+
// Data formats
|
928 |
+
// ISO - data - International Standards Organization (ISO) CD-ROM Image
|
929 |
+
'iso' => array(
|
930 |
+
'pattern' => '^.{32769}CD001',
|
931 |
+
'group' => 'misc',
|
932 |
+
'module' => 'iso',
|
933 |
+
'mime_type' => 'application/octet-stream',
|
934 |
+
'fail_id3' => 'ERROR',
|
935 |
+
'fail_ape' => 'ERROR',
|
936 |
+
'iconv_req' => false,
|
937 |
+
),
|
938 |
+
// RAR - data - RAR compressed data
|
939 |
+
'rar' => array(
|
940 |
+
'pattern' => '^Rar\!',
|
941 |
+
'group' => 'archive',
|
942 |
+
'module' => 'rar',
|
943 |
+
'mime_type' => 'application/octet-stream',
|
944 |
+
'fail_id3' => 'ERROR',
|
945 |
+
'fail_ape' => 'ERROR',
|
946 |
+
),
|
947 |
+
// SZIP - audio/data - SZIP compressed data
|
948 |
+
'szip' => array(
|
949 |
+
'pattern' => '^SZ\x0A\x04',
|
950 |
+
'group' => 'archive',
|
951 |
+
'module' => 'szip',
|
952 |
+
'mime_type' => 'application/octet-stream',
|
953 |
+
'fail_id3' => 'ERROR',
|
954 |
+
'fail_ape' => 'ERROR',
|
955 |
+
),
|
956 |
+
// TAR - data - TAR compressed data
|
957 |
+
'tar' => array(
|
958 |
+
'pattern' => '^.{100}[0-9\x20]{7}\x00[0-9\x20]{7}\x00[0-9\x20]{7}\x00[0-9\x20\x00]{12}[0-9\x20\x00]{12}',
|
959 |
+
'group' => 'archive',
|
960 |
+
'module' => 'tar',
|
961 |
+
'mime_type' => 'application/x-tar',
|
962 |
+
'fail_id3' => 'ERROR',
|
963 |
+
'fail_ape' => 'ERROR',
|
964 |
+
),
|
965 |
+
// GZIP - data - GZIP compressed data
|
966 |
+
'gz' => array(
|
967 |
+
'pattern' => '^\x1F\x8B\x08',
|
968 |
+
'group' => 'archive',
|
969 |
+
'module' => 'gzip',
|
970 |
+
'mime_type' => 'application/x-gzip',
|
971 |
+
'fail_id3' => 'ERROR',
|
972 |
+
'fail_ape' => 'ERROR',
|
973 |
+
),
|
974 |
+
// ZIP - data - ZIP compressed data
|
975 |
+
'zip' => array(
|
976 |
+
'pattern' => '^PK\x03\x04',
|
977 |
+
'group' => 'archive',
|
978 |
+
'module' => 'zip',
|
979 |
+
'mime_type' => 'application/zip',
|
980 |
+
'fail_id3' => 'ERROR',
|
981 |
+
'fail_ape' => 'ERROR',
|
982 |
+
),
|
983 |
+
// Misc other formats
|
984 |
+
// PAR2 - data - Parity Volume Set Specification 2.0
|
985 |
+
'par2' => array(
|
986 |
+
'pattern' => '^PAR2\x00PKT',
|
987 |
+
'group' => 'misc',
|
988 |
+
'module' => 'par2',
|
989 |
+
'mime_type' => 'application/octet-stream',
|
990 |
+
'fail_id3' => 'ERROR',
|
991 |
+
'fail_ape' => 'ERROR',
|
992 |
+
),
|
993 |
+
// PDF - data - Portable Document Format
|
994 |
+
'pdf' => array(
|
995 |
+
'pattern' => '^\x25PDF',
|
996 |
+
'group' => 'misc',
|
997 |
+
'module' => 'pdf',
|
998 |
+
'mime_type' => 'application/pdf',
|
999 |
+
'fail_id3' => 'ERROR',
|
1000 |
+
'fail_ape' => 'ERROR',
|
1001 |
+
),
|
1002 |
+
// MSOFFICE - data - ZIP compressed data
|
1003 |
+
'msoffice' => array(
|
1004 |
+
'pattern' => '^\xD0\xCF\x11\xE0\xA1\xB1\x1A\xE1', // D0CF11E == DOCFILE == Microsoft Office Document
|
1005 |
+
'group' => 'misc',
|
1006 |
+
'module' => 'msoffice',
|
1007 |
+
'mime_type' => 'application/octet-stream',
|
1008 |
+
'fail_id3' => 'ERROR',
|
1009 |
+
'fail_ape' => 'ERROR',
|
1010 |
+
),
|
1011 |
+
// CUE - data - CUEsheet (index to single-file disc images)
|
1012 |
+
'cue' => array(
|
1013 |
+
'pattern' => '', // empty pattern means cannot be automatically detected, will fall through all other formats and match based on filename and very basic file contents
|
1014 |
+
'group' => 'misc',
|
1015 |
+
'module' => 'cue',
|
1016 |
+
'mime_type' => 'application/octet-stream',
|
1017 |
+
),
|
1018 |
+
);
|
1019 |
+
}
|
1020 |
+
|
1021 |
+
return $format_info;
|
1022 |
+
}
|
1023 |
+
|
1024 |
+
function GetFileFormat ( &$filedata, $filename = '' ) {
|
1025 |
+
// this function will determine the format of a file based on usually
|
1026 |
+
// the first 2-4 bytes of the file (8 bytes for PNG, 16 bytes for JPG,
|
1027 |
+
// and in the case of ISO CD image, 6 bytes offset 32kb from the start
|
1028 |
+
// of the file).
|
1029 |
+
// Identify file format - loop through $format_info and detect with reg expr
|
1030 |
+
foreach ( $this->GetFileFormatArray () as $format_name => $info ) {
|
1031 |
+
// The /s switch on preg_match() forces preg_match() NOT to treat
|
1032 |
+
// newline (0x0A) characters as special chars but do a binary match
|
1033 |
+
if ( ! empty ( $info[ 'pattern' ] ) && preg_match ( '#' . $info[ 'pattern' ] . '#s', $filedata ) ) {
|
1034 |
+
$info[ 'include' ] = 'module.' . $info[ 'group' ] . '.' . $info[ 'module' ] . '.php';
|
1035 |
+
return $info;
|
1036 |
+
}
|
1037 |
+
}
|
1038 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1039 |
|
1040 |
+
if ( preg_match ( '#\.mp[123a]$#i', $filename ) ) {
|
1041 |
+
// Too many mp3 encoders on the market put gabage in front of mpeg files
|
1042 |
+
// use assume format on these if format detection failed
|
1043 |
+
$GetFileFormatArray = $this->GetFileFormatArray ();
|
1044 |
+
$info = $GetFileFormatArray[ 'mp3' ];
|
1045 |
+
$info[ 'include' ] = 'module.' . $info[ 'group' ] . '.' . $info[ 'module' ] . '.php';
|
1046 |
+
return $info;
|
1047 |
+
} elseif ( preg_match ( '/\.cue$/i', $filename ) && preg_match ( '#FILE "[^"]+" (BINARY|MOTOROLA|AIFF|WAVE|MP3)#', $filedata ) ) {
|
1048 |
+
// there's not really a useful consistent "magic" at the beginning of .cue files to identify them
|
1049 |
+
// so until I think of something better, just go by filename if all other format checks fail
|
1050 |
+
// and verify there's at least one instance of "TRACK xx AUDIO" in the file
|
1051 |
+
$GetFileFormatArray = $this->GetFileFormatArray ();
|
1052 |
+
$info = $GetFileFormatArray[ 'cue' ];
|
1053 |
+
$info[ 'include' ] = 'module.' . $info[ 'group' ] . '.' . $info[ 'module' ] . '.php';
|
1054 |
+
return $info;
|
1055 |
+
}
|
1056 |
|
1057 |
+
return false;
|
1058 |
+
}
|
1059 |
|
1060 |
+
// converts array to $encoding charset from $this->encoding
|
1061 |
+
function CharConvert ( &$array, $encoding ) {
|
|
|
1062 |
|
1063 |
+
// identical encoding - end here
|
1064 |
+
if ( $encoding == $this->encoding ) {
|
1065 |
+
return;
|
1066 |
+
}
|
1067 |
|
1068 |
+
// loop thru array
|
1069 |
+
foreach ( $array as $key => $value ) {
|
1070 |
|
1071 |
+
// go recursive
|
1072 |
+
if ( is_array ( $value ) ) {
|
1073 |
+
$this->CharConvert ( $array[ $key ], $encoding );
|
1074 |
+
}
|
1075 |
|
1076 |
+
// convert string
|
1077 |
+
elseif ( is_string ( $value ) ) {
|
1078 |
+
$array[ $key ] = trim ( getid3_lib::iconv_fallback ( $encoding, $this->encoding, $value ) );
|
1079 |
+
}
|
1080 |
+
}
|
1081 |
+
}
|
1082 |
+
|
1083 |
+
function HandleAllTags () {
|
1084 |
+
|
1085 |
+
// key name => array (tag name, character encoding)
|
1086 |
+
static $tags;
|
1087 |
+
if ( empty ( $tags ) ) {
|
1088 |
+
$tags = array(
|
1089 |
+
'asf' => array( 'asf', 'UTF-16LE' ),
|
1090 |
+
'midi' => array( 'midi', 'ISO-8859-1' ),
|
1091 |
+
'nsv' => array( 'nsv', 'ISO-8859-1' ),
|
1092 |
+
'ogg' => array( 'vorbiscomment', 'UTF-8' ),
|
1093 |
+
'png' => array( 'png', 'UTF-8' ),
|
1094 |
+
'tiff' => array( 'tiff', 'ISO-8859-1' ),
|
1095 |
+
'quicktime' => array( 'quicktime', 'UTF-8' ),
|
1096 |
+
'real' => array( 'real', 'ISO-8859-1' ),
|
1097 |
+
'vqf' => array( 'vqf', 'ISO-8859-1' ),
|
1098 |
+
'zip' => array( 'zip', 'ISO-8859-1' ),
|
1099 |
+
'riff' => array( 'riff', 'ISO-8859-1' ),
|
1100 |
+
'lyrics3' => array( 'lyrics3', 'ISO-8859-1' ),
|
1101 |
+
'id3v1' => array( 'id3v1', $this->encoding_id3v1 ),
|
1102 |
+
'id3v2' => array( 'id3v2', 'UTF-8' ), // not according to the specs (every frame can have a different encoding), but getID3() force-converts all encodings to UTF-8
|
1103 |
+
'ape' => array( 'ape', 'UTF-8' ),
|
1104 |
+
'cue' => array( 'cue', 'ISO-8859-1' ),
|
1105 |
+
'matroska' => array( 'matroska', 'UTF-8' ),
|
1106 |
+
);
|
1107 |
+
}
|
1108 |
|
1109 |
+
// loop through comments array
|
1110 |
+
foreach ( $tags as $comment_name => $tagname_encoding_array ) {
|
1111 |
+
list($tag_name, $encoding) = $tagname_encoding_array;
|
1112 |
+
|
1113 |
+
// fill in default encoding type if not already present
|
1114 |
+
if ( isset ( $this->info[ $comment_name ] ) && ! isset ( $this->info[ $comment_name ][ 'encoding' ] ) ) {
|
1115 |
+
$this->info[ $comment_name ][ 'encoding' ] = $encoding;
|
1116 |
+
}
|
1117 |
+
|
1118 |
+
// copy comments if key name set
|
1119 |
+
if ( ! empty ( $this->info[ $comment_name ][ 'comments' ] ) ) {
|
1120 |
+
|
1121 |
+
foreach ( $this->info[ $comment_name ][ 'comments' ] as $tag_key => $valuearray ) {
|
1122 |
+
foreach ( $valuearray as $key => $value ) {
|
1123 |
+
if ( is_string ( $value ) ) {
|
1124 |
+
$value = trim ( $value, " \r\n\t" ); // do not trim nulls from $value!! Unicode characters will get mangled if trailing nulls are removed!
|
1125 |
+
}
|
1126 |
+
if ( $value ) {
|
1127 |
+
$this->info[ 'tags' ][ trim ( $tag_name ) ][ trim ( $tag_key ) ][ ] = $value;
|
1128 |
+
}
|
1129 |
+
}
|
1130 |
+
}
|
1131 |
+
|
1132 |
+
if ( ! isset ( $this->info[ 'tags' ][ $tag_name ] ) ) {
|
1133 |
+
// comments are set but contain nothing but empty strings, so skip
|
1134 |
+
continue;
|
1135 |
+
}
|
1136 |
+
|
1137 |
+
if ( $this->option_tags_html ) {
|
1138 |
+
foreach ( $this->info[ 'tags' ][ $tag_name ] as $tag_key => $valuearray ) {
|
1139 |
+
foreach ( $valuearray as $key => $value ) {
|
1140 |
+
if ( is_string ( $value ) ) {
|
1141 |
+
//$this->info['tags_html'][$tag_name][$tag_key][$key] = getid3_lib::MultiByteCharString2HTML($value, $encoding);
|
1142 |
+
$this->info[ 'tags_html' ][ $tag_name ][ $tag_key ][ $key ] = str_replace ( '�', '', trim ( getid3_lib::MultiByteCharString2HTML ( $value, $encoding ) ) );
|
1143 |
+
} else {
|
1144 |
+
$this->info[ 'tags_html' ][ $tag_name ][ $tag_key ][ $key ] = $value;
|
1145 |
+
}
|
1146 |
+
}
|
1147 |
+
}
|
1148 |
+
}
|
1149 |
+
|
1150 |
+
$this->CharConvert ( $this->info[ 'tags' ][ $tag_name ], $encoding ); // only copy gets converted!
|
1151 |
+
}
|
1152 |
+
}
|
1153 |
|
1154 |
+
// pictures can take up a lot of space, and we don't need multiple copies of them
|
1155 |
+
// let there be a single copy in [comments][picture], and not elsewhere
|
1156 |
+
if ( ! empty ( $this->info[ 'tags' ] ) ) {
|
1157 |
+
$unset_keys = array( 'tags', 'tags_html' );
|
1158 |
+
foreach ( $this->info[ 'tags' ] as $tagtype => $tagarray ) {
|
1159 |
+
foreach ( $tagarray as $tagname => $tagdata ) {
|
1160 |
+
if ( $tagname == 'picture' ) {
|
1161 |
+
foreach ( $tagdata as $key => $tagarray ) {
|
1162 |
+
$this->info[ 'comments' ][ 'picture' ][ ] = $tagarray;
|
1163 |
+
if ( isset ( $tagarray[ 'data' ] ) && isset ( $tagarray[ 'image_mime' ] ) ) {
|
1164 |
+
if ( isset ( $this->info[ 'tags' ][ $tagtype ][ $tagname ][ $key ] ) ) {
|
1165 |
+
unset ( $this->info[ 'tags' ][ $tagtype ][ $tagname ][ $key ] );
|
1166 |
+
}
|
1167 |
+
if ( isset ( $this->info[ 'tags_html' ][ $tagtype ][ $tagname ][ $key ] ) ) {
|
1168 |
+
unset ( $this->info[ 'tags_html' ][ $tagtype ][ $tagname ][ $key ] );
|
1169 |
+
}
|
1170 |
+
}
|
1171 |
+
}
|
1172 |
+
}
|
1173 |
+
}
|
1174 |
+
foreach ( $unset_keys as $unset_key ) {
|
1175 |
+
// remove possible empty keys from (e.g. [tags][id3v2][picture])
|
1176 |
+
if ( empty ( $this->info[ $unset_key ][ $tagtype ][ 'picture' ] ) ) {
|
1177 |
+
unset ( $this->info[ $unset_key ][ $tagtype ][ 'picture' ] );
|
1178 |
+
}
|
1179 |
+
if ( empty ( $this->info[ $unset_key ][ $tagtype ] ) ) {
|
1180 |
+
unset ( $this->info[ $unset_key ][ $tagtype ] );
|
1181 |
+
}
|
1182 |
+
if ( empty ( $this->info[ $unset_key ] ) ) {
|
1183 |
+
unset ( $this->info[ $unset_key ] );
|
1184 |
+
}
|
1185 |
+
}
|
1186 |
+
// remove duplicate copy of picture data from (e.g. [id3v2][comments][picture])
|
1187 |
+
if ( isset ( $this->info[ $tagtype ][ 'comments' ][ 'picture' ] ) ) {
|
1188 |
+
unset ( $this->info[ $tagtype ][ 'comments' ][ 'picture' ] );
|
1189 |
+
}
|
1190 |
+
if ( empty ( $this->info[ $tagtype ][ 'comments' ] ) ) {
|
1191 |
+
unset ( $this->info[ $tagtype ][ 'comments' ] );
|
1192 |
+
}
|
1193 |
+
if ( empty ( $this->info[ $tagtype ] ) ) {
|
1194 |
+
unset ( $this->info[ $tagtype ] );
|
1195 |
+
}
|
1196 |
+
}
|
1197 |
+
}
|
1198 |
+
return true;
|
1199 |
+
}
|
1200 |
|
1201 |
+
function getHashdata ( $algorithm ) {
|
1202 |
+
switch ( $algorithm ) {
|
1203 |
+
case 'md5':
|
1204 |
+
case 'sha1':
|
1205 |
+
break;
|
1206 |
|
1207 |
+
default:
|
1208 |
+
return $this->error ( 'bad algorithm "' . $algorithm . '" in getHashdata()' );
|
1209 |
+
break;
|
1210 |
+
}
|
1211 |
|
1212 |
+
if ( ! empty ( $this->info[ 'fileformat' ] ) && ! empty ( $this->info[ 'dataformat' ] ) && ($this->info[ 'fileformat' ] == 'ogg') && ($this->info[ 'audio' ][ 'dataformat' ] == 'vorbis') ) {
|
1213 |
+
|
1214 |
+
// We cannot get an identical md5_data value for Ogg files where the comments
|
1215 |
+
// span more than 1 Ogg page (compared to the same audio data with smaller
|
1216 |
+
// comments) using the normal getID3() method of MD5'ing the data between the
|
1217 |
+
// end of the comments and the end of the file (minus any trailing tags),
|
1218 |
+
// because the page sequence numbers of the pages that the audio data is on
|
1219 |
+
// do not match. Under normal circumstances, where comments are smaller than
|
1220 |
+
// the nominal 4-8kB page size, then this is not a problem, but if there are
|
1221 |
+
// very large comments, the only way around it is to strip off the comment
|
1222 |
+
// tags with vorbiscomment and MD5 that file.
|
1223 |
+
// This procedure must be applied to ALL Ogg files, not just the ones with
|
1224 |
+
// comments larger than 1 page, because the below method simply MD5's the
|
1225 |
+
// whole file with the comments stripped, not just the portion after the
|
1226 |
+
// comments block (which is the standard getID3() method.
|
1227 |
+
// The above-mentioned problem of comments spanning multiple pages and changing
|
1228 |
+
// page sequence numbers likely happens for OggSpeex and OggFLAC as well, but
|
1229 |
+
// currently vorbiscomment only works on OggVorbis files.
|
1230 |
+
|
1231 |
+
if ( preg_match ( '#(1|ON)#i', ini_get ( 'safe_mode' ) ) ) {
|
1232 |
+
|
1233 |
+
$this->warning ( 'Failed making system call to vorbiscomment.exe - ' . $algorithm . '_data is incorrect - error returned: PHP running in Safe Mode (backtick operator not available)' );
|
1234 |
+
$this->info[ $algorithm . '_data' ] = false;
|
1235 |
+
} else {
|
1236 |
+
|
1237 |
+
// Prevent user from aborting script
|
1238 |
+
$old_abort = ignore_user_abort ( true );
|
1239 |
+
|
1240 |
+
// Create empty file
|
1241 |
+
$empty = tempnam ( GETID3_TEMP_DIR, 'getID3' );
|
1242 |
+
touch ( $empty );
|
1243 |
+
|
1244 |
+
// Use vorbiscomment to make temp file without comments
|
1245 |
+
$temp = tempnam ( GETID3_TEMP_DIR, 'getID3' );
|
1246 |
+
$file = $this->info[ 'filenamepath' ];
|
1247 |
+
|
1248 |
+
if ( GETID3_OS_ISWINDOWS ) {
|
1249 |
+
|
1250 |
+
if ( file_exists ( GETID3_HELPERAPPSDIR . 'vorbiscomment.exe' ) ) {
|
1251 |
+
|
1252 |
+
$commandline = '"' . GETID3_HELPERAPPSDIR . 'vorbiscomment.exe" -w -c "' . $empty . '" "' . $file . '" "' . $temp . '"';
|
1253 |
+
$VorbisCommentError = `$commandline`;
|
1254 |
+
} else {
|
1255 |
+
|
1256 |
+
$VorbisCommentError = 'vorbiscomment.exe not found in ' . GETID3_HELPERAPPSDIR;
|
1257 |
+
}
|
1258 |
+
} else {
|
1259 |
+
|
1260 |
+
$commandline = 'vorbiscomment -w -c "' . $empty . '" "' . $file . '" "' . $temp . '" 2>&1';
|
1261 |
+
$commandline = 'vorbiscomment -w -c ' . escapeshellarg ( $empty ) . ' ' . escapeshellarg ( $file ) . ' ' . escapeshellarg ( $temp ) . ' 2>&1';
|
1262 |
+
$VorbisCommentError = `$commandline`;
|
1263 |
+
}
|
1264 |
+
|
1265 |
+
if ( ! empty ( $VorbisCommentError ) ) {
|
1266 |
+
|
1267 |
+
$this->info[ 'warning' ][ ] = 'Failed making system call to vorbiscomment(.exe) - ' . $algorithm . '_data will be incorrect. If vorbiscomment is unavailable, please download from http://www.vorbis.com/download.psp and put in the getID3() directory. Error returned: ' . $VorbisCommentError;
|
1268 |
+
$this->info[ $algorithm . '_data' ] = false;
|
1269 |
+
} else {
|
1270 |
+
|
1271 |
+
// Get hash of newly created file
|
1272 |
+
switch ( $algorithm ) {
|
1273 |
+
case 'md5':
|
1274 |
+
$this->info[ $algorithm . '_data' ] = md5_file ( $temp );
|
1275 |
+
break;
|
1276 |
+
|
1277 |
+
case 'sha1':
|
1278 |
+
$this->info[ $algorithm . '_data' ] = sha1_file ( $temp );
|
1279 |
+
break;
|
1280 |
+
}
|
1281 |
+
}
|
1282 |
+
|
1283 |
+
// Clean up
|
1284 |
+
unlink ( $empty );
|
1285 |
+
unlink ( $temp );
|
1286 |
+
|
1287 |
+
// Reset abort setting
|
1288 |
+
ignore_user_abort ( $old_abort );
|
1289 |
+
}
|
1290 |
+
} else {
|
1291 |
+
|
1292 |
+
if ( ! empty ( $this->info[ 'avdataoffset' ] ) || (isset ( $this->info[ 'avdataend' ] ) && ($this->info[ 'avdataend' ] < $this->info[ 'filesize' ])) ) {
|
1293 |
+
|
1294 |
+
// get hash from part of file
|
1295 |
+
$this->info[ $algorithm . '_data' ] = getid3_lib::hash_data ( $this->info[ 'filenamepath' ], $this->info[ 'avdataoffset' ], $this->info[ 'avdataend' ], $algorithm );
|
1296 |
+
} else {
|
1297 |
+
|
1298 |
+
// get hash from whole file
|
1299 |
+
switch ( $algorithm ) {
|
1300 |
+
case 'md5':
|
1301 |
+
$this->info[ $algorithm . '_data' ] = md5_file ( $this->info[ 'filenamepath' ] );
|
1302 |
+
break;
|
1303 |
+
|
1304 |
+
case 'sha1':
|
1305 |
+
$this->info[ $algorithm . '_data' ] = sha1_file ( $this->info[ 'filenamepath' ] );
|
1306 |
+
break;
|
1307 |
+
}
|
1308 |
+
}
|
1309 |
+
}
|
1310 |
+
return true;
|
1311 |
+
}
|
1312 |
|
1313 |
+
function ChannelsBitratePlaytimeCalculations () {
|
|
|
1314 |
|
1315 |
+
// set channelmode on audio
|
1316 |
+
if ( ! empty ( $this->info[ 'audio' ][ 'channelmode' ] ) || ! isset ( $this->info[ 'audio' ][ 'channels' ] ) ) {
|
1317 |
+
// ignore
|
1318 |
+
} elseif ( $this->info[ 'audio' ][ 'channels' ] == 1 ) {
|
1319 |
+
$this->info[ 'audio' ][ 'channelmode' ] = 'mono';
|
1320 |
+
} elseif ( $this->info[ 'audio' ][ 'channels' ] == 2 ) {
|
1321 |
+
$this->info[ 'audio' ][ 'channelmode' ] = 'stereo';
|
1322 |
+
}
|
1323 |
|
1324 |
+
// Calculate combined bitrate - audio + video
|
1325 |
+
$CombinedBitrate = 0;
|
1326 |
+
$CombinedBitrate += (isset ( $this->info[ 'audio' ][ 'bitrate' ] ) ? $this->info[ 'audio' ][ 'bitrate' ] : 0);
|
1327 |
+
$CombinedBitrate += (isset ( $this->info[ 'video' ][ 'bitrate' ] ) ? $this->info[ 'video' ][ 'bitrate' ] : 0);
|
1328 |
+
if ( ($CombinedBitrate > 0) && empty ( $this->info[ 'bitrate' ] ) ) {
|
1329 |
+
$this->info[ 'bitrate' ] = $CombinedBitrate;
|
1330 |
+
}
|
1331 |
+
//if ((isset($this->info['video']) && !isset($this->info['video']['bitrate'])) || (isset($this->info['audio']) && !isset($this->info['audio']['bitrate']))) {
|
1332 |
+
// // for example, VBR MPEG video files cannot determine video bitrate:
|
1333 |
+
// // should not set overall bitrate and playtime from audio bitrate only
|
1334 |
+
// unset($this->info['bitrate']);
|
1335 |
+
//}
|
1336 |
+
// video bitrate undetermined, but calculable
|
1337 |
+
if ( isset ( $this->info[ 'video' ][ 'dataformat' ] ) && $this->info[ 'video' ][ 'dataformat' ] && ( ! isset ( $this->info[ 'video' ][ 'bitrate' ] ) || ($this->info[ 'video' ][ 'bitrate' ] == 0)) ) {
|
1338 |
+
// if video bitrate not set
|
1339 |
+
if ( isset ( $this->info[ 'audio' ][ 'bitrate' ] ) && ($this->info[ 'audio' ][ 'bitrate' ] > 0) && ($this->info[ 'audio' ][ 'bitrate' ] == $this->info[ 'bitrate' ]) ) {
|
1340 |
+
// AND if audio bitrate is set to same as overall bitrate
|
1341 |
+
if ( isset ( $this->info[ 'playtime_seconds' ] ) && ($this->info[ 'playtime_seconds' ] > 0) ) {
|
1342 |
+
// AND if playtime is set
|
1343 |
+
if ( isset ( $this->info[ 'avdataend' ] ) && isset ( $this->info[ 'avdataoffset' ] ) ) {
|
1344 |
+
// AND if AV data offset start/end is known
|
1345 |
+
// THEN we can calculate the video bitrate
|
1346 |
+
$this->info[ 'bitrate' ] = round ( (($this->info[ 'avdataend' ] - $this->info[ 'avdataoffset' ]) * 8) / $this->info[ 'playtime_seconds' ] );
|
1347 |
+
$this->info[ 'video' ][ 'bitrate' ] = $this->info[ 'bitrate' ] - $this->info[ 'audio' ][ 'bitrate' ];
|
1348 |
+
}
|
1349 |
+
}
|
1350 |
+
}
|
1351 |
+
}
|
1352 |
|
1353 |
+
if ( ( ! isset ( $this->info[ 'playtime_seconds' ] ) || ($this->info[ 'playtime_seconds' ] <= 0)) && ! empty ( $this->info[ 'bitrate' ] ) ) {
|
1354 |
+
$this->info[ 'playtime_seconds' ] = (($this->info[ 'avdataend' ] - $this->info[ 'avdataoffset' ]) * 8) / $this->info[ 'bitrate' ];
|
1355 |
+
}
|
1356 |
|
1357 |
+
if ( ! isset ( $this->info[ 'bitrate' ] ) && ! empty ( $this->info[ 'playtime_seconds' ] ) ) {
|
1358 |
+
$this->info[ 'bitrate' ] = (($this->info[ 'avdataend' ] - $this->info[ 'avdataoffset' ]) * 8) / $this->info[ 'playtime_seconds' ];
|
1359 |
+
}
|
1360 |
+
if ( isset ( $this->info[ 'bitrate' ] ) && empty ( $this->info[ 'audio' ][ 'bitrate' ] ) && empty ( $this->info[ 'video' ][ 'bitrate' ] ) ) {
|
1361 |
+
if ( isset ( $this->info[ 'audio' ][ 'dataformat' ] ) && empty ( $this->info[ 'video' ][ 'resolution_x' ] ) ) {
|
1362 |
+
// audio only
|
1363 |
+
$this->info[ 'audio' ][ 'bitrate' ] = $this->info[ 'bitrate' ];
|
1364 |
+
} elseif ( isset ( $this->info[ 'video' ][ 'resolution_x' ] ) && empty ( $this->info[ 'audio' ][ 'dataformat' ] ) ) {
|
1365 |
+
// video only
|
1366 |
+
$this->info[ 'video' ][ 'bitrate' ] = $this->info[ 'bitrate' ];
|
1367 |
+
}
|
1368 |
+
}
|
1369 |
+
|
1370 |
+
// Set playtime string
|
1371 |
+
if ( ! empty ( $this->info[ 'playtime_seconds' ] ) && empty ( $this->info[ 'playtime_string' ] ) ) {
|
1372 |
+
$this->info[ 'playtime_string' ] = getid3_lib::PlaytimeString ( $this->info[ 'playtime_seconds' ] );
|
1373 |
+
}
|
1374 |
}
|
|
|
|
|
1375 |
|
1376 |
+
function CalculateCompressionRatioVideo () {
|
1377 |
+
if ( empty ( $this->info[ 'video' ] ) ) {
|
1378 |
+
return false;
|
1379 |
+
}
|
1380 |
+
if ( empty ( $this->info[ 'video' ][ 'resolution_x' ] ) || empty ( $this->info[ 'video' ][ 'resolution_y' ] ) ) {
|
1381 |
+
return false;
|
1382 |
+
}
|
1383 |
+
if ( empty ( $this->info[ 'video' ][ 'bits_per_sample' ] ) ) {
|
1384 |
+
return false;
|
1385 |
+
}
|
1386 |
+
|
1387 |
+
switch ( $this->info[ 'video' ][ 'dataformat' ] ) {
|
1388 |
+
case 'bmp':
|
1389 |
+
case 'gif':
|
1390 |
+
case 'jpeg':
|
1391 |
+
case 'jpg':
|
1392 |
+
case 'png':
|
1393 |
+
case 'tiff':
|
1394 |
+
$FrameRate = 1;
|
1395 |
+
$PlaytimeSeconds = 1;
|
1396 |
+
$BitrateCompressed = $this->info[ 'filesize' ] * 8;
|
1397 |
+
break;
|
1398 |
+
|
1399 |
+
default:
|
1400 |
+
if ( ! empty ( $this->info[ 'video' ][ 'frame_rate' ] ) ) {
|
1401 |
+
$FrameRate = $this->info[ 'video' ][ 'frame_rate' ];
|
1402 |
+
} else {
|
1403 |
+
return false;
|
1404 |
+
}
|
1405 |
+
if ( ! empty ( $this->info[ 'playtime_seconds' ] ) ) {
|
1406 |
+
$PlaytimeSeconds = $this->info[ 'playtime_seconds' ];
|
1407 |
+
} else {
|
1408 |
+
return false;
|
1409 |
+
}
|
1410 |
+
if ( ! empty ( $this->info[ 'video' ][ 'bitrate' ] ) ) {
|
1411 |
+
$BitrateCompressed = $this->info[ 'video' ][ 'bitrate' ];
|
1412 |
+
} else {
|
1413 |
+
return false;
|
1414 |
+
}
|
1415 |
+
break;
|
1416 |
+
}
|
1417 |
+
$BitrateUncompressed = $this->info[ 'video' ][ 'resolution_x' ] * $this->info[ 'video' ][ 'resolution_y' ] * $this->info[ 'video' ][ 'bits_per_sample' ] * $FrameRate;
|
1418 |
|
1419 |
+
$this->info[ 'video' ][ 'compression_ratio' ] = $BitrateCompressed / $BitrateUncompressed;
|
1420 |
+
return true;
|
1421 |
+
}
|
1422 |
+
|
1423 |
+
function CalculateCompressionRatioAudio () {
|
1424 |
+
if ( empty ( $this->info[ 'audio' ][ 'bitrate' ] ) || empty ( $this->info[ 'audio' ][ 'channels' ] ) || empty ( $this->info[ 'audio' ][ 'sample_rate' ] ) ) {
|
1425 |
+
return false;
|
1426 |
+
}
|
1427 |
+
$this->info[ 'audio' ][ 'compression_ratio' ] = $this->info[ 'audio' ][ 'bitrate' ] / ($this->info[ 'audio' ][ 'channels' ] * $this->info[ 'audio' ][ 'sample_rate' ] * ( ! empty ( $this->info[ 'audio' ][ 'bits_per_sample' ] ) ? $this->info[ 'audio' ][ 'bits_per_sample' ] : 16));
|
1428 |
+
|
1429 |
+
if ( ! empty ( $this->info[ 'audio' ][ 'streams' ] ) ) {
|
1430 |
+
foreach ( $this->info[ 'audio' ][ 'streams' ] as $streamnumber => $streamdata ) {
|
1431 |
+
if ( ! empty ( $streamdata[ 'bitrate' ] ) && ! empty ( $streamdata[ 'channels' ] ) && ! empty ( $streamdata[ 'sample_rate' ] ) ) {
|
1432 |
+
$this->info[ 'audio' ][ 'streams' ][ $streamnumber ][ 'compression_ratio' ] = $streamdata[ 'bitrate' ] / ($streamdata[ 'channels' ] * $streamdata[ 'sample_rate' ] * ( ! empty ( $streamdata[ 'bits_per_sample' ] ) ? $streamdata[ 'bits_per_sample' ] : 16));
|
1433 |
+
}
|
1434 |
+
}
|
1435 |
+
}
|
1436 |
+
return true;
|
1437 |
+
}
|
1438 |
+
|
1439 |
+
function CalculateReplayGain () {
|
1440 |
+
if ( isset ( $this->info[ 'replay_gain' ] ) ) {
|
1441 |
+
if ( ! isset ( $this->info[ 'replay_gain' ][ 'reference_volume' ] ) ) {
|
1442 |
+
$this->info[ 'replay_gain' ][ 'reference_volume' ] = ( double ) 89.0;
|
1443 |
+
}
|
1444 |
+
if ( isset ( $this->info[ 'replay_gain' ][ 'track' ][ 'adjustment' ] ) ) {
|
1445 |
+
$this->info[ 'replay_gain' ][ 'track' ][ 'volume' ] = $this->info[ 'replay_gain' ][ 'reference_volume' ] - $this->info[ 'replay_gain' ][ 'track' ][ 'adjustment' ];
|
1446 |
+
}
|
1447 |
+
if ( isset ( $this->info[ 'replay_gain' ][ 'album' ][ 'adjustment' ] ) ) {
|
1448 |
+
$this->info[ 'replay_gain' ][ 'album' ][ 'volume' ] = $this->info[ 'replay_gain' ][ 'reference_volume' ] - $this->info[ 'replay_gain' ][ 'album' ][ 'adjustment' ];
|
1449 |
+
}
|
1450 |
+
|
1451 |
+
if ( isset ( $this->info[ 'replay_gain' ][ 'track' ][ 'peak' ] ) ) {
|
1452 |
+
$this->info[ 'replay_gain' ][ 'track' ][ 'max_noclip_gain' ] = 0 - getid3_lib::RGADamplitude2dB ( $this->info[ 'replay_gain' ][ 'track' ][ 'peak' ] );
|
1453 |
+
}
|
1454 |
+
if ( isset ( $this->info[ 'replay_gain' ][ 'album' ][ 'peak' ] ) ) {
|
1455 |
+
$this->info[ 'replay_gain' ][ 'album' ][ 'max_noclip_gain' ] = 0 - getid3_lib::RGADamplitude2dB ( $this->info[ 'replay_gain' ][ 'album' ][ 'peak' ] );
|
1456 |
+
}
|
1457 |
+
}
|
1458 |
+
return true;
|
1459 |
}
|
1460 |
+
|
1461 |
+
function ProcessAudioStreams () {
|
1462 |
+
if ( ! empty ( $this->info[ 'audio' ][ 'bitrate' ] ) || ! empty ( $this->info[ 'audio' ][ 'channels' ] ) || ! empty ( $this->info[ 'audio' ][ 'sample_rate' ] ) ) {
|
1463 |
+
if ( ! isset ( $this->info[ 'audio' ][ 'streams' ] ) ) {
|
1464 |
+
foreach ( $this->info[ 'audio' ] as $key => $value ) {
|
1465 |
+
if ( $key != 'streams' ) {
|
1466 |
+
$this->info[ 'audio' ][ 'streams' ][ 0 ][ $key ] = $value;
|
1467 |
+
}
|
1468 |
+
}
|
1469 |
+
}
|
1470 |
+
}
|
1471 |
+
return true;
|
1472 |
+
}
|
1473 |
+
|
1474 |
+
function getid3_tempnam () {
|
1475 |
+
return tempnam ( $this->tempdir, 'gI3' );
|
1476 |
+
}
|
1477 |
+
|
1478 |
+
public function saveAttachment ( &$ThisFileInfoIndex, $filename, $offset, $length ) {
|
1479 |
+
try {
|
1480 |
+
if ( ! getid3_lib::intValueSupported ( $offset + $length ) ) {
|
1481 |
+
throw new Exception ( 'cannot extract attachment, it extends beyond the ' . round ( PHP_INT_MAX / 1073741824 ) . 'GB limit' );
|
1482 |
+
}
|
1483 |
+
|
1484 |
+
// do not extract at all
|
1485 |
+
if ( $this->option_save_attachments === getID3::ATTACHMENTS_NONE ) {
|
1486 |
+
|
1487 |
+
unset ( $ThisFileInfoIndex ); // do not set any
|
1488 |
+
// extract to return array
|
1489 |
+
} elseif ( $this->option_save_attachments === getID3::ATTACHMENTS_INLINE ) {
|
1490 |
+
|
1491 |
+
// get whole data in one pass, till it is anyway stored in memory
|
1492 |
+
$ThisFileInfoIndex = file_get_contents ( $this->info[ 'filenamepath' ], false, null, $offset, $length );
|
1493 |
+
if ( ($ThisFileInfoIndex === false) || (strlen ( $ThisFileInfoIndex ) != $length) ) { // verify
|
1494 |
+
throw new Exception ( 'failed to read attachment data' );
|
1495 |
+
}
|
1496 |
+
|
1497 |
+
// assume directory path is given
|
1498 |
+
} else {
|
1499 |
+
|
1500 |
+
$dir = rtrim ( str_replace ( array( '/', '\\' ), DIRECTORY_SEPARATOR, $this->option_save_attachments ), DIRECTORY_SEPARATOR );
|
1501 |
+
// check supplied directory
|
1502 |
+
if ( ! is_dir ( $dir ) || ! is_writable ( $dir ) ) {
|
1503 |
+
throw new Exception ( 'getID3::saveAttachment() -- supplied path (' . $dir . ') does not exist, or is not writable' );
|
1504 |
+
}
|
1505 |
+
|
1506 |
+
// set up destination path
|
1507 |
+
$dest = $dir . DIRECTORY_SEPARATOR . $filename;
|
1508 |
+
|
1509 |
+
// optimize speed if read buffer size is configured to be large enough
|
1510 |
+
// here stream_copy_to_stream() may also be used. need to do speed-compare tests
|
1511 |
+
if ( $length <= $this->fread_buffer_size () ) {
|
1512 |
+
$data = file_get_contents ( $this->info[ 'filenamepath' ], false, null, $offset, $length );
|
1513 |
+
if ( ($data === false) || (strlen ( $data ) != $length) ) { // verify
|
1514 |
+
throw new Exception ( 'failed to read attachment data' );
|
1515 |
+
}
|
1516 |
+
if ( ! file_put_contents ( $dest, $data ) ) {
|
1517 |
+
throw new Exception ( 'failed to create file ' . $dest );
|
1518 |
+
}
|
1519 |
+
} else {
|
1520 |
+
// optimization not available - copy data in loop
|
1521 |
+
// here stream_copy_to_stream() shouldn't be used because it's internal read buffer may be larger than ours!
|
1522 |
+
getid3_lib::CopyFileParts ( $this->info[ 'filenamepath' ], $dest, $offset, $length );
|
1523 |
+
}
|
1524 |
+
$ThisFileInfoIndex = $dest;
|
1525 |
+
}
|
1526 |
+
} catch ( Exception $e ) {
|
1527 |
+
|
1528 |
+
unset ( $ThisFileInfoIndex ); // do not set any is case of error
|
1529 |
+
$this->warning ( 'Failed to extract attachment ' . $filename . ': ' . $e->getMessage () );
|
1530 |
+
return false;
|
1531 |
+
}
|
1532 |
+
return true;
|
1533 |
+
}
|
1534 |
+
|
1535 |
+
public function include_module ( $name ) {
|
1536 |
+
//if (!file_exists($this->include_path.'module.'.$name.'.php')) {
|
1537 |
+
if ( ! file_exists ( GETID3_INCLUDEPATH . 'module.' . $name . '.php' ) ) {
|
1538 |
+
throw new getid3_exception ( 'Required module.' . $name . '.php is missing.' );
|
1539 |
+
}
|
1540 |
+
include_once(GETID3_INCLUDEPATH . 'module.' . $name . '.php');
|
1541 |
+
return true;
|
1542 |
+
}
|
1543 |
+
|
1544 |
}
|
1545 |
|
1546 |
+
}
|
1547 |
+
if ( ! class_exists ( "getid3_handler" ) ) {
|
1548 |
+
|
1549 |
+
abstract class getid3_handler {
|
1550 |
+
|
1551 |
+
protected $getid3; // pointer
|
1552 |
+
protected $data_string_flag = false; // analyzing filepointer or string
|
1553 |
+
protected $data_string; // string to analyze
|
1554 |
+
protected $data_string_position = 0; // seek position in string
|
1555 |
+
|
1556 |
+
public function __construct ( getID3 $getid3 ) {
|
1557 |
+
$this->getid3 = $getid3;
|
1558 |
+
}
|
1559 |
+
|
1560 |
+
// Analyze from file pointer
|
1561 |
+
abstract public function Analyze ();
|
1562 |
|
1563 |
+
// Analyze from string instead
|
1564 |
+
public function AnalyzeString ( &$string ) {
|
1565 |
+
// Enter string mode
|
1566 |
+
$this->data_string_flag = true;
|
1567 |
+
$this->data_string = $string;
|
|
|
1568 |
|
1569 |
+
// Save info
|
1570 |
+
$saved_avdataoffset = $this->getid3->info[ 'avdataoffset' ];
|
1571 |
+
$saved_avdataend = $this->getid3->info[ 'avdataend' ];
|
1572 |
+
$saved_filesize = $this->getid3->info[ 'filesize' ];
|
1573 |
|
1574 |
+
// Reset some info
|
1575 |
+
$this->getid3->info[ 'avdataoffset' ] = 0;
|
1576 |
+
$this->getid3->info[ 'avdataend' ] = $this->getid3->info[ 'filesize' ] = strlen ( $string );
|
1577 |
+
|
1578 |
+
// Analyze
|
1579 |
+
$this->Analyze ();
|
1580 |
+
|
1581 |
+
// Restore some info
|
1582 |
+
$this->getid3->info[ 'avdataoffset' ] = $saved_avdataoffset;
|
1583 |
+
$this->getid3->info[ 'avdataend' ] = $saved_avdataend;
|
1584 |
+
$this->getid3->info[ 'filesize' ] = $saved_filesize;
|
1585 |
+
|
1586 |
+
// Exit string mode
|
1587 |
+
$this->data_string_flag = false;
|
1588 |
+
}
|
1589 |
+
|
1590 |
+
protected function ftell () {
|
1591 |
+
if ( $this->data_string_flag ) {
|
1592 |
+
return $this->data_string_position;
|
1593 |
}
|
1594 |
+
return ftell ( $this->getid3->fp );
|
1595 |
}
|
1596 |
+
|
1597 |
+
protected function fread ( $bytes ) {
|
1598 |
+
if ( $this->data_string_flag ) {
|
1599 |
+
$this->data_string_position += $bytes;
|
1600 |
+
return substr ( $this->data_string, $this->data_string_position - $bytes, $bytes );
|
1601 |
+
}
|
1602 |
+
return fread ( $this->getid3->fp, $bytes );
|
1603 |
+
}
|
1604 |
+
|
1605 |
+
protected function fseek ( $bytes, $whence = SEEK_SET ) {
|
1606 |
+
if ( $this->data_string_flag ) {
|
1607 |
+
switch ( $whence ) {
|
1608 |
+
case SEEK_SET:
|
1609 |
+
$this->data_string_position = $bytes;
|
1610 |
+
return;
|
1611 |
+
|
1612 |
+
case SEEK_CUR:
|
1613 |
+
$this->data_string_position += $bytes;
|
1614 |
+
return;
|
1615 |
+
|
1616 |
+
case SEEK_END:
|
1617 |
+
$this->data_string_position = strlen ( $this->data_string ) + $bytes;
|
1618 |
+
return;
|
1619 |
+
}
|
1620 |
+
}
|
1621 |
+
return fseek ( $this->getid3->fp, $bytes, $whence );
|
1622 |
+
}
|
1623 |
+
|
1624 |
}
|
1625 |
|
1626 |
}
|
1627 |
|
1628 |
+
if ( ! class_exists ( "getid3_exception" ) ) {
|
1629 |
+
|
1630 |
+
class getid3_exception extends Exception {
|
1631 |
+
|
1632 |
+
public $message;
|
1633 |
+
|
1634 |
+
}
|
1635 |
|
|
|
|
|
|
|
1636 |
}
|
1637 |
|
1638 |
+
|
lib/media-element/bigplay.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?xml version="1.0" standalone="no"?>
|
lib/media-element/controls.png
CHANGED
Binary file
|
lib/media-element/controls.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?xml version="1.0" standalone="no"?>
|
lib/media-element/flashmediaelement.swf
CHANGED
Binary file
|
lib/media-element/mediaelement-and-player.min.js
CHANGED
@@ -7,58 +7,65 @@
|
|
7 |
* for browsers that don't understand HTML5 or can't play the provided codec
|
8 |
* Can play MP4 (H.264), Ogg, WebM, FLV, WMV, WMA, ACC, and MP3
|
9 |
*
|
10 |
-
* Copyright 2010-
|
11 |
-
*
|
12 |
*
|
13 |
-
*/var mejs=mejs||{};mejs.version="2.
|
14 |
-
mejs.plugins={silverlight:[{version:[3,0],types:["video/mp4","video/m4v","video/mov","video/wmv","audio/wma","audio/m4a","audio/mp3","audio/wav","audio/mpeg"]}],flash:[{version:[9,0,124],types:["video/mp4","video/m4v","video/mov","video/flv","video/rtmp","video/x-flv","audio/flv","audio/x-flv","audio/mp3","audio/m4a","audio/mpeg","video/youtube","video/x-youtube"]}],youtube:[{version:null,types:["video/youtube","video/x-youtube"]}],vimeo:[{version:null,types:["video/vimeo"
|
15 |
-
|
16 |
-
|
17 |
-
|
|
|
18 |
"none";(function(){b.readyState==4?mejs.Utility.removeObjectInIE(a):setTimeout(arguments.callee,10)})()}else b.parentNode.removeChild(b)},removeObjectInIE:function(a){if(a=document.getElementById(a)){for(var b in a)if(typeof a[b]=="function")a[b]=null;a.parentNode.removeChild(a)}}};
|
19 |
-
mejs.PluginDetector={hasPluginVersion:function(a,b){var c=this.plugins[a];b[1]=b[1]||0;b[2]=b[2]||0;return c[0]>b[0]||c[0]==b[0]&&c[1]>b[1]||c[0]==b[0]&&c[1]==b[1]&&c[2]>=b[2]?true:false},nav:window.navigator,ua:window.navigator.userAgent.toLowerCase(),plugins:[],addPlugin:function(a,b,c,d,e){this.plugins[a]=this.detectPlugin(b,c,d,e)},detectPlugin:function(a,b,c,d){var e=[0,0,0],
|
20 |
-
!(typeof this.nav.mimeTypes!="undefined"&&this.nav.mimeTypes[b]&&!this.nav.mimeTypes[b].enabledPlugin)){e=c.replace(a,"").replace(/^\s+/,"").replace(/\sr/gi,".").split(".");for(a=0;a<e.length;a++)e[a]=parseInt(e[a].match(/\d+/),10)}}else if(typeof window.ActiveXObject!="undefined")try{if(
|
21 |
mejs.PluginDetector.addPlugin("flash","Shockwave Flash","application/x-shockwave-flash","ShockwaveFlash.ShockwaveFlash",function(a){var b=[];if(a=a.GetVariable("$version")){a=a.split(" ")[1].split(",");b=[parseInt(a[0],10),parseInt(a[1],10),parseInt(a[2],10)]}return b});
|
22 |
-
mejs.PluginDetector.addPlugin("silverlight","Silverlight Plug-In","application/x-silverlight-2","AgControl.AgControl",function(a){var b=[0,0,0,0],c=function(d,e,g
|
23 |
-
mejs.MediaFeatures={init:function(){var a=this,b=document,c=mejs.PluginDetector.nav,d=mejs.PluginDetector.ua.toLowerCase(),e,
|
24 |
-
null;a.isGecko=d.match(/gecko/gi)!==null&&!a.isWebkit;a.isOpera=d.match(/opera/gi)!==null;a.hasTouch="ontouchstart"in window;for(c=0;c<
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
mejs.
|
|
|
29 |
mejs.PluginMediaElement.prototype={pluginElement:null,pluginType:"",isFullScreen:false,playbackRate:-1,defaultPlaybackRate:-1,seekable:[],played:[],paused:true,ended:false,seeking:false,duration:0,error:null,tagName:"",muted:false,volume:1,currentTime:0,play:function(){if(this.pluginApi!=null){this.pluginType=="youtube"?this.pluginApi.playVideo():this.pluginApi.playMedia();this.paused=false}},load:function(){if(this.pluginApi!=null){this.pluginType!="youtube"&&this.pluginApi.loadMedia();this.paused=
|
30 |
-
false}},pause:function(){if(this.pluginApi!=null){this.pluginType=="youtube"?this.pluginApi.pauseVideo():this.pluginApi.pauseMedia();this.paused=true}},stop:function(){if(this.pluginApi!=null){this.pluginType=="youtube"?this.pluginApi.stopVideo():this.pluginApi.stopMedia();this.paused=true}},canPlayType:function(a){var b,c,d,e=mejs.plugins[this.pluginType];for(b=0;b<e.length;b++){d=e[b];if(mejs.PluginDetector.hasPluginVersion(this.pluginType,d.version))for(c=0;c<d.types.length;c++)if(a==d.types[c])return
|
31 |
-
positionFullscreenButton:function(a,b,c){this.pluginApi!=null&&this.pluginApi.positionFullscreenButton&&this.pluginApi.positionFullscreenButton(a,b,c)},hideFullscreenButton:function(){this.pluginApi!=null&&this.pluginApi.hideFullscreenButton&&this.pluginApi.hideFullscreenButton()},setSrc:function(a){if(typeof a=="string"){this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(a));this.src=mejs.Utility.absolutizeUrl(a)}else{var b,c;for(b=0;b<a.length;b++){c=a[b];if(this.canPlayType(c.type)){this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(c.src));
|
32 |
-
this.src=mejs.Utility.absolutizeUrl(a)}}}},setCurrentTime:function(a){if(this.pluginApi!=null){this.pluginType=="youtube"?this.pluginApi.seekTo(a):this.pluginApi.setCurrentTime(a);this.currentTime=a}},setVolume:function(a){if(this.pluginApi!=null){this.pluginType=="youtube"?this.pluginApi.setVolume(a*100):this.pluginApi.setVolume(a);this.volume=a}},setMuted:function(a){if(this.pluginApi!=null){if(this.pluginType=="youtube"){a?this.pluginApi.mute():this.pluginApi.unMute();this.muted=a;this.dispatchEvent("volumechange")}else this.pluginApi.setMuted(a);
|
33 |
this.muted=a}},setVideoSize:function(a,b){if(this.pluginElement.style){this.pluginElement.style.width=a+"px";this.pluginElement.style.height=b+"px"}this.pluginApi!=null&&this.pluginApi.setVideoSize&&this.pluginApi.setVideoSize(a,b)},setFullscreen:function(a){this.pluginApi!=null&&this.pluginApi.setFullscreen&&this.pluginApi.setFullscreen(a)},enterFullScreen:function(){this.pluginApi!=null&&this.pluginApi.setFullscreen&&this.setFullscreen(true)},exitFullScreen:function(){this.pluginApi!=null&&this.pluginApi.setFullscreen&&
|
34 |
-
this.setFullscreen(false)},addEventListener:function(a,b){this.events[a]=this.events[a]||[];this.events[a].push(b)},removeEventListener:function(a,b){if(!a){this.events={};return true}var c=this.events[a];if(!c)return true;if(!b){this.events[a]=[];return true}for(i=0;i<c.length;i++)if(c[i]===b){this.events[a].splice(i,1);return true}return false},dispatchEvent:function(a){var b,c,d=this.events[a];if(d){c=Array.prototype.slice.call(arguments,1);for(b=0;b<d.length;b++)d[b].apply(null,c)}},
|
35 |
-
|
36 |
-
mejs.MediaPluginBridge={pluginMediaElements:{},htmlMediaElements:{},registerPluginElement:function(a,b,c){this.pluginMediaElements[a]=b;this.htmlMediaElements[a]=c},initPlugin:function(a){var b=this.pluginMediaElements[a],c=this.htmlMediaElements[a];if(b){switch(b.pluginType){case "flash":b.pluginElement=b.pluginApi=document.getElementById(a);break;case "silverlight":b.pluginElement=document.getElementById(b.id);
|
37 |
-
c)}},fireEvent:function(a,b,c){var d,e;a=this.pluginMediaElements[a]
|
38 |
-
mejs.MediaElementDefaults={mode:"auto",plugins:["flash","silverlight","youtube","vimeo"],enablePluginDebug:false,type:"",pluginPath:mejs.Utility.getScriptPath(["mediaelement.js","mediaelement.min.js","mediaelement-and-player.js","mediaelement-and-player.min.js"]),flashName:"flashmediaelement.swf",flashStreamer:"",enablePluginSmoothing:false,silverlightName:"silverlightmediaelement.xap",defaultVideoWidth:480,
|
39 |
-
success:function(){},error:function(){}};mejs.MediaElement=function(a,b){return mejs.HtmlMediaElementShim.create(a,b)};
|
40 |
-
mejs.HtmlMediaElementShim={create:function(a,b){var c=mejs.MediaElementDefaults,d=typeof a=="string"?document.getElementById(a):a,e=d.tagName.toLowerCase(),
|
41 |
-
"none":h
|
42 |
-
determinePlayback:function(a,b,c,d,e){var
|
43 |
-
|
44 |
-
0;f
|
45 |
-
k.version))for(d=0;d<k.types.length;d++)if(
|
46 |
-
case "webm":case "webma":case "webmv":return"webm";case "ogg":case "oga":case "ogv":return"ogg";default:return a}},createErrorMessage:function(a,b,c){var d=a.htmlMediaElement,e=document.createElement("div");e.className=
|
47 |
-
b.error(d)},createPlugin:function(a,b,c,d,e,
|
48 |
-
|
49 |
-
d=["id="+
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
|
|
56 |
{height:a.height,width:a.width,videoId:a.videoId,playerVars:{controls:0},events:{onReady:function(){a.pluginMediaElement.pluginApi=c;mejs.MediaPluginBridge.initPlugin(a.pluginId);setInterval(function(){mejs.YouTubeApi.createEvent(c,b,"timeupdate")},250)},onStateChange:function(d){mejs.YouTubeApi.handleStateChange(d.data,c,b)}}})},createEvent:function(a,b,c){c={type:c,target:b};if(a&&a.getDuration){b.currentTime=c.currentTime=a.getCurrentTime();b.duration=c.duration=a.getDuration();c.paused=b.paused;
|
57 |
c.ended=b.ended;c.muted=a.isMuted();c.volume=a.getVolume()/100;c.bytesTotal=a.getVideoBytesTotal();c.bufferedBytes=a.getVideoBytesLoaded();var d=c.bufferedBytes/c.bytesTotal*c.duration;c.target.buffered=c.buffered={start:function(){return 0},end:function(){return d},length:1}}b.dispatchEvent(c.type,c)},iFrameReady:function(){for(this.isIframeLoaded=this.isLoaded=true;this.iframeQueue.length>0;)this.createIframe(this.iframeQueue.pop())},flashPlayers:{},createFlash:function(a){this.flashPlayers[a.pluginId]=
|
58 |
-
a;var b,c="
|
59 |
-
'<object type="application/x-shockwave-flash" id="'+a.pluginId+'" data="'+c+'" width="'+a.width+'" height="'+a.height+'" style="visibility: visible; "><param name="allowScriptAccess" value="always"><param name="wmode" value="transparent"></object>'},flashReady:function(a){var b=this.flashPlayers[a],c=
|
60 |
-
c,d)};c.addEventListener("onStateChange",a);setInterval(function(){mejs.YouTubeApi.createEvent(c,d,"timeupdate")},250)},handleStateChange:function(a,b,c){switch(a){case -1:c.paused=true;c.ended=true;mejs.YouTubeApi.createEvent(b,c,"loadedmetadata");break;case 0:c.paused=false;
|
61 |
-
c,"pause");break;case 3:mejs.YouTubeApi.createEvent(b,c,"progress")}}};function onYouTubePlayerAPIReady(){mejs.YouTubeApi.iFrameReady()}function onYouTubePlayerReady(a){mejs.YouTubeApi.flashReady(a)}window.mejs=mejs;window.MediaElement=mejs.MediaElement;
|
|
|
|
|
|
|
|
|
62 |
|
63 |
/*!
|
64 |
* MediaElementPlayer
|
@@ -67,87 +74,100 @@ c,"pause");break;case 3:mejs.YouTubeApi.createEvent(b,c,"progress")}}};function
|
|
67 |
* Creates a controller bar for HTML5 <video> add <audio> tags
|
68 |
* using jQuery and MediaElement.js (HTML5 Flash/Silverlight wrapper)
|
69 |
*
|
70 |
-
* Copyright 2010-
|
71 |
-
*
|
72 |
*
|
73 |
*/if(typeof jQuery!="undefined")mejs.$=jQuery;else if(typeof ender!="undefined")mejs.$=ender;
|
74 |
-
(function(f){mejs.MepDefaults={poster:"",defaultVideoWidth:480,defaultVideoHeight:270,videoWidth:-1,videoHeight:-1,defaultAudioWidth:400,defaultAudioHeight:30,defaultSeekBackwardInterval:function(a){return a.duration*0.05},defaultSeekForwardInterval:function(a){return a.duration*0.05},audioWidth:-1,audioHeight:-1,startVolume:0.8,loop:false,enableAutosize:true,alwaysShowHours:false,showTimecodeFrameCount:false,framesPerSecond:25,autosizeProgress:true,alwaysShowControls:false,
|
75 |
-
iPhoneUseNativeControls:false,AndroidUseNativeControls:false,features:["playpause","current","progress","duration","tracks","volume","fullscreen"],isVideo:true,enableKeyboard:true,pauseOtherPlayers:true,keyActions:[{keys:[32,179],action:function(a,b){b.paused||b.ended?b.play():b.pause()}},{keys:[38],action:function(a,b){b.setVolume(Math.min(b.volume+0.1,1))}},{keys:[40],action:function(a,b){b.setVolume(Math.max(b.volume-
|
76 |
-
0){if(a.isVideo){a.showControls();a.startControlsTimer()}var c=Math.max(b.currentTime-a.options.defaultSeekBackwardInterval(b),0);b.setCurrentTime(c)}}},{keys:[39,228],action:function(a,b){if(!isNaN(b.duration)&&b.duration>0){if(a.isVideo){a.showControls();a.startControlsTimer()}var c=Math.min(b.currentTime+a.options.defaultSeekForwardInterval(b),b.duration);b.setCurrentTime(c)}}},{keys:[70],action:function(a){if(typeof a.enterFullScreen!=
|
77 |
-
mejs.mepIndex=0;mejs.players=
|
78 |
-
controlsAreVisible:true,init:function(){var a=this,b=mejs.MediaFeatures,c=f.extend(true,{},a.options,{success:function(d,g){a.meReady(d,g)},error:function(d){a.handleError(d)}}),e=a.media.tagName.toLowerCase();a.isDynamic=e!=="audio"&&e!=="video";a.isVideo=a.isDynamic?a.options.isVideo:e!=="audio"&&a.options.isVideo;if(b.isiPad&&a.options.iPadUseNativeControls||b.isiPhone&&a.options.iPhoneUseNativeControls){a.$media.attr("controls",
|
79 |
-
a.media.play()}}else if(!(b.isAndroid&&a.AndroidUseNativeControls)){a.$media.removeAttr("controls");a.
|
80 |
-
"")+(b.isiPhone?"mejs-iphone ":"")+(a.isVideo?"mejs-video ":"mejs-audio "));if(b.isiOS){b=a.$media.clone();a.container.find(".mejs-mediaelement").append(b);a.$media.remove();a.$node=a.$media=b;a.node=a.media=b[0]}else a.container.find(".mejs-mediaelement").append(a.$media);a.controls=a.container.find(".mejs-controls");a.layers=a.container.find(".mejs-layers");b=a.isVideo?"video":"audio";e=b.substring(0,
|
81 |
-
|
82 |
-
c.pluginWidth=a.
|
83 |
-
"
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
(function(
|
103 |
-
|
104 |
-
(
|
105 |
-
b.
|
|
|
|
|
|
|
|
|
106 |
(function(f){f.extend(MediaElementPlayer.prototype,{buildprogress:function(a,b,c,e){f('<div class="mejs-time-rail"><span class="mejs-time-total"><span class="mejs-time-buffering"></span><span class="mejs-time-loaded"></span><span class="mejs-time-current"></span><span class="mejs-time-handle"></span><span class="mejs-time-float"><span class="mejs-time-float-current">00:00</span><span class="mejs-time-float-corner"></span></span></span></div>').appendTo(b);b.find(".mejs-time-buffering").hide();var d=
|
107 |
-
b.find(".mejs-time-total");c=b.find(".mejs-time-loaded");var
|
108 |
-
1){
|
109 |
-
a.setCurrentRail(
|
110 |
-
c)}},setCurrentRail:function(){if(this.media.currentTime!=undefined&&this.media.duration)if(this.total&&this.handle){var a=this.total.width()*this.media.currentTime/this.media.duration,b=a-this.handle.outerWidth(true)/2;this.current.width(a);this.handle.css("left",b)}}})})(mejs.$);
|
111 |
-
(function(f){f.extend(mejs.MepDefaults,{duration:-1,timeAndDurationSeparator:"
|
112 |
-
|
113 |
f('<div class="mejs-time mejs-duration-container"><span class="mejs-duration">'+(this.options.duration>0?mejs.Utility.secondsToTimeCode(this.options.duration,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25):(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00"))+"</span></div>").appendTo(b)}this.durationD=this.controls.find(".mejs-duration");e.addEventListener("timeupdate",function(){a.updateDuration()},
|
114 |
-
false)},updateCurrent:function(){if(this.currenttime)this.currenttime.html(mejs.Utility.secondsToTimeCode(this.media.currentTime,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25))},updateDuration:function(){
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
(
|
122 |
-
function(){
|
123 |
-
a.
|
124 |
-
|
125 |
-
d.controls.
|
126 |
-
function(){
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
(
|
133 |
-
|
134 |
-
|
135 |
-
function(){
|
136 |
-
"
|
137 |
-
|
138 |
-
|
139 |
-
a
|
140 |
-
|
141 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
b.media.paused&&b.media.play()});b.chapters.show()}});mejs.language={codes:{af:"Afrikaans",sq:"Albanian",ar:"Arabic",be:"Belarusian",bg:"Bulgarian",ca:"Catalan",zh:"Chinese","zh-cn":"Chinese Simplified","zh-tw":"Chinese Traditional",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch",en:"English",et:"Estonian",tl:"Filipino",fi:"Finnish",fr:"French",gl:"Galician",de:"German",el:"Greek",ht:"Haitian Creole",iw:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",ga:"Irish",it:"Italian",ja:"Japanese",
|
143 |
ko:"Korean",lv:"Latvian",lt:"Lithuanian",mk:"Macedonian",ms:"Malay",mt:"Maltese",no:"Norwegian",fa:"Persian",pl:"Polish",pt:"Portuguese",ro:"Romanian",ru:"Russian",sr:"Serbian",sk:"Slovak",sl:"Slovenian",es:"Spanish",sw:"Swahili",sv:"Swedish",tl:"Tagalog",th:"Thai",tr:"Turkish",uk:"Ukrainian",vi:"Vietnamese",cy:"Welsh",yi:"Yiddish"}};mejs.TrackFormatParser={webvvt:{pattern_identifier:/^([a-zA-z]+-)?[0-9]+$/,pattern_timecode:/^([0-9]{2}:[0-9]{2}:[0-9]{2}([,.][0-9]{1,3})?) --\> ([0-9]{2}:[0-9]{2}:[0-9]{2}([,.][0-9]{3})?)(.*)$/,
|
144 |
parse:function(a){var b=0;a=mejs.TrackFormatParser.split2(a,/\r?\n/);for(var c={text:[],times:[]},e,d;b<a.length;b++)if(this.pattern_identifier.exec(a[b])){b++;if((e=this.pattern_timecode.exec(a[b]))&&b<a.length){b++;d=a[b];for(b++;a[b]!==""&&b<a.length;){d=d+"\n"+a[b];b++}d=f.trim(d).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig,"<a href='$1' target='_blank'>$1</a>");c.text.push(d);c.times.push({start:mejs.Utility.convertSMPTEtoSeconds(e[1])==0?0.2:mejs.Utility.convertSMPTEtoSeconds(e[1]),
|
145 |
stop:mejs.Utility.convertSMPTEtoSeconds(e[3]),settings:e[5]})}}return c}},dfxp:{parse:function(a){a=f(a).filter("tt");var b=0;b=a.children("div").eq(0);var c=b.find("p");b=a.find("#"+b.attr("style"));var e,d;a={text:[],times:[]};if(b.length){d=b.removeAttr("id").get(0).attributes;if(d.length){e={};for(b=0;b<d.length;b++)e[d[b].name.split(":")[1]]=d[b].value}}for(b=0;b<c.length;b++){var g;d={start:null,stop:null,style:null};if(c.eq(b).attr("begin"))d.start=mejs.Utility.convertSMPTEtoSeconds(c.eq(b).attr("begin"));
|
146 |
if(!d.start&&c.eq(b-1).attr("end"))d.start=mejs.Utility.convertSMPTEtoSeconds(c.eq(b-1).attr("end"));if(c.eq(b).attr("end"))d.stop=mejs.Utility.convertSMPTEtoSeconds(c.eq(b).attr("end"));if(!d.stop&&c.eq(b+1).attr("begin"))d.stop=mejs.Utility.convertSMPTEtoSeconds(c.eq(b+1).attr("begin"));if(e){g="";for(var k in e)g+=k+":"+e[k]+";"}if(g)d.style=g;if(d.start==0)d.start=0.2;a.times.push(d);d=f.trim(c.eq(b).html()).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig,
|
147 |
"<a href='$1' target='_blank'>$1</a>");a.text.push(d);if(a.times.start==0)a.times.start=2}return a}},split2:function(a,b){return a.split(b)}};if("x\n\ny".split(/\n/gi).length!=3)mejs.TrackFormatParser.split2=function(a,b){var c=[],e="",d;for(d=0;d<a.length;d++){e+=a.substring(d,d+1);if(b.test(e)){c.push(e.replace(b,""));e=""}}c.push(e);return c}})(mejs.$);
|
148 |
-
(function(f){f.extend(mejs.MepDefaults,{contextMenuItems:[{render:function(a){if(typeof a.enterFullScreen=="undefined")return null;return a.isFullScreen?"Turn off Fullscreen":"Go Fullscreen"},click:function(a){a.isFullScreen?a.exitFullScreen():a.enterFullScreen()}},{render:function(a){return a.media.muted?"Unmute":"Mute"},click:function(a){a.media.muted?a.setMuted(false):a.setMuted(true)}},{isSeparator:true},{render:function(){return"Download Video"},
|
149 |
-
f.extend(MediaElementPlayer.prototype,{buildcontextmenu:function(a){a.contextMenu=f('<div class="mejs-contextmenu"></div>').appendTo(f("body")).hide();a.container.bind("contextmenu",function(b){if(a.isContextMenuEnabled){b.preventDefault();a.renderContextMenu(b.clientX-1,b.clientY-1);return false}});a.container.bind("click",function(){a.contextMenu.hide()});a.contextMenu.bind("mouseleave",function(){a.startContextMenuTimer()})},
|
150 |
-
true},disableContextMenu:function(){this.isContextMenuEnabled=false},contextMenuTimeout:null,startContextMenuTimer:function(){var a=this;a.killContextMenuTimer();a.contextMenuTimer=setTimeout(function(){a.hideContextMenu();a.killContextMenuTimer()},750)},killContextMenuTimer:function(){var a=this.contextMenuTimer;if(a!=null){clearTimeout(a);delete a}},hideContextMenu:function(){this.contextMenu.hide()},renderContextMenu:function(a,
|
151 |
-
k;g++)if(d[g].isSeparator)e+='<div class="mejs-contextmenu-separator"></div>';else{var
|
152 |
-
"undefined"&&p.click(c);c.contextMenu.hide()})});setTimeout(function(){c.killControlsTimer("rev3")},100)}})})(mejs.$);
|
|
|
|
|
153 |
|
7 |
* for browsers that don't understand HTML5 or can't play the provided codec
|
8 |
* Can play MP4 (H.264), Ogg, WebM, FLV, WMV, WMA, ACC, and MP3
|
9 |
*
|
10 |
+
* Copyright 2010-2013, John Dyer (http://j.hn)
|
11 |
+
* License: MIT
|
12 |
*
|
13 |
+
*/var mejs=mejs||{};mejs.version="2.13.0";mejs.meIndex=0;
|
14 |
+
mejs.plugins={silverlight:[{version:[3,0],types:["video/mp4","video/m4v","video/mov","video/wmv","audio/wma","audio/m4a","audio/mp3","audio/wav","audio/mpeg"]}],flash:[{version:[9,0,124],types:["video/mp4","video/m4v","video/mov","video/flv","video/rtmp","video/x-flv","audio/flv","audio/x-flv","audio/mp3","audio/m4a","audio/mpeg","video/youtube","video/x-youtube"]}],youtube:[{version:null,types:["video/youtube","video/x-youtube","audio/youtube","audio/x-youtube"]}],vimeo:[{version:null,types:["video/vimeo",
|
15 |
+
"video/x-vimeo"]}]};
|
16 |
+
mejs.Utility={encodeUrl:function(a){return encodeURIComponent(a)},escapeHTML:function(a){return a.toString().split("&").join("&").split("<").join("<").split('"').join(""")},absolutizeUrl:function(a){var b=document.createElement("div");b.innerHTML='<a href="'+this.escapeHTML(a)+'">x</a>';return b.firstChild.href},getScriptPath:function(a){for(var b=0,c,d="",e="",f,g,h=document.getElementsByTagName("script"),l=h.length,j=a.length;b<l;b++){f=h[b].src;c=f.lastIndexOf("/");if(c>-1){g=f.substring(c+
|
17 |
+
1);f=f.substring(0,c+1)}else{g=f;f=""}for(c=0;c<j;c++){e=a[c];e=g.indexOf(e);if(e>-1){d=f;break}}if(d!=="")break}return d},secondsToTimeCode:function(a,b,c,d){if(typeof c=="undefined")c=false;else if(typeof d=="undefined")d=25;var e=Math.floor(a/3600)%24,f=Math.floor(a/60)%60,g=Math.floor(a%60);a=Math.floor((a%1*d).toFixed(3));return(b||e>0?(e<10?"0"+e:e)+":":"")+(f<10?"0"+f:f)+":"+(g<10?"0"+g:g)+(c?":"+(a<10?"0"+a:a):"")},timeCodeToSeconds:function(a,b,c,d){if(typeof c=="undefined")c=false;else if(typeof d==
|
18 |
+
"undefined")d=25;a=a.split(":");b=parseInt(a[0],10);var e=parseInt(a[1],10),f=parseInt(a[2],10),g=0,h=0;if(c)g=parseInt(a[3])/d;return h=b*3600+e*60+f+g},convertSMPTEtoSeconds:function(a){if(typeof a!="string")return false;a=a.replace(",",".");var b=0,c=a.indexOf(".")!=-1?a.split(".")[1].length:0,d=1;a=a.split(":").reverse();for(var e=0;e<a.length;e++){d=1;if(e>0)d=Math.pow(60,e);b+=Number(a[e])*d}return Number(b.toFixed(c))},removeSwf:function(a){var b=document.getElementById(a);if(b&&/object|embed/i.test(b.nodeName))if(mejs.MediaFeatures.isIE){b.style.display=
|
19 |
"none";(function(){b.readyState==4?mejs.Utility.removeObjectInIE(a):setTimeout(arguments.callee,10)})()}else b.parentNode.removeChild(b)},removeObjectInIE:function(a){if(a=document.getElementById(a)){for(var b in a)if(typeof a[b]=="function")a[b]=null;a.parentNode.removeChild(a)}}};
|
20 |
+
mejs.PluginDetector={hasPluginVersion:function(a,b){var c=this.plugins[a];b[1]=b[1]||0;b[2]=b[2]||0;return c[0]>b[0]||c[0]==b[0]&&c[1]>b[1]||c[0]==b[0]&&c[1]==b[1]&&c[2]>=b[2]?true:false},nav:window.navigator,ua:window.navigator.userAgent.toLowerCase(),plugins:[],addPlugin:function(a,b,c,d,e){this.plugins[a]=this.detectPlugin(b,c,d,e)},detectPlugin:function(a,b,c,d){var e=[0,0,0],f;if(typeof this.nav.plugins!="undefined"&&typeof this.nav.plugins[a]=="object"){if((c=this.nav.plugins[a].description)&&
|
21 |
+
!(typeof this.nav.mimeTypes!="undefined"&&this.nav.mimeTypes[b]&&!this.nav.mimeTypes[b].enabledPlugin)){e=c.replace(a,"").replace(/^\s+/,"").replace(/\sr/gi,".").split(".");for(a=0;a<e.length;a++)e[a]=parseInt(e[a].match(/\d+/),10)}}else if(typeof window.ActiveXObject!="undefined")try{if(f=new ActiveXObject(c))e=d(f)}catch(g){}return e}};
|
22 |
mejs.PluginDetector.addPlugin("flash","Shockwave Flash","application/x-shockwave-flash","ShockwaveFlash.ShockwaveFlash",function(a){var b=[];if(a=a.GetVariable("$version")){a=a.split(" ")[1].split(",");b=[parseInt(a[0],10),parseInt(a[1],10),parseInt(a[2],10)]}return b});
|
23 |
+
mejs.PluginDetector.addPlugin("silverlight","Silverlight Plug-In","application/x-silverlight-2","AgControl.AgControl",function(a){var b=[0,0,0,0],c=function(d,e,f,g){for(;d.isVersionSupported(e[0]+"."+e[1]+"."+e[2]+"."+e[3]);)e[f]+=g;e[f]-=g};c(a,b,0,1);c(a,b,1,1);c(a,b,2,1E4);c(a,b,2,1E3);c(a,b,2,100);c(a,b,2,10);c(a,b,2,1);c(a,b,3,1);return b});
|
24 |
+
mejs.MediaFeatures={init:function(){var a=this,b=document,c=mejs.PluginDetector.nav,d=mejs.PluginDetector.ua.toLowerCase(),e,f=["source","track","audio","video"];a.isiPad=d.match(/ipad/i)!==null;a.isiPhone=d.match(/iphone/i)!==null;a.isiOS=a.isiPhone||a.isiPad;a.isAndroid=d.match(/android/i)!==null;a.isBustedAndroid=d.match(/android 2\.[12]/)!==null;a.isBustedNativeHTTPS=location.protocol==="https:"&&(d.match(/android [12]\./)!==null||d.match(/macintosh.* version.* safari/)!==null);a.isIE=c.appName.toLowerCase().indexOf("microsoft")!=
|
25 |
+
-1;a.isChrome=d.match(/chrome/gi)!==null;a.isFirefox=d.match(/firefox/gi)!==null;a.isWebkit=d.match(/webkit/gi)!==null;a.isGecko=d.match(/gecko/gi)!==null&&!a.isWebkit;a.isOpera=d.match(/opera/gi)!==null;a.hasTouch="ontouchstart"in window&&window.ontouchstart!=null;a.svg=!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect;for(c=0;c<f.length;c++)e=document.createElement(f[c]);a.supportsMediaTag=typeof e.canPlayType!=="undefined"||a.isBustedAndroid;
|
26 |
+
try{e.canPlayType("video/mp4")}catch(g){a.supportsMediaTag=false}a.hasSemiNativeFullScreen=typeof e.webkitEnterFullscreen!=="undefined";a.hasWebkitNativeFullScreen=typeof e.webkitRequestFullScreen!=="undefined";a.hasMozNativeFullScreen=typeof e.mozRequestFullScreen!=="undefined";a.hasTrueNativeFullScreen=a.hasWebkitNativeFullScreen||a.hasMozNativeFullScreen;a.nativeFullScreenEnabled=a.hasTrueNativeFullScreen;if(a.hasMozNativeFullScreen)a.nativeFullScreenEnabled=e.mozFullScreenEnabled;if(this.isChrome)a.hasSemiNativeFullScreen=
|
27 |
+
false;if(a.hasTrueNativeFullScreen){a.fullScreenEventName=a.hasWebkitNativeFullScreen?"webkitfullscreenchange":"mozfullscreenchange";a.isFullScreen=function(){if(e.mozRequestFullScreen)return b.mozFullScreen;else if(e.webkitRequestFullScreen)return b.webkitIsFullScreen};a.requestFullScreen=function(h){if(a.hasWebkitNativeFullScreen)h.webkitRequestFullScreen();else a.hasMozNativeFullScreen&&h.mozRequestFullScreen()};a.cancelFullScreen=function(){if(a.hasWebkitNativeFullScreen)document.webkitCancelFullScreen();
|
28 |
+
else a.hasMozNativeFullScreen&&document.mozCancelFullScreen()}}if(a.hasSemiNativeFullScreen&&d.match(/mac os x 10_5/i)){a.hasNativeFullScreen=false;a.hasSemiNativeFullScreen=false}}};mejs.MediaFeatures.init();
|
29 |
+
mejs.HtmlMediaElement={pluginType:"native",isFullScreen:false,setCurrentTime:function(a){this.currentTime=a},setMuted:function(a){this.muted=a},setVolume:function(a){this.volume=a},stop:function(){this.pause()},setSrc:function(a){for(var b=this.getElementsByTagName("source");b.length>0;)this.removeChild(b[0]);if(typeof a=="string")this.src=a;else{var c;for(b=0;b<a.length;b++){c=a[b];if(this.canPlayType(c.type)){this.src=c.src;break}}}},setVideoSize:function(a,b){this.width=a;this.height=b}};
|
30 |
+
mejs.PluginMediaElement=function(a,b,c){this.id=a;this.pluginType=b;this.src=c;this.events={};this.attributes={}};
|
31 |
mejs.PluginMediaElement.prototype={pluginElement:null,pluginType:"",isFullScreen:false,playbackRate:-1,defaultPlaybackRate:-1,seekable:[],played:[],paused:true,ended:false,seeking:false,duration:0,error:null,tagName:"",muted:false,volume:1,currentTime:0,play:function(){if(this.pluginApi!=null){this.pluginType=="youtube"?this.pluginApi.playVideo():this.pluginApi.playMedia();this.paused=false}},load:function(){if(this.pluginApi!=null){this.pluginType!="youtube"&&this.pluginApi.loadMedia();this.paused=
|
32 |
+
false}},pause:function(){if(this.pluginApi!=null){this.pluginType=="youtube"?this.pluginApi.pauseVideo():this.pluginApi.pauseMedia();this.paused=true}},stop:function(){if(this.pluginApi!=null){this.pluginType=="youtube"?this.pluginApi.stopVideo():this.pluginApi.stopMedia();this.paused=true}},canPlayType:function(a){var b,c,d,e=mejs.plugins[this.pluginType];for(b=0;b<e.length;b++){d=e[b];if(mejs.PluginDetector.hasPluginVersion(this.pluginType,d.version))for(c=0;c<d.types.length;c++)if(a==d.types[c])return"probably"}return""},
|
33 |
+
positionFullscreenButton:function(a,b,c){this.pluginApi!=null&&this.pluginApi.positionFullscreenButton&&this.pluginApi.positionFullscreenButton(Math.floor(a),Math.floor(b),c)},hideFullscreenButton:function(){this.pluginApi!=null&&this.pluginApi.hideFullscreenButton&&this.pluginApi.hideFullscreenButton()},setSrc:function(a){if(typeof a=="string"){this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(a));this.src=mejs.Utility.absolutizeUrl(a)}else{var b,c;for(b=0;b<a.length;b++){c=a[b];if(this.canPlayType(c.type)){this.pluginApi.setSrc(mejs.Utility.absolutizeUrl(c.src));
|
34 |
+
this.src=mejs.Utility.absolutizeUrl(a);break}}}},setCurrentTime:function(a){if(this.pluginApi!=null){this.pluginType=="youtube"?this.pluginApi.seekTo(a):this.pluginApi.setCurrentTime(a);this.currentTime=a}},setVolume:function(a){if(this.pluginApi!=null){this.pluginType=="youtube"?this.pluginApi.setVolume(a*100):this.pluginApi.setVolume(a);this.volume=a}},setMuted:function(a){if(this.pluginApi!=null){if(this.pluginType=="youtube"){a?this.pluginApi.mute():this.pluginApi.unMute();this.muted=a;this.dispatchEvent("volumechange")}else this.pluginApi.setMuted(a);
|
35 |
this.muted=a}},setVideoSize:function(a,b){if(this.pluginElement.style){this.pluginElement.style.width=a+"px";this.pluginElement.style.height=b+"px"}this.pluginApi!=null&&this.pluginApi.setVideoSize&&this.pluginApi.setVideoSize(a,b)},setFullscreen:function(a){this.pluginApi!=null&&this.pluginApi.setFullscreen&&this.pluginApi.setFullscreen(a)},enterFullScreen:function(){this.pluginApi!=null&&this.pluginApi.setFullscreen&&this.setFullscreen(true)},exitFullScreen:function(){this.pluginApi!=null&&this.pluginApi.setFullscreen&&
|
36 |
+
this.setFullscreen(false)},addEventListener:function(a,b){this.events[a]=this.events[a]||[];this.events[a].push(b)},removeEventListener:function(a,b){if(!a){this.events={};return true}var c=this.events[a];if(!c)return true;if(!b){this.events[a]=[];return true}for(i=0;i<c.length;i++)if(c[i]===b){this.events[a].splice(i,1);return true}return false},dispatchEvent:function(a){var b,c,d=this.events[a];if(d){c=Array.prototype.slice.call(arguments,1);for(b=0;b<d.length;b++)d[b].apply(null,c)}},hasAttribute:function(a){return a in
|
37 |
+
this.attributes},removeAttribute:function(a){delete this.attributes[a]},getAttribute:function(a){if(this.hasAttribute(a))return this.attributes[a];return""},setAttribute:function(a,b){this.attributes[a]=b},remove:function(){mejs.Utility.removeSwf(this.pluginElement.id);mejs.MediaPluginBridge.unregisterPluginElement(this.pluginElement.id)}};
|
38 |
+
mejs.MediaPluginBridge={pluginMediaElements:{},htmlMediaElements:{},registerPluginElement:function(a,b,c){this.pluginMediaElements[a]=b;this.htmlMediaElements[a]=c},unregisterPluginElement:function(a){delete this.pluginMediaElements[a];delete this.htmlMediaElements[a]},initPlugin:function(a){var b=this.pluginMediaElements[a],c=this.htmlMediaElements[a];if(b){switch(b.pluginType){case "flash":b.pluginElement=b.pluginApi=document.getElementById(a);break;case "silverlight":b.pluginElement=document.getElementById(b.id);
|
39 |
+
b.pluginApi=b.pluginElement.Content.MediaElementJS}b.pluginApi!=null&&b.success&&b.success(b,c)}},fireEvent:function(a,b,c){var d,e;if(a=this.pluginMediaElements[a]){b={type:b,target:a};for(d in c){a[d]=c[d];b[d]=c[d]}e=c.bufferedTime||0;b.target.buffered=b.buffered={start:function(){return 0},end:function(){return e},length:1};a.dispatchEvent(b.type,b)}}};
|
40 |
+
mejs.MediaElementDefaults={mode:"auto",plugins:["flash","silverlight","youtube","vimeo"],enablePluginDebug:false,httpsBasicAuthSite:false,type:"",pluginPath:mejs.Utility.getScriptPath(["mediaelement.js","mediaelement.min.js","mediaelement-and-player.js","mediaelement-and-player.min.js"]),flashName:"flashmediaelement.swf",flashStreamer:"",enablePluginSmoothing:false,enablePseudoStreaming:false,pseudoStreamingStartQueryParam:"start",silverlightName:"silverlightmediaelement.xap",defaultVideoWidth:480,
|
41 |
+
defaultVideoHeight:270,pluginWidth:-1,pluginHeight:-1,pluginVars:[],timerRate:250,startVolume:0.8,success:function(){},error:function(){}};mejs.MediaElement=function(a,b){return mejs.HtmlMediaElementShim.create(a,b)};
|
42 |
+
mejs.HtmlMediaElementShim={create:function(a,b){var c=mejs.MediaElementDefaults,d=typeof a=="string"?document.getElementById(a):a,e=d.tagName.toLowerCase(),f=e==="audio"||e==="video",g=f?d.getAttribute("src"):d.getAttribute("href");e=d.getAttribute("poster");var h=d.getAttribute("autoplay"),l=d.getAttribute("preload"),j=d.getAttribute("controls"),k;for(k in b)c[k]=b[k];g=typeof g=="undefined"||g===null||g==""?null:g;e=typeof e=="undefined"||e===null?"":e;l=typeof l=="undefined"||l===null||l==="false"?
|
43 |
+
"none":l;h=!(typeof h=="undefined"||h===null||h==="false");j=!(typeof j=="undefined"||j===null||j==="false");k=this.determinePlayback(d,c,mejs.MediaFeatures.supportsMediaTag,f,g);k.url=k.url!==null?mejs.Utility.absolutizeUrl(k.url):"";if(k.method=="native"){if(mejs.MediaFeatures.isBustedAndroid){d.src=k.url;d.addEventListener("click",function(){d.play()},false)}return this.updateNative(k,c,h,l)}else if(k.method!=="")return this.createPlugin(k,c,e,h,l,j);else{this.createErrorMessage(k,c,e);return this}},
|
44 |
+
determinePlayback:function(a,b,c,d,e){var f=[],g,h,l,j={method:"",url:"",htmlMediaElement:a,isVideo:a.tagName.toLowerCase()!="audio"},k;if(typeof b.type!="undefined"&&b.type!=="")if(typeof b.type=="string")f.push({type:b.type,url:e});else for(g=0;g<b.type.length;g++)f.push({type:b.type[g],url:e});else if(e!==null){l=this.formatType(e,a.getAttribute("type"));f.push({type:l,url:e})}else for(g=0;g<a.childNodes.length;g++){h=a.childNodes[g];if(h.nodeType==1&&h.tagName.toLowerCase()=="source"){e=h.getAttribute("src");
|
45 |
+
l=this.formatType(e,h.getAttribute("type"));h=h.getAttribute("media");if(!h||!window.matchMedia||window.matchMedia&&window.matchMedia(h).matches)f.push({type:l,url:e})}}if(!d&&f.length>0&&f[0].url!==null&&this.getTypeFromFile(f[0].url).indexOf("audio")>-1)j.isVideo=false;if(mejs.MediaFeatures.isBustedAndroid)a.canPlayType=function(m){return m.match(/video\/(mp4|m4v)/gi)!==null?"maybe":""};if(c&&(b.mode==="auto"||b.mode==="auto_plugin"||b.mode==="native")&&!(mejs.MediaFeatures.isBustedNativeHTTPS&&
|
46 |
+
b.httpsBasicAuthSite===true)){if(!d){g=document.createElement(j.isVideo?"video":"audio");a.parentNode.insertBefore(g,a);a.style.display="none";j.htmlMediaElement=a=g}for(g=0;g<f.length;g++)if(a.canPlayType(f[g].type).replace(/no/,"")!==""||a.canPlayType(f[g].type.replace(/mp3/,"mpeg")).replace(/no/,"")!==""){j.method="native";j.url=f[g].url;break}if(j.method==="native"){if(j.url!==null)a.src=j.url;if(b.mode!=="auto_plugin")return j}}if(b.mode==="auto"||b.mode==="auto_plugin"||b.mode==="shim")for(g=
|
47 |
+
0;g<f.length;g++){l=f[g].type;for(a=0;a<b.plugins.length;a++){e=b.plugins[a];h=mejs.plugins[e];for(c=0;c<h.length;c++){k=h[c];if(k.version==null||mejs.PluginDetector.hasPluginVersion(e,k.version))for(d=0;d<k.types.length;d++)if(l==k.types[d]){j.method=e;j.url=f[g].url;return j}}}}if(b.mode==="auto_plugin"&&j.method==="native")return j;if(j.method===""&&f.length>0)j.url=f[0].url;return j},formatType:function(a,b){return a&&!b?this.getTypeFromFile(a):b&&~b.indexOf(";")?b.substr(0,b.indexOf(";")):b},
|
48 |
+
getTypeFromFile:function(a){a=a.split("?")[0];a=a.substring(a.lastIndexOf(".")+1).toLowerCase();return(/(mp4|m4v|ogg|ogv|webm|webmv|flv|wmv|mpeg|mov)/gi.test(a)?"video":"audio")+"/"+this.getTypeFromExtension(a)},getTypeFromExtension:function(a){switch(a){case "mp4":case "m4v":return"mp4";case "webm":case "webma":case "webmv":return"webm";case "ogg":case "oga":case "ogv":return"ogg";default:return a}},createErrorMessage:function(a,b,c){var d=a.htmlMediaElement,e=document.createElement("div");e.className=
|
49 |
+
"me-cannotplay";try{e.style.width=d.width+"px";e.style.height=d.height+"px"}catch(f){}e.innerHTML=b.customError?b.customError:c!==""?'<a href="'+a.url+'"><img src="'+c+'" width="100%" height="100%" /></a>':'<a href="'+a.url+'"><span>'+mejs.i18n.t("Download File")+"</span></a>";d.parentNode.insertBefore(e,d);d.style.display="none";b.error(d)},createPlugin:function(a,b,c,d,e,f){c=a.htmlMediaElement;var g=1,h=1,l="me_"+a.method+"_"+mejs.meIndex++,j=new mejs.PluginMediaElement(l,a.method,a.url),k=document.createElement("div"),
|
50 |
+
m;j.tagName=c.tagName;for(m=0;m<c.attributes.length;m++){var n=c.attributes[m];n.specified==true&&j.setAttribute(n.name,n.value)}for(m=c.parentNode;m!==null&&m.tagName.toLowerCase()!="body";){if(m.parentNode.tagName.toLowerCase()=="p"){m.parentNode.parentNode.insertBefore(m,m.parentNode);break}m=m.parentNode}if(a.isVideo){g=b.pluginWidth>0?b.pluginWidth:b.videoWidth>0?b.videoWidth:c.getAttribute("width")!==null?c.getAttribute("width"):b.defaultVideoWidth;h=b.pluginHeight>0?b.pluginHeight:b.videoHeight>
|
51 |
+
0?b.videoHeight:c.getAttribute("height")!==null?c.getAttribute("height"):b.defaultVideoHeight;g=mejs.Utility.encodeUrl(g);h=mejs.Utility.encodeUrl(h)}else if(b.enablePluginDebug){g=320;h=240}j.success=b.success;mejs.MediaPluginBridge.registerPluginElement(l,j,c);k.className="me-plugin";k.id=l+"_container";a.isVideo?c.parentNode.insertBefore(k,c):document.body.insertBefore(k,document.body.childNodes[0]);d=["id="+l,"isvideo="+(a.isVideo?"true":"false"),"autoplay="+(d?"true":"false"),"preload="+e,"width="+
|
52 |
+
g,"startvolume="+b.startVolume,"timerrate="+b.timerRate,"flashstreamer="+b.flashStreamer,"height="+h,"pseudostreamstart="+b.pseudoStreamingStartQueryParam];if(a.url!==null)a.method=="flash"?d.push("file="+mejs.Utility.encodeUrl(a.url)):d.push("file="+a.url);b.enablePluginDebug&&d.push("debug=true");b.enablePluginSmoothing&&d.push("smoothing=true");b.enablePseudoStreaming&&d.push("pseudostreaming=true");f&&d.push("controls=true");if(b.pluginVars)d=d.concat(b.pluginVars);switch(a.method){case "silverlight":k.innerHTML=
|
53 |
+
'<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" id="'+l+'" name="'+l+'" width="'+g+'" height="'+h+'" class="mejs-shim"><param name="initParams" value="'+d.join(",")+'" /><param name="windowless" value="true" /><param name="background" value="black" /><param name="minRuntimeVersion" value="3.0.0.0" /><param name="autoUpgrade" value="true" /><param name="source" value="'+b.pluginPath+b.silverlightName+'" /></object>';break;case "flash":if(mejs.MediaFeatures.isIE){a=
|
54 |
+
document.createElement("div");k.appendChild(a);a.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="'+l+'" width="'+g+'" height="'+h+'" class="mejs-shim"><param name="movie" value="'+b.pluginPath+b.flashName+"?x="+new Date+'" /><param name="flashvars" value="'+d.join("&")+'" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /></object>'}else k.innerHTML=
|
55 |
+
'<embed id="'+l+'" name="'+l+'" play="true" loop="false" quality="high" bgcolor="#000000" wmode="transparent" allowScriptAccess="always" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="//www.macromedia.com/go/getflashplayer" src="'+b.pluginPath+b.flashName+'" flashvars="'+d.join("&")+'" width="'+g+'" height="'+h+'" class="mejs-shim"></embed>';break;case "youtube":b=a.url.substr(a.url.lastIndexOf("=")+1);youtubeSettings={container:k,containerId:k.id,pluginMediaElement:j,pluginId:l,
|
56 |
+
videoId:b,height:h,width:g};mejs.PluginDetector.hasPluginVersion("flash",[10,0,0])?mejs.YouTubeApi.createFlash(youtubeSettings):mejs.YouTubeApi.enqueueIframe(youtubeSettings);break;case "vimeo":j.vimeoid=a.url.substr(a.url.lastIndexOf("/")+1);k.innerHTML='<iframe src="http://player.vimeo.com/video/'+j.vimeoid+'?portrait=0&byline=0&title=0" width="'+g+'" height="'+h+'" frameborder="0" class="mejs-shim"></iframe>'}c.style.display="none";c.removeAttribute("autoplay");return j},updateNative:function(a,
|
57 |
+
b){var c=a.htmlMediaElement,d;for(d in mejs.HtmlMediaElement)c[d]=mejs.HtmlMediaElement[d];b.success(c,c);return c}};
|
58 |
+
mejs.YouTubeApi={isIframeStarted:false,isIframeLoaded:false,loadIframeApi:function(){if(!this.isIframeStarted){var a=document.createElement("script");a.src="//www.youtube.com/player_api";var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b);this.isIframeStarted=true}},iframeQueue:[],enqueueIframe:function(a){if(this.isLoaded)this.createIframe(a);else{this.loadIframeApi();this.iframeQueue.push(a)}},createIframe:function(a){var b=a.pluginMediaElement,c=new YT.Player(a.containerId,
|
59 |
{height:a.height,width:a.width,videoId:a.videoId,playerVars:{controls:0},events:{onReady:function(){a.pluginMediaElement.pluginApi=c;mejs.MediaPluginBridge.initPlugin(a.pluginId);setInterval(function(){mejs.YouTubeApi.createEvent(c,b,"timeupdate")},250)},onStateChange:function(d){mejs.YouTubeApi.handleStateChange(d.data,c,b)}}})},createEvent:function(a,b,c){c={type:c,target:b};if(a&&a.getDuration){b.currentTime=c.currentTime=a.getCurrentTime();b.duration=c.duration=a.getDuration();c.paused=b.paused;
|
60 |
c.ended=b.ended;c.muted=a.isMuted();c.volume=a.getVolume()/100;c.bytesTotal=a.getVideoBytesTotal();c.bufferedBytes=a.getVideoBytesLoaded();var d=c.bufferedBytes/c.bytesTotal*c.duration;c.target.buffered=c.buffered={start:function(){return 0},end:function(){return d},length:1}}b.dispatchEvent(c.type,c)},iFrameReady:function(){for(this.isIframeLoaded=this.isLoaded=true;this.iframeQueue.length>0;)this.createIframe(this.iframeQueue.pop())},flashPlayers:{},createFlash:function(a){this.flashPlayers[a.pluginId]=
|
61 |
+
a;var b,c="//www.youtube.com/apiplayer?enablejsapi=1&playerapiid="+a.pluginId+"&version=3&autoplay=0&controls=0&modestbranding=1&loop=0";if(mejs.MediaFeatures.isIE){b=document.createElement("div");a.container.appendChild(b);b.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="//download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" id="'+a.pluginId+'" width="'+a.width+'" height="'+a.height+'" class="mejs-shim"><param name="movie" value="'+
|
62 |
+
c+'" /><param name="wmode" value="transparent" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /></object>'}else a.container.innerHTML='<object type="application/x-shockwave-flash" id="'+a.pluginId+'" data="'+c+'" width="'+a.width+'" height="'+a.height+'" style="visibility: visible; " class="mejs-shim"><param name="allowScriptAccess" value="always"><param name="wmode" value="transparent"></object>'},flashReady:function(a){var b=this.flashPlayers[a],c=
|
63 |
+
document.getElementById(a),d=b.pluginMediaElement;d.pluginApi=d.pluginElement=c;mejs.MediaPluginBridge.initPlugin(a);c.cueVideoById(b.videoId);a=b.containerId+"_callback";window[a]=function(e){mejs.YouTubeApi.handleStateChange(e,c,d)};c.addEventListener("onStateChange",a);setInterval(function(){mejs.YouTubeApi.createEvent(c,d,"timeupdate")},250)},handleStateChange:function(a,b,c){switch(a){case -1:c.paused=true;c.ended=true;mejs.YouTubeApi.createEvent(b,c,"loadedmetadata");break;case 0:c.paused=false;
|
64 |
+
c.ended=true;mejs.YouTubeApi.createEvent(b,c,"ended");break;case 1:c.paused=false;c.ended=false;mejs.YouTubeApi.createEvent(b,c,"play");mejs.YouTubeApi.createEvent(b,c,"playing");break;case 2:c.paused=true;c.ended=false;mejs.YouTubeApi.createEvent(b,c,"pause");break;case 3:mejs.YouTubeApi.createEvent(b,c,"progress")}}};function onYouTubePlayerAPIReady(){mejs.YouTubeApi.iFrameReady()}function onYouTubePlayerReady(a){mejs.YouTubeApi.flashReady(a)}window.mejs=mejs;window.MediaElement=mejs.MediaElement;
|
65 |
+
(function(a,b){var c={locale:{language:"",strings:{}},methods:{}};c.locale.getLanguage=function(){return c.locale.language||navigator.language};if(typeof mejsL10n!="undefined")c.locale.language=mejsL10n.language;c.locale.INIT_LANGUAGE=c.locale.getLanguage();c.methods.checkPlain=function(d){var e,f,g={"&":"&",'"':""","<":"<",">":">"};d=String(d);for(e in g)if(g.hasOwnProperty(e)){f=RegExp(e,"g");d=d.replace(f,g[e])}return d};c.methods.formatString=function(d,e){for(var f in e){switch(f.charAt(0)){case "@":e[f]=
|
66 |
+
c.methods.checkPlain(e[f]);break;case "!":break;default:e[f]='<em class="placeholder">'+c.methods.checkPlain(e[f])+"</em>"}d=d.replace(f,e[f])}return d};c.methods.t=function(d,e,f){if(c.locale.strings&&c.locale.strings[f.context]&&c.locale.strings[f.context][d])d=c.locale.strings[f.context][d];if(e)d=c.methods.formatString(d,e);return d};c.t=function(d,e,f){if(typeof d==="string"&&d.length>0){var g=c.locale.getLanguage();f=f||{context:g};return c.methods.t(d,e,f)}else throw{name:"InvalidArgumentException",
|
67 |
+
message:"First argument is either not a string or empty."};};b.i18n=c})(document,mejs);(function(a){if(typeof mejsL10n!="undefined")a[mejsL10n.language]=mejsL10n.strings})(mejs.i18n.locale.strings);(function(a){a.de={Fullscreen:"Vollbild","Go Fullscreen":"Vollbild an","Turn off Fullscreen":"Vollbild aus",Close:"Schlie\u00dfen"}})(mejs.i18n.locale.strings);
|
68 |
+
(function(a){a.zh={Fullscreen:"\u5168\u87a2\u5e55","Go Fullscreen":"\u5168\u5c4f\u6a21\u5f0f","Turn off Fullscreen":"\u9000\u51fa\u5168\u5c4f\u6a21\u5f0f",Close:"\u95dc\u9589"}})(mejs.i18n.locale.strings);
|
69 |
|
70 |
/*!
|
71 |
* MediaElementPlayer
|
74 |
* Creates a controller bar for HTML5 <video> add <audio> tags
|
75 |
* using jQuery and MediaElement.js (HTML5 Flash/Silverlight wrapper)
|
76 |
*
|
77 |
+
* Copyright 2010-2013, John Dyer (http://j.hn/)
|
78 |
+
* License: MIT
|
79 |
*
|
80 |
*/if(typeof jQuery!="undefined")mejs.$=jQuery;else if(typeof ender!="undefined")mejs.$=ender;
|
81 |
+
(function(f){mejs.MepDefaults={poster:"",showPosterWhenEnded:false,defaultVideoWidth:480,defaultVideoHeight:270,videoWidth:-1,videoHeight:-1,defaultAudioWidth:400,defaultAudioHeight:30,defaultSeekBackwardInterval:function(a){return a.duration*0.05},defaultSeekForwardInterval:function(a){return a.duration*0.05},audioWidth:-1,audioHeight:-1,startVolume:0.8,loop:false,autoRewind:true,enableAutosize:true,alwaysShowHours:false,showTimecodeFrameCount:false,framesPerSecond:25,autosizeProgress:true,alwaysShowControls:false,
|
82 |
+
hideVideoControlsOnLoad:false,clickToPlayPause:true,iPadUseNativeControls:false,iPhoneUseNativeControls:false,AndroidUseNativeControls:false,features:["playpause","current","progress","duration","tracks","volume","fullscreen"],isVideo:true,enableKeyboard:true,pauseOtherPlayers:true,keyActions:[{keys:[32,179],action:function(a,b){b.paused||b.ended?b.play():b.pause()}},{keys:[38],action:function(a,b){b.setVolume(Math.min(b.volume+0.1,1))}},{keys:[40],action:function(a,b){b.setVolume(Math.max(b.volume-
|
83 |
+
0.1,0))}},{keys:[37,227],action:function(a,b){if(!isNaN(b.duration)&&b.duration>0){if(a.isVideo){a.showControls();a.startControlsTimer()}var c=Math.max(b.currentTime-a.options.defaultSeekBackwardInterval(b),0);b.setCurrentTime(c)}}},{keys:[39,228],action:function(a,b){if(!isNaN(b.duration)&&b.duration>0){if(a.isVideo){a.showControls();a.startControlsTimer()}var c=Math.min(b.currentTime+a.options.defaultSeekForwardInterval(b),b.duration);b.setCurrentTime(c)}}},{keys:[70],action:function(a){if(typeof a.enterFullScreen!=
|
84 |
+
"undefined")a.isFullScreen?a.exitFullScreen():a.enterFullScreen()}}]};mejs.mepIndex=0;mejs.players={};mejs.MediaElementPlayer=function(a,b){if(!(this instanceof mejs.MediaElementPlayer))return new mejs.MediaElementPlayer(a,b);this.$media=this.$node=f(a);this.node=this.media=this.$media[0];if(typeof this.node.player!="undefined")return this.node.player;else this.node.player=this;if(typeof b=="undefined")b=this.$node.data("mejsoptions");this.options=f.extend({},mejs.MepDefaults,b);this.id="mep_"+mejs.mepIndex++;
|
85 |
+
mejs.players[this.id]=this;this.init();return this};mejs.MediaElementPlayer.prototype={hasFocus:false,controlsAreVisible:true,init:function(){var a=this,b=mejs.MediaFeatures,c=f.extend(true,{},a.options,{success:function(d,g){a.meReady(d,g)},error:function(d){a.handleError(d)}}),e=a.media.tagName.toLowerCase();a.isDynamic=e!=="audio"&&e!=="video";a.isVideo=a.isDynamic?a.options.isVideo:e!=="audio"&&a.options.isVideo;if(b.isiPad&&a.options.iPadUseNativeControls||b.isiPhone&&a.options.iPhoneUseNativeControls){a.$media.attr("controls",
|
86 |
+
"controls");if(b.isiPad&&a.media.getAttribute("autoplay")!==null){a.media.load();a.media.play()}}else if(!(b.isAndroid&&a.options.AndroidUseNativeControls)){a.$media.removeAttr("controls");a.container=f('<div id="'+a.id+'" class="mejs-container '+(mejs.MediaFeatures.svg?"svg":"no-svg")+'"><div class="mejs-inner"><div class="mejs-mediaelement"></div><div class="mejs-layers"></div><div class="mejs-controls"></div><div class="mejs-clear"></div></div></div>').addClass(a.$media[0].className).insertBefore(a.$media);
|
87 |
+
a.container.addClass((b.isAndroid?"mejs-android ":"")+(b.isiOS?"mejs-ios ":"")+(b.isiPad?"mejs-ipad ":"")+(b.isiPhone?"mejs-iphone ":"")+(a.isVideo?"mejs-video ":"mejs-audio "));if(b.isiOS){b=a.$media.clone();a.container.find(".mejs-mediaelement").append(b);a.$media.remove();a.$node=a.$media=b;a.node=a.media=b[0]}else a.container.find(".mejs-mediaelement").append(a.$media);a.controls=a.container.find(".mejs-controls");a.layers=a.container.find(".mejs-layers");b=a.isVideo?"video":"audio";e=b.substring(0,
|
88 |
+
1).toUpperCase()+b.substring(1);a.width=a.options[b+"Width"]>0||a.options[b+"Width"].toString().indexOf("%")>-1?a.options[b+"Width"]:a.media.style.width!==""&&a.media.style.width!==null?a.media.style.width:a.media.getAttribute("width")!==null?a.$media.attr("width"):a.options["default"+e+"Width"];a.height=a.options[b+"Height"]>0||a.options[b+"Height"].toString().indexOf("%")>-1?a.options[b+"Height"]:a.media.style.height!==""&&a.media.style.height!==null?a.media.style.height:a.$media[0].getAttribute("height")!==
|
89 |
+
null?a.$media.attr("height"):a.options["default"+e+"Height"];a.setPlayerSize(a.width,a.height);c.pluginWidth=a.width;c.pluginHeight=a.height}mejs.MediaElement(a.$media[0],c);typeof a.container!="undefined"&&a.controlsAreVisible&&a.container.trigger("controlsshown")},showControls:function(a){var b=this;a=typeof a=="undefined"||a;if(!b.controlsAreVisible){if(a){b.controls.css("visibility","visible").stop(true,true).fadeIn(200,function(){b.controlsAreVisible=true;b.container.trigger("controlsshown")});
|
90 |
+
b.container.find(".mejs-control").css("visibility","visible").stop(true,true).fadeIn(200,function(){b.controlsAreVisible=true})}else{b.controls.css("visibility","visible").css("display","block");b.container.find(".mejs-control").css("visibility","visible").css("display","block");b.controlsAreVisible=true;b.container.trigger("controlsshown")}b.setControlsSize()}},hideControls:function(a){var b=this;a=typeof a=="undefined"||a;if(!(!b.controlsAreVisible||b.options.alwaysShowControls))if(a){b.controls.stop(true,
|
91 |
+
true).fadeOut(200,function(){f(this).css("visibility","hidden").css("display","block");b.controlsAreVisible=false;b.container.trigger("controlshidden")});b.container.find(".mejs-control").stop(true,true).fadeOut(200,function(){f(this).css("visibility","hidden").css("display","block")})}else{b.controls.css("visibility","hidden").css("display","block");b.container.find(".mejs-control").css("visibility","hidden").css("display","block");b.controlsAreVisible=false;b.container.trigger("controlshidden")}},
|
92 |
+
controlsTimer:null,startControlsTimer:function(a){var b=this;a=typeof a!="undefined"?a:1500;b.killControlsTimer("start");b.controlsTimer=setTimeout(function(){b.hideControls();b.killControlsTimer("hide")},a)},killControlsTimer:function(){if(this.controlsTimer!==null){clearTimeout(this.controlsTimer);delete this.controlsTimer;this.controlsTimer=null}},controlsEnabled:true,disableControls:function(){this.killControlsTimer();this.hideControls(false);this.controlsEnabled=false},enableControls:function(){this.showControls(false);
|
93 |
+
this.controlsEnabled=true},meReady:function(a,b){var c=this,e=mejs.MediaFeatures,d=b.getAttribute("autoplay");d=!(typeof d=="undefined"||d===null||d==="false");var g;if(!c.created){c.created=true;c.media=a;c.domNode=b;if(!(e.isAndroid&&c.options.AndroidUseNativeControls)&&!(e.isiPad&&c.options.iPadUseNativeControls)&&!(e.isiPhone&&c.options.iPhoneUseNativeControls)){c.buildposter(c,c.controls,c.layers,c.media);c.buildkeyboard(c,c.controls,c.layers,c.media);c.buildoverlays(c,c.controls,c.layers,c.media);
|
94 |
+
c.findTracks();for(g in c.options.features){e=c.options.features[g];if(c["build"+e])try{c["build"+e](c,c.controls,c.layers,c.media)}catch(k){}}c.container.trigger("controlsready");c.setPlayerSize(c.width,c.height);c.setControlsSize();if(c.isVideo){if(mejs.MediaFeatures.hasTouch)c.$media.bind("touchstart",function(){if(c.controlsAreVisible)c.hideControls(false);else c.controlsEnabled&&c.showControls(false)});else{mejs.MediaElementPlayer.prototype.clickToPlayPauseCallback=function(){if(c.options.clickToPlayPause)c.media.paused?
|
95 |
+
c.media.play():c.media.pause()};c.media.addEventListener("click",c.clickToPlayPauseCallback,false);c.container.bind("mouseenter mouseover",function(){if(c.controlsEnabled)if(!c.options.alwaysShowControls){c.killControlsTimer("enter");c.showControls();c.startControlsTimer(2500)}}).bind("mousemove",function(){if(c.controlsEnabled){c.controlsAreVisible||c.showControls();c.options.alwaysShowControls||c.startControlsTimer(2500)}}).bind("mouseleave",function(){c.controlsEnabled&&!c.media.paused&&!c.options.alwaysShowControls&&
|
96 |
+
c.startControlsTimer(1E3)})}c.options.hideVideoControlsOnLoad&&c.hideControls(false);d&&!c.options.alwaysShowControls&&c.hideControls();c.options.enableAutosize&&c.media.addEventListener("loadedmetadata",function(j){if(c.options.videoHeight<=0&&c.domNode.getAttribute("height")===null&&!isNaN(j.target.videoHeight)){c.setPlayerSize(j.target.videoWidth,j.target.videoHeight);c.setControlsSize();c.media.setVideoSize(j.target.videoWidth,j.target.videoHeight)}},false)}a.addEventListener("play",function(){for(var j in mejs.players){var m=
|
97 |
+
mejs.players[j];m.id!=c.id&&c.options.pauseOtherPlayers&&!m.paused&&!m.ended&&m.pause();m.hasFocus=false}c.hasFocus=true},false);c.media.addEventListener("ended",function(){if(c.options.autoRewind)try{c.media.setCurrentTime(0)}catch(j){}c.media.pause();c.setProgressRail&&c.setProgressRail();c.setCurrentRail&&c.setCurrentRail();if(c.options.loop)c.media.play();else!c.options.alwaysShowControls&&c.controlsEnabled&&c.showControls()},false);c.media.addEventListener("loadedmetadata",function(){c.updateDuration&&
|
98 |
+
c.updateDuration();c.updateCurrent&&c.updateCurrent();if(!c.isFullScreen){c.setPlayerSize(c.width,c.height);c.setControlsSize()}},false);setTimeout(function(){c.setPlayerSize(c.width,c.height);c.setControlsSize()},50);c.globalBind("resize",function(){c.isFullScreen||mejs.MediaFeatures.hasTrueNativeFullScreen&&document.webkitIsFullScreen||c.setPlayerSize(c.width,c.height);c.setControlsSize()});c.media.pluginType=="youtube"&&c.container.find(".mejs-overlay-play").hide()}if(d&&a.pluginType=="native"){a.load();
|
99 |
+
a.play()}if(c.options.success)typeof c.options.success=="string"?window[c.options.success](c.media,c.domNode,c):c.options.success(c.media,c.domNode,c)}},handleError:function(a){this.controls.hide();this.options.error&&this.options.error(a)},setPlayerSize:function(a,b){if(typeof a!="undefined")this.width=a;if(typeof b!="undefined")this.height=b;if(this.height.toString().indexOf("%")>0||this.$node.css("max-width")==="100%"||parseInt(this.$node.css("max-width").replace(/px/,""),10)/this.$node.offsetParent().width()===
|
100 |
+
1||this.$node[0].currentStyle&&this.$node[0].currentStyle.maxWidth==="100%"){var c=this.isVideo?this.media.videoWidth&&this.media.videoWidth>0?this.media.videoWidth:this.options.defaultVideoWidth:this.options.defaultAudioWidth,e=this.isVideo?this.media.videoHeight&&this.media.videoHeight>0?this.media.videoHeight:this.options.defaultVideoHeight:this.options.defaultAudioHeight,d=this.container.parent().closest(":visible").width();c=this.isVideo||!this.options.autosizeProgress?parseInt(d*e/c,10):e;if(this.container.parent()[0].tagName.toLowerCase()===
|
101 |
+
"body"){d=f(window).width();c=f(window).height()}if(c!=0&&d!=0){this.container.width(d).height(c);this.$media.add(this.container.find(".mejs-shim")).width("100%").height("100%");this.isVideo&&this.media.setVideoSize&&this.media.setVideoSize(d,c);this.layers.children(".mejs-layer").width("100%").height("100%")}}else{this.container.width(this.width).height(this.height);this.layers.children(".mejs-layer").width(this.width).height(this.height)}d=this.layers.find(".mejs-overlay-play");c=d.find(".mejs-overlay-button");
|
102 |
+
d.height(this.container.height()-this.controls.height());c.css("margin-top","-"+(c.height()/2-this.controls.height()/2).toString()+"px")},setControlsSize:function(){var a=0,b=0,c=this.controls.find(".mejs-time-rail"),e=this.controls.find(".mejs-time-total");this.controls.find(".mejs-time-current");this.controls.find(".mejs-time-loaded");var d=c.siblings();if(this.options&&!this.options.autosizeProgress)b=parseInt(c.css("width"));if(b===0||!b){d.each(function(){var g=f(this);if(g.css("position")!=
|
103 |
+
"absolute"&&g.is(":visible"))a+=f(this).outerWidth(true)});b=this.controls.width()-a-(c.outerWidth(true)-c.width())}c.width(b);e.width(b-(e.outerWidth(true)-e.width()));this.setProgressRail&&this.setProgressRail();this.setCurrentRail&&this.setCurrentRail()},buildposter:function(a,b,c,e){var d=f('<div class="mejs-poster mejs-layer"></div>').appendTo(c);b=a.$media.attr("poster");if(a.options.poster!=="")b=a.options.poster;b!==""&&b!=null?this.setPoster(b):d.hide();e.addEventListener("play",function(){d.hide()},
|
104 |
+
false);a.options.showPosterWhenEnded&&a.options.autoRewind&&e.addEventListener("ended",function(){d.show()},false)},setPoster:function(a){var b=this.container.find(".mejs-poster"),c=b.find("img");if(c.length==0)c=f('<img width="100%" height="100%" />').appendTo(b);c.attr("src",a);b.css({"background-image":"url("+a+")"})},buildoverlays:function(a,b,c,e){var d=this;if(a.isVideo){var g=f('<div class="mejs-overlay mejs-layer"><div class="mejs-overlay-loading"><span></span></div></div>').hide().appendTo(c),
|
105 |
+
k=f('<div class="mejs-overlay mejs-layer"><div class="mejs-overlay-error"></div></div>').hide().appendTo(c),j=f('<div class="mejs-overlay mejs-layer mejs-overlay-play"><div class="mejs-overlay-button"></div></div>').appendTo(c).click(function(){if(d.options.clickToPlayPause)e.paused?e.play():e.pause()});e.addEventListener("play",function(){j.hide();g.hide();b.find(".mejs-time-buffering").hide();k.hide()},false);e.addEventListener("playing",function(){j.hide();g.hide();b.find(".mejs-time-buffering").hide();
|
106 |
+
k.hide()},false);e.addEventListener("seeking",function(){g.show();b.find(".mejs-time-buffering").show()},false);e.addEventListener("seeked",function(){g.hide();b.find(".mejs-time-buffering").hide()},false);e.addEventListener("pause",function(){mejs.MediaFeatures.isiPhone||j.show()},false);e.addEventListener("waiting",function(){g.show();b.find(".mejs-time-buffering").show()},false);e.addEventListener("loadeddata",function(){g.show();b.find(".mejs-time-buffering").show()},false);e.addEventListener("canplay",
|
107 |
+
function(){g.hide();b.find(".mejs-time-buffering").hide()},false);e.addEventListener("error",function(){g.hide();b.find(".mejs-time-buffering").hide();k.show();k.find("mejs-overlay-error").html("Error loading this resource")},false)}},buildkeyboard:function(a,b,c,e){this.globalBind("keydown",function(d){if(a.hasFocus&&a.options.enableKeyboard)for(var g=0,k=a.options.keyActions.length;g<k;g++)for(var j=a.options.keyActions[g],m=0,q=j.keys.length;m<q;m++)if(d.keyCode==j.keys[m]){d.preventDefault();
|
108 |
+
j.action(a,e,d.keyCode);return false}return true});this.globalBind("click",function(d){if(f(d.target).closest(".mejs-container").length==0)a.hasFocus=false})},findTracks:function(){var a=this,b=a.$media.find("track");a.tracks=[];b.each(function(c,e){e=f(e);a.tracks.push({srclang:e.attr("srclang")?e.attr("srclang").toLowerCase():"",src:e.attr("src"),kind:e.attr("kind"),label:e.attr("label")||"",entries:[],isLoaded:false})})},changeSkin:function(a){this.container[0].className="mejs-container "+a;this.setPlayerSize(this.width,
|
109 |
+
this.height);this.setControlsSize()},play:function(){this.media.play()},pause:function(){try{this.media.pause()}catch(a){}},load:function(){this.media.load()},setMuted:function(a){this.media.setMuted(a)},setCurrentTime:function(a){this.media.setCurrentTime(a)},getCurrentTime:function(){return this.media.currentTime},setVolume:function(a){this.media.setVolume(a)},getVolume:function(){return this.media.volume},setSrc:function(a){this.media.setSrc(a)},remove:function(){var a,b;for(a in this.options.features){b=
|
110 |
+
this.options.features[a];if(this["clean"+b])try{this["clean"+b](this)}catch(c){}}if(this.isDynamic)this.$node.insertBefore(this.container);else{this.$media.prop("controls",true);this.$node.clone().show().insertBefore(this.container);this.$node.remove()}this.media.pluginType!=="native"&&this.media.remove();delete mejs.players[this.id];this.container.remove();this.globalUnbind();delete this.node.player}};(function(){function a(c,e){var d={d:[],w:[]};f.each((c||"").split(" "),function(g,k){var j=k+"."+
|
111 |
+
e;if(j.indexOf(".")===0){d.d.push(j);d.w.push(j)}else d[b.test(k)?"w":"d"].push(j)});d.d=d.d.join(" ");d.w=d.w.join(" ");return d}var b=/^((after|before)print|(before)?unload|hashchange|message|o(ff|n)line|page(hide|show)|popstate|resize|storage)\b/;mejs.MediaElementPlayer.prototype.globalBind=function(c,e,d){c=a(c,this.id);c.d&&f(document).bind(c.d,e,d);c.w&&f(window).bind(c.w,e,d)};mejs.MediaElementPlayer.prototype.globalUnbind=function(c,e){c=a(c,this.id);c.d&&f(document).unbind(c.d,e);c.w&&f(window).unbind(c.w,
|
112 |
+
e)}})();if(typeof jQuery!="undefined")jQuery.fn.mediaelementplayer=function(a){a===false?this.each(function(){var b=jQuery(this).data("mediaelementplayer");b&&b.remove();jQuery(this).removeData("mediaelementplayer")}):this.each(function(){jQuery(this).data("mediaelementplayer",new mejs.MediaElementPlayer(this,a))});return this};f(document).ready(function(){f(".mejs-player").mediaelementplayer()});window.MediaElementPlayer=mejs.MediaElementPlayer})(mejs.$);
|
113 |
+
(function(f){f.extend(mejs.MepDefaults,{playpauseText:mejs.i18n.t("Play/Pause")});f.extend(MediaElementPlayer.prototype,{buildplaypause:function(a,b,c,e){var d=f('<div class="mejs-button mejs-playpause-button mejs-play" ><button type="button" aria-controls="'+this.id+'" title="'+this.options.playpauseText+'" aria-label="'+this.options.playpauseText+'"></button></div>').appendTo(b).click(function(g){g.preventDefault();e.paused?e.play():e.pause();return false});e.addEventListener("play",function(){d.removeClass("mejs-play").addClass("mejs-pause")},
|
114 |
+
false);e.addEventListener("playing",function(){d.removeClass("mejs-play").addClass("mejs-pause")},false);e.addEventListener("pause",function(){d.removeClass("mejs-pause").addClass("mejs-play")},false);e.addEventListener("paused",function(){d.removeClass("mejs-pause").addClass("mejs-play")},false)}})})(mejs.$);
|
115 |
+
(function(f){f.extend(mejs.MepDefaults,{stopText:"Stop"});f.extend(MediaElementPlayer.prototype,{buildstop:function(a,b,c,e){f('<div class="mejs-button mejs-stop-button mejs-stop"><button type="button" aria-controls="'+this.id+'" title="'+this.options.stopText+'" aria-label="'+this.options.stopText+'"></button></div>').appendTo(b).click(function(){e.paused||e.pause();if(e.currentTime>0){e.setCurrentTime(0);e.pause();b.find(".mejs-time-current").width("0px");b.find(".mejs-time-handle").css("left",
|
116 |
+
"0px");b.find(".mejs-time-float-current").html(mejs.Utility.secondsToTimeCode(0));b.find(".mejs-currenttime").html(mejs.Utility.secondsToTimeCode(0));c.find(".mejs-poster").show()}})}})})(mejs.$);
|
117 |
(function(f){f.extend(MediaElementPlayer.prototype,{buildprogress:function(a,b,c,e){f('<div class="mejs-time-rail"><span class="mejs-time-total"><span class="mejs-time-buffering"></span><span class="mejs-time-loaded"></span><span class="mejs-time-current"></span><span class="mejs-time-handle"></span><span class="mejs-time-float"><span class="mejs-time-float-current">00:00</span><span class="mejs-time-float-corner"></span></span></span></div>').appendTo(b);b.find(".mejs-time-buffering").hide();var d=
|
118 |
+
this,g=b.find(".mejs-time-total");c=b.find(".mejs-time-loaded");var k=b.find(".mejs-time-current"),j=b.find(".mejs-time-handle"),m=b.find(".mejs-time-float"),q=b.find(".mejs-time-float-current"),p=function(h){h=h.pageX;var l=g.offset(),r=g.outerWidth(true),n=0,o=n=0;if(e.duration){if(h<l.left)h=l.left;else if(h>r+l.left)h=r+l.left;o=h-l.left;n=o/r;n=n<=0.02?0:n*e.duration;t&&n!==e.currentTime&&e.setCurrentTime(n);if(!mejs.MediaFeatures.hasTouch){m.css("left",o);q.html(mejs.Utility.secondsToTimeCode(n));
|
119 |
+
m.show()}}},t=false;g.bind("mousedown",function(h){if(h.which===1){t=true;p(h);d.globalBind("mousemove.dur",function(l){p(l)});d.globalBind("mouseup.dur",function(){t=false;m.hide();d.globalUnbind(".dur")});return false}}).bind("mouseenter",function(){d.globalBind("mousemove.dur",function(h){p(h)});mejs.MediaFeatures.hasTouch||m.show()}).bind("mouseleave",function(){if(!t){d.globalUnbind(".dur");m.hide()}});e.addEventListener("progress",function(h){a.setProgressRail(h);a.setCurrentRail(h)},false);
|
120 |
+
e.addEventListener("timeupdate",function(h){a.setProgressRail(h);a.setCurrentRail(h)},false);d.loaded=c;d.total=g;d.current=k;d.handle=j},setProgressRail:function(a){var b=a!=undefined?a.target:this.media,c=null;if(b&&b.buffered&&b.buffered.length>0&&b.buffered.end&&b.duration)c=b.buffered.end(0)/b.duration;else if(b&&b.bytesTotal!=undefined&&b.bytesTotal>0&&b.bufferedBytes!=undefined)c=b.bufferedBytes/b.bytesTotal;else if(a&&a.lengthComputable&&a.total!=0)c=a.loaded/a.total;if(c!==null){c=Math.min(1,
|
121 |
+
Math.max(0,c));this.loaded&&this.total&&this.loaded.width(this.total.width()*c)}},setCurrentRail:function(){if(this.media.currentTime!=undefined&&this.media.duration)if(this.total&&this.handle){var a=Math.round(this.total.width()*this.media.currentTime/this.media.duration),b=a-Math.round(this.handle.outerWidth(true)/2);this.current.width(a);this.handle.css("left",b)}}})})(mejs.$);
|
122 |
+
(function(f){f.extend(mejs.MepDefaults,{duration:-1,timeAndDurationSeparator:"<span> | </span>"});f.extend(MediaElementPlayer.prototype,{buildcurrent:function(a,b,c,e){f('<div class="mejs-time"><span class="mejs-currenttime">'+(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00")+"</span></div>").appendTo(b);this.currenttime=this.controls.find(".mejs-currenttime");e.addEventListener("timeupdate",function(){a.updateCurrent()},false)},buildduration:function(a,b,
|
123 |
+
c,e){if(b.children().last().find(".mejs-currenttime").length>0)f(this.options.timeAndDurationSeparator+'<span class="mejs-duration">'+(this.options.duration>0?mejs.Utility.secondsToTimeCode(this.options.duration,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25):(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00"))+"</span>").appendTo(b.find(".mejs-time"));else{b.find(".mejs-currenttime").parent().addClass("mejs-currenttime-container");
|
124 |
f('<div class="mejs-time mejs-duration-container"><span class="mejs-duration">'+(this.options.duration>0?mejs.Utility.secondsToTimeCode(this.options.duration,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25):(a.options.alwaysShowHours?"00:":"")+(a.options.showTimecodeFrameCount?"00:00:00":"00:00"))+"</span></div>").appendTo(b)}this.durationD=this.controls.find(".mejs-duration");e.addEventListener("timeupdate",function(){a.updateDuration()},
|
125 |
+
false)},updateCurrent:function(){if(this.currenttime)this.currenttime.html(mejs.Utility.secondsToTimeCode(this.media.currentTime,this.options.alwaysShowHours||this.media.duration>3600,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25))},updateDuration:function(){this.container.toggleClass("mejs-long-video",this.media.duration>3600);if(this.durationD&&(this.options.duration>0||this.media.duration))this.durationD.html(mejs.Utility.secondsToTimeCode(this.options.duration>0?this.options.duration:
|
126 |
+
this.media.duration,this.options.alwaysShowHours,this.options.showTimecodeFrameCount,this.options.framesPerSecond||25))}})})(mejs.$);
|
127 |
+
(function(f){f.extend(mejs.MepDefaults,{muteText:mejs.i18n.t("Mute Toggle"),hideVolumeOnTouchDevices:true,audioVolume:"horizontal",videoVolume:"vertical"});f.extend(MediaElementPlayer.prototype,{buildvolume:function(a,b,c,e){if(!(mejs.MediaFeatures.hasTouch&&this.options.hideVolumeOnTouchDevices)){var d=this,g=d.isVideo?d.options.videoVolume:d.options.audioVolume,k=g=="horizontal"?f('<div class="mejs-button mejs-volume-button mejs-mute"><button type="button" aria-controls="'+d.id+'" title="'+d.options.muteText+
|
128 |
+
'" aria-label="'+d.options.muteText+'"></button></div><div class="mejs-horizontal-volume-slider"><div class="mejs-horizontal-volume-total"></div><div class="mejs-horizontal-volume-current"></div><div class="mejs-horizontal-volume-handle"></div></div>').appendTo(b):f('<div class="mejs-button mejs-volume-button mejs-mute"><button type="button" aria-controls="'+d.id+'" title="'+d.options.muteText+'" aria-label="'+d.options.muteText+'"></button><div class="mejs-volume-slider"><div class="mejs-volume-total"></div><div class="mejs-volume-current"></div><div class="mejs-volume-handle"></div></div></div>').appendTo(b),
|
129 |
+
j=d.container.find(".mejs-volume-slider, .mejs-horizontal-volume-slider"),m=d.container.find(".mejs-volume-total, .mejs-horizontal-volume-total"),q=d.container.find(".mejs-volume-current, .mejs-horizontal-volume-current"),p=d.container.find(".mejs-volume-handle, .mejs-horizontal-volume-handle"),t=function(n,o){if(!j.is(":visible")&&typeof o=="undefined"){j.show();t(n,true);j.hide()}else{n=Math.max(0,n);n=Math.min(n,1);n==0?k.removeClass("mejs-mute").addClass("mejs-unmute"):k.removeClass("mejs-unmute").addClass("mejs-mute");
|
130 |
+
if(g=="vertical"){var s=m.height(),u=m.position(),v=s-s*n;p.css("top",Math.round(u.top+v-p.height()/2));q.height(s-v);q.css("top",u.top+v)}else{s=m.width();u=m.position();s=s*n;p.css("left",Math.round(u.left+s-p.width()/2));q.width(Math.round(s))}}},h=function(n){var o=null,s=m.offset();if(g=="vertical"){o=m.height();parseInt(m.css("top").replace(/px/,""),10);o=(o-(n.pageY-s.top))/o;if(s.top==0||s.left==0)return}else{o=m.width();o=(n.pageX-s.left)/o}o=Math.max(0,o);o=Math.min(o,1);t(o);o==0?e.setMuted(true):
|
131 |
+
e.setMuted(false);e.setVolume(o)},l=false,r=false;k.hover(function(){j.show();r=true},function(){r=false;!l&&g=="vertical"&&j.hide()});j.bind("mouseover",function(){r=true}).bind("mousedown",function(n){h(n);d.globalBind("mousemove.vol",function(o){h(o)});d.globalBind("mouseup.vol",function(){l=false;d.globalUnbind(".vol");!r&&g=="vertical"&&j.hide()});l=true;return false});k.find("button").click(function(){e.setMuted(!e.muted)});e.addEventListener("volumechange",function(){if(!l)if(e.muted){t(0);
|
132 |
+
k.removeClass("mejs-mute").addClass("mejs-unmute")}else{t(e.volume);k.removeClass("mejs-unmute").addClass("mejs-mute")}},false);if(d.container.is(":visible")){t(a.options.startVolume);a.options.startVolume===0&&e.setMuted(true);e.pluginType==="native"&&e.setVolume(a.options.startVolume)}}}})})(mejs.$);
|
133 |
+
(function(f){f.extend(mejs.MepDefaults,{usePluginFullScreen:true,newWindowCallback:function(){return""},fullscreenText:mejs.i18n.t("Fullscreen")});f.extend(MediaElementPlayer.prototype,{isFullScreen:false,isNativeFullScreen:false,isInIframe:false,buildfullscreen:function(a,b,c,e){if(a.isVideo){a.isInIframe=window.location!=window.parent.location;if(mejs.MediaFeatures.hasTrueNativeFullScreen){c=function(){if(a.isFullScreen)if(mejs.MediaFeatures.isFullScreen()){a.isNativeFullScreen=true;a.setControlsSize()}else{a.isNativeFullScreen=
|
134 |
+
false;a.exitFullScreen()}};mejs.MediaFeatures.hasMozNativeFullScreen?a.globalBind(mejs.MediaFeatures.fullScreenEventName,c):a.container.bind(mejs.MediaFeatures.fullScreenEventName,c)}var d=this,g=f('<div class="mejs-button mejs-fullscreen-button"><button type="button" aria-controls="'+d.id+'" title="'+d.options.fullscreenText+'" aria-label="'+d.options.fullscreenText+'"></button></div>').appendTo(b);if(d.media.pluginType==="native"||!d.options.usePluginFullScreen&&!mejs.MediaFeatures.isFirefox)g.click(function(){mejs.MediaFeatures.hasTrueNativeFullScreen&&
|
135 |
+
mejs.MediaFeatures.isFullScreen()||a.isFullScreen?a.exitFullScreen():a.enterFullScreen()});else{var k=null;if(function(){var h=document.createElement("x"),l=document.documentElement,r=window.getComputedStyle;if(!("pointerEvents"in h.style))return false;h.style.pointerEvents="auto";h.style.pointerEvents="x";l.appendChild(h);r=r&&r(h,"").pointerEvents==="auto";l.removeChild(h);return!!r}()&&!mejs.MediaFeatures.isOpera){var j=false,m=function(){if(j){for(var h in q)q[h].hide();g.css("pointer-events",
|
136 |
+
"");d.controls.css("pointer-events","");d.media.removeEventListener("click",d.clickToPlayPauseCallback);j=false}},q={};b=["top","left","right","bottom"];var p,t=function(){var h=g.offset().left-d.container.offset().left,l=g.offset().top-d.container.offset().top,r=g.outerWidth(true),n=g.outerHeight(true),o=d.container.width(),s=d.container.height();for(p in q)q[p].css({position:"absolute",top:0,left:0});q.top.width(o).height(l);q.left.width(h).height(n).css({top:l});q.right.width(o-h-r).height(n).css({top:l,
|
137 |
+
left:h+r});q.bottom.width(o).height(s-n-l).css({top:l+n})};d.globalBind("resize",function(){t()});p=0;for(c=b.length;p<c;p++)q[b[p]]=f('<div class="mejs-fullscreen-hover" />').appendTo(d.container).mouseover(m).hide();g.on("mouseover",function(){if(!d.isFullScreen){var h=g.offset(),l=a.container.offset();e.positionFullscreenButton(h.left-l.left,h.top-l.top,false);g.css("pointer-events","none");d.controls.css("pointer-events","none");d.media.addEventListener("click",d.clickToPlayPauseCallback);for(p in q)q[p].show();
|
138 |
+
t();j=true}});e.addEventListener("fullscreenchange",function(){d.isFullScreen=!d.isFullScreen;d.isFullScreen?d.media.removeEventListener("click",d.clickToPlayPauseCallback):d.media.addEventListener("click",d.clickToPlayPauseCallback);m()});d.globalBind("mousemove",function(h){if(j){var l=g.offset();if(h.pageY<l.top||h.pageY>l.top+g.outerHeight(true)||h.pageX<l.left||h.pageX>l.left+g.outerWidth(true)){g.css("pointer-events","");d.controls.css("pointer-events","");j=false}}})}else g.on("mouseover",
|
139 |
+
function(){if(k!==null){clearTimeout(k);delete k}var h=g.offset(),l=a.container.offset();e.positionFullscreenButton(h.left-l.left,h.top-l.top,true)}).on("mouseout",function(){if(k!==null){clearTimeout(k);delete k}k=setTimeout(function(){e.hideFullscreenButton()},1500)})}a.fullscreenBtn=g;d.globalBind("keydown",function(h){if((mejs.MediaFeatures.hasTrueNativeFullScreen&&mejs.MediaFeatures.isFullScreen()||d.isFullScreen)&&h.keyCode==27)a.exitFullScreen()})}},cleanfullscreen:function(a){a.exitFullScreen()},
|
140 |
+
containerSizeTimeout:null,enterFullScreen:function(){var a=this;if(!(a.media.pluginType!=="native"&&(mejs.MediaFeatures.isFirefox||a.options.usePluginFullScreen))){f(document.documentElement).addClass("mejs-fullscreen");normalHeight=a.container.height();normalWidth=a.container.width();if(a.media.pluginType==="native")if(mejs.MediaFeatures.hasTrueNativeFullScreen){mejs.MediaFeatures.requestFullScreen(a.container[0]);a.isInIframe&&setTimeout(function c(){if(a.isNativeFullScreen)f(window).width()!==
|
141 |
+
screen.width?a.exitFullScreen():setTimeout(c,500)},500)}else if(mejs.MediaFeatures.hasSemiNativeFullScreen){a.media.webkitEnterFullscreen();return}if(a.isInIframe){var b=a.options.newWindowCallback(this);if(b!=="")if(mejs.MediaFeatures.hasTrueNativeFullScreen)setTimeout(function(){if(!a.isNativeFullScreen){a.pause();window.open(b,a.id,"top=0,left=0,width="+screen.availWidth+",height="+screen.availHeight+",resizable=yes,scrollbars=no,status=no,toolbar=no")}},250);else{a.pause();window.open(b,a.id,
|
142 |
+
"top=0,left=0,width="+screen.availWidth+",height="+screen.availHeight+",resizable=yes,scrollbars=no,status=no,toolbar=no");return}}a.container.addClass("mejs-container-fullscreen").width("100%").height("100%");a.containerSizeTimeout=setTimeout(function(){a.container.css({width:"100%",height:"100%"});a.setControlsSize()},500);if(a.media.pluginType==="native")a.$media.width("100%").height("100%");else{a.container.find(".mejs-shim").width("100%").height("100%");a.media.setVideoSize(f(window).width(),
|
143 |
+
f(window).height())}a.layers.children("div").width("100%").height("100%");a.fullscreenBtn&&a.fullscreenBtn.removeClass("mejs-fullscreen").addClass("mejs-unfullscreen");a.setControlsSize();a.isFullScreen=true}},exitFullScreen:function(){clearTimeout(this.containerSizeTimeout);if(this.media.pluginType!=="native"&&mejs.MediaFeatures.isFirefox)this.media.setFullscreen(false);else{if(mejs.MediaFeatures.hasTrueNativeFullScreen&&(mejs.MediaFeatures.isFullScreen()||this.isFullScreen))mejs.MediaFeatures.cancelFullScreen();
|
144 |
+
f(document.documentElement).removeClass("mejs-fullscreen");this.container.removeClass("mejs-container-fullscreen").width(normalWidth).height(normalHeight);if(this.media.pluginType==="native")this.$media.width(normalWidth).height(normalHeight);else{this.container.find(".mejs-shim").width(normalWidth).height(normalHeight);this.media.setVideoSize(normalWidth,normalHeight)}this.layers.children("div").width(normalWidth).height(normalHeight);this.fullscreenBtn.removeClass("mejs-unfullscreen").addClass("mejs-fullscreen");
|
145 |
+
this.setControlsSize();this.isFullScreen=false}}})})(mejs.$);
|
146 |
+
(function(f){f.extend(mejs.MepDefaults,{startLanguage:"",tracksText:mejs.i18n.t("Captions/Subtitles"),hideCaptionsButtonWhenEmpty:true,toggleCaptionsButtonWhenOnlyOne:false,slidesSelector:""});f.extend(MediaElementPlayer.prototype,{hasChapters:false,buildtracks:function(a,b,c,e){if(a.tracks.length!=0){var d;if(this.domNode.textTracks)for(d=this.domNode.textTracks.length-1;d>=0;d--)this.domNode.textTracks[d].mode="hidden";a.chapters=f('<div class="mejs-chapters mejs-layer"></div>').prependTo(c).hide();a.captions=
|
147 |
+
f('<div class="mejs-captions-layer mejs-layer"><div class="mejs-captions-position mejs-captions-position-hover"><span class="mejs-captions-text"></span></div></div>').prependTo(c).hide();a.captionsText=a.captions.find(".mejs-captions-text");a.captionsButton=f('<div class="mejs-button mejs-captions-button"><button type="button" aria-controls="'+this.id+'" title="'+this.options.tracksText+'" aria-label="'+this.options.tracksText+'"></button><div class="mejs-captions-selector"><ul><li><input type="radio" name="'+
|
148 |
+
a.id+'_captions" id="'+a.id+'_captions_none" value="none" checked="checked" /><label for="'+a.id+'_captions_none">'+mejs.i18n.t("None")+"</label></li></ul></div></div>").appendTo(b);for(d=b=0;d<a.tracks.length;d++)a.tracks[d].kind=="subtitles"&&b++;this.options.toggleCaptionsButtonWhenOnlyOne&&b==1?a.captionsButton.on("click",function(){a.setTrack(a.selectedTrack==null?a.tracks[0].srclang:"none")}):a.captionsButton.hover(function(){f(this).find(".mejs-captions-selector").css("visibility","visible")},
|
149 |
+
function(){f(this).find(".mejs-captions-selector").css("visibility","hidden")}).on("click","input[type=radio]",function(){lang=this.value;a.setTrack(lang)});a.options.alwaysShowControls?a.container.find(".mejs-captions-position").addClass("mejs-captions-position-hover"):a.container.bind("controlsshown",function(){a.container.find(".mejs-captions-position").addClass("mejs-captions-position-hover")}).bind("controlshidden",function(){e.paused||a.container.find(".mejs-captions-position").removeClass("mejs-captions-position-hover")});
|
150 |
+
a.trackToLoad=-1;a.selectedTrack=null;a.isLoadingTrack=false;for(d=0;d<a.tracks.length;d++)a.tracks[d].kind=="subtitles"&&a.addTrackButton(a.tracks[d].srclang,a.tracks[d].label);a.loadNextTrack();e.addEventListener("timeupdate",function(){a.displayCaptions()},false);if(a.options.slidesSelector!=""){a.slidesContainer=f(a.options.slidesSelector);e.addEventListener("timeupdate",function(){a.displaySlides()},false)}e.addEventListener("loadedmetadata",function(){a.displayChapters()},false);a.container.hover(function(){if(a.hasChapters){a.chapters.css("visibility",
|
151 |
+
"visible");a.chapters.fadeIn(200).height(a.chapters.find(".mejs-chapter").outerHeight())}},function(){a.hasChapters&&!e.paused&&a.chapters.fadeOut(200,function(){f(this).css("visibility","hidden");f(this).css("display","block")})});a.node.getAttribute("autoplay")!==null&&a.chapters.css("visibility","hidden")}},setTrack:function(a){var b;if(a=="none"){this.selectedTrack=null;this.captionsButton.removeClass("mejs-captions-enabled")}else for(b=0;b<this.tracks.length;b++)if(this.tracks[b].srclang==a){this.selectedTrack==
|
152 |
+
null&&this.captionsButton.addClass("mejs-captions-enabled");this.selectedTrack=this.tracks[b];this.captions.attr("lang",this.selectedTrack.srclang);this.displayCaptions();break}},loadNextTrack:function(){this.trackToLoad++;if(this.trackToLoad<this.tracks.length){this.isLoadingTrack=true;this.loadTrack(this.trackToLoad)}else{this.isLoadingTrack=false;this.checkForTracks()}},loadTrack:function(a){var b=this,c=b.tracks[a];f.ajax({url:c.src,dataType:"text",success:function(e){c.entries=typeof e=="string"&&
|
153 |
+
/<tt\s+xml/ig.exec(e)?mejs.TrackFormatParser.dfxp.parse(e):mejs.TrackFormatParser.webvvt.parse(e);c.isLoaded=true;b.enableTrackButton(c.srclang,c.label);b.loadNextTrack();c.kind=="chapters"&&b.media.addEventListener("play",function(){b.media.duration>0&&b.displayChapters(c)},false);c.kind=="slides"&&b.setupSlides(c)},error:function(){b.loadNextTrack()}})},enableTrackButton:function(a,b){if(b==="")b=mejs.language.codes[a]||a;this.captionsButton.find("input[value="+a+"]").prop("disabled",false).siblings("label").html(b);
|
154 |
+
this.options.startLanguage==a&&f("#"+this.id+"_captions_"+a).click();this.adjustLanguageBox()},addTrackButton:function(a,b){if(b==="")b=mejs.language.codes[a]||a;this.captionsButton.find("ul").append(f('<li><input type="radio" name="'+this.id+'_captions" id="'+this.id+"_captions_"+a+'" value="'+a+'" disabled="disabled" /><label for="'+this.id+"_captions_"+a+'">'+b+" (loading)</label></li>"));this.adjustLanguageBox();this.container.find(".mejs-captions-translations option[value="+a+"]").remove()},
|
155 |
+
adjustLanguageBox:function(){this.captionsButton.find(".mejs-captions-selector").height(this.captionsButton.find(".mejs-captions-selector ul").outerHeight(true)+this.captionsButton.find(".mejs-captions-translations").outerHeight(true))},checkForTracks:function(){var a=false;if(this.options.hideCaptionsButtonWhenEmpty){for(i=0;i<this.tracks.length;i++)if(this.tracks[i].kind=="subtitles"){a=true;break}if(!a){this.captionsButton.hide();this.setControlsSize()}}},displayCaptions:function(){if(typeof this.tracks!=
|
156 |
+
"undefined"){var a,b=this.selectedTrack;if(b!=null&&b.isLoaded)for(a=0;a<b.entries.times.length;a++)if(this.media.currentTime>=b.entries.times[a].start&&this.media.currentTime<=b.entries.times[a].stop){this.captionsText.html(b.entries.text[a]);this.captions.show().height(0);return}this.captions.hide()}},setupSlides:function(a){this.slides=a;this.slides.entries.imgs=[this.slides.entries.text.length];this.showSlide(0)},showSlide:function(a){if(!(typeof this.tracks=="undefined"||typeof this.slidesContainer==
|
157 |
+
"undefined")){var b=this,c=b.slides.entries.text[a],e=b.slides.entries.imgs[a];if(typeof e=="undefined"||typeof e.fadeIn=="undefined")b.slides.entries.imgs[a]=e=f('<img src="'+c+'">').on("load",function(){e.appendTo(b.slidesContainer).hide().fadeIn().siblings(":visible").fadeOut()});else!e.is(":visible")&&!e.is(":animated")&&e.fadeIn().siblings(":visible").fadeOut()}},displaySlides:function(){if(typeof this.slides!="undefined"){var a=this.slides,b;for(b=0;b<a.entries.times.length;b++)if(this.media.currentTime>=
|
158 |
+
a.entries.times[b].start&&this.media.currentTime<=a.entries.times[b].stop){this.showSlide(b);break}}},displayChapters:function(){var a;for(a=0;a<this.tracks.length;a++)if(this.tracks[a].kind=="chapters"&&this.tracks[a].isLoaded){this.drawChapters(this.tracks[a]);this.hasChapters=true;break}},drawChapters:function(a){var b=this,c,e,d=e=0;b.chapters.empty();for(c=0;c<a.entries.times.length;c++){e=a.entries.times[c].stop-a.entries.times[c].start;e=Math.floor(e/b.media.duration*100);if(e+d>100||c==a.entries.times.length-
|
159 |
+
1&&e+d<100)e=100-d;b.chapters.append(f('<div class="mejs-chapter" rel="'+a.entries.times[c].start+'" style="left: '+d.toString()+"%;width: "+e.toString()+'%;"><div class="mejs-chapter-block'+(c==a.entries.times.length-1?" mejs-chapter-block-last":"")+'"><span class="ch-title">'+a.entries.text[c]+'</span><span class="ch-time">'+mejs.Utility.secondsToTimeCode(a.entries.times[c].start)+"–"+mejs.Utility.secondsToTimeCode(a.entries.times[c].stop)+"</span></div></div>"));d+=e}b.chapters.find("div.mejs-chapter").click(function(){b.media.setCurrentTime(parseFloat(f(this).attr("rel")));
|
160 |
b.media.paused&&b.media.play()});b.chapters.show()}});mejs.language={codes:{af:"Afrikaans",sq:"Albanian",ar:"Arabic",be:"Belarusian",bg:"Bulgarian",ca:"Catalan",zh:"Chinese","zh-cn":"Chinese Simplified","zh-tw":"Chinese Traditional",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch",en:"English",et:"Estonian",tl:"Filipino",fi:"Finnish",fr:"French",gl:"Galician",de:"German",el:"Greek",ht:"Haitian Creole",iw:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",ga:"Irish",it:"Italian",ja:"Japanese",
|
161 |
ko:"Korean",lv:"Latvian",lt:"Lithuanian",mk:"Macedonian",ms:"Malay",mt:"Maltese",no:"Norwegian",fa:"Persian",pl:"Polish",pt:"Portuguese",ro:"Romanian",ru:"Russian",sr:"Serbian",sk:"Slovak",sl:"Slovenian",es:"Spanish",sw:"Swahili",sv:"Swedish",tl:"Tagalog",th:"Thai",tr:"Turkish",uk:"Ukrainian",vi:"Vietnamese",cy:"Welsh",yi:"Yiddish"}};mejs.TrackFormatParser={webvvt:{pattern_identifier:/^([a-zA-z]+-)?[0-9]+$/,pattern_timecode:/^([0-9]{2}:[0-9]{2}:[0-9]{2}([,.][0-9]{1,3})?) --\> ([0-9]{2}:[0-9]{2}:[0-9]{2}([,.][0-9]{3})?)(.*)$/,
|
162 |
parse:function(a){var b=0;a=mejs.TrackFormatParser.split2(a,/\r?\n/);for(var c={text:[],times:[]},e,d;b<a.length;b++)if(this.pattern_identifier.exec(a[b])){b++;if((e=this.pattern_timecode.exec(a[b]))&&b<a.length){b++;d=a[b];for(b++;a[b]!==""&&b<a.length;){d=d+"\n"+a[b];b++}d=f.trim(d).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig,"<a href='$1' target='_blank'>$1</a>");c.text.push(d);c.times.push({start:mejs.Utility.convertSMPTEtoSeconds(e[1])==0?0.2:mejs.Utility.convertSMPTEtoSeconds(e[1]),
|
163 |
stop:mejs.Utility.convertSMPTEtoSeconds(e[3]),settings:e[5]})}}return c}},dfxp:{parse:function(a){a=f(a).filter("tt");var b=0;b=a.children("div").eq(0);var c=b.find("p");b=a.find("#"+b.attr("style"));var e,d;a={text:[],times:[]};if(b.length){d=b.removeAttr("id").get(0).attributes;if(d.length){e={};for(b=0;b<d.length;b++)e[d[b].name.split(":")[1]]=d[b].value}}for(b=0;b<c.length;b++){var g;d={start:null,stop:null,style:null};if(c.eq(b).attr("begin"))d.start=mejs.Utility.convertSMPTEtoSeconds(c.eq(b).attr("begin"));
|
164 |
if(!d.start&&c.eq(b-1).attr("end"))d.start=mejs.Utility.convertSMPTEtoSeconds(c.eq(b-1).attr("end"));if(c.eq(b).attr("end"))d.stop=mejs.Utility.convertSMPTEtoSeconds(c.eq(b).attr("end"));if(!d.stop&&c.eq(b+1).attr("begin"))d.stop=mejs.Utility.convertSMPTEtoSeconds(c.eq(b+1).attr("begin"));if(e){g="";for(var k in e)g+=k+":"+e[k]+";"}if(g)d.style=g;if(d.start==0)d.start=0.2;a.times.push(d);d=f.trim(c.eq(b).html()).replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig,
|
165 |
"<a href='$1' target='_blank'>$1</a>");a.text.push(d);if(a.times.start==0)a.times.start=2}return a}},split2:function(a,b){return a.split(b)}};if("x\n\ny".split(/\n/gi).length!=3)mejs.TrackFormatParser.split2=function(a,b){var c=[],e="",d;for(d=0;d<a.length;d++){e+=a.substring(d,d+1);if(b.test(e)){c.push(e.replace(b,""));e=""}}c.push(e);return c}})(mejs.$);
|
166 |
+
(function(f){f.extend(mejs.MepDefaults,{contextMenuItems:[{render:function(a){if(typeof a.enterFullScreen=="undefined")return null;return a.isFullScreen?mejs.i18n.t("Turn off Fullscreen"):mejs.i18n.t("Go Fullscreen")},click:function(a){a.isFullScreen?a.exitFullScreen():a.enterFullScreen()}},{render:function(a){return a.media.muted?mejs.i18n.t("Unmute"):mejs.i18n.t("Mute")},click:function(a){a.media.muted?a.setMuted(false):a.setMuted(true)}},{isSeparator:true},{render:function(){return mejs.i18n.t("Download Video")},
|
167 |
+
click:function(a){window.location.href=a.media.currentSrc}}]});f.extend(MediaElementPlayer.prototype,{buildcontextmenu:function(a){a.contextMenu=f('<div class="mejs-contextmenu"></div>').appendTo(f("body")).hide();a.container.bind("contextmenu",function(b){if(a.isContextMenuEnabled){b.preventDefault();a.renderContextMenu(b.clientX-1,b.clientY-1);return false}});a.container.bind("click",function(){a.contextMenu.hide()});a.contextMenu.bind("mouseleave",function(){a.startContextMenuTimer()})},cleancontextmenu:function(a){a.contextMenu.remove()},
|
168 |
+
isContextMenuEnabled:true,enableContextMenu:function(){this.isContextMenuEnabled=true},disableContextMenu:function(){this.isContextMenuEnabled=false},contextMenuTimeout:null,startContextMenuTimer:function(){var a=this;a.killContextMenuTimer();a.contextMenuTimer=setTimeout(function(){a.hideContextMenu();a.killContextMenuTimer()},750)},killContextMenuTimer:function(){var a=this.contextMenuTimer;if(a!=null){clearTimeout(a);delete a}},hideContextMenu:function(){this.contextMenu.hide()},renderContextMenu:function(a,
|
169 |
+
b){for(var c=this,e="",d=c.options.contextMenuItems,g=0,k=d.length;g<k;g++)if(d[g].isSeparator)e+='<div class="mejs-contextmenu-separator"></div>';else{var j=d[g].render(c);if(j!=null)e+='<div class="mejs-contextmenu-item" data-itemindex="'+g+'" id="element-'+Math.random()*1E6+'">'+j+"</div>"}c.contextMenu.empty().append(f(e)).css({top:b,left:a}).show();c.contextMenu.find(".mejs-contextmenu-item").each(function(){var m=f(this),q=parseInt(m.data("itemindex"),10),p=c.options.contextMenuItems[q];typeof p.show!=
|
170 |
+
"undefined"&&p.show(m,c);m.click(function(){typeof p.click!="undefined"&&p.click(c);c.contextMenu.hide()})});setTimeout(function(){c.killControlsTimer("rev3")},100)}})})(mejs.$);
|
171 |
+
(function(f){f.extend(mejs.MepDefaults,{postrollCloseText:mejs.i18n.t("Close")});f.extend(MediaElementPlayer.prototype,{buildpostroll:function(a,b,c){var e=this.container.find('link[rel="postroll"]').attr("href");if(typeof e!=="undefined"){a.postroll=f('<div class="mejs-postroll-layer mejs-layer"><a class="mejs-postroll-close" onclick="$(this).parent().hide();return false;">'+this.options.postrollCloseText+'</a><div class="mejs-postroll-layer-content"></div></div>').prependTo(c).hide();this.media.addEventListener("ended",
|
172 |
+
function(){f.ajax({dataType:"html",url:e,success:function(d){c.find(".mejs-postroll-layer-content").html(d)}});a.postroll.show()},false)}}})})(mejs.$);
|
173 |
|
lib/media-element/mediaelementplayer.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.mejs-container{position:relative;background:#000;font-family:Helvetica,Arial;text-align:left;vertical-align:top;text-indent:0;}.me-plugin{position:absolute;}.mejs-embed,.mejs-embed body{width:100%;height:100%;margin:0;padding:0;background:#000;overflow:hidden;}.mejs-container-fullscreen{position:fixed;left:0;top:0;right:0;bottom:0;overflow:hidden;z-index:1000;}.mejs-container-fullscreen .mejs-mediaelement,.mejs-container-fullscreen video{width:100%;height:100%;}.mejs-background{position:absolute;top:0;left:0;}.mejs-mediaelement{position:absolute;top:0;left:0;width:100%;height:100%;}.mejs-poster{position:absolute;top:0;left:0;}.mejs-poster img{border:0;padding:0;border:0;display:block;}.mejs-overlay{position:absolute;top:0;left:0;}.mejs-overlay-play{cursor:pointer;}.mejs-overlay-button{position:absolute;top:50%;left:50%;width:100px;height:100px;margin:-50px 0 0 -50px;background:url(bigplay.png) no-repeat;}.mejs-overlay:hover .mejs-overlay-button{background-position:0 -100px;}.mejs-overlay-loading{position:absolute;top:50%;left:50%;width:80px;height:80px;margin:-40px 0 0 -40px;background:#333;background:url(background.png);background:rgba(0,0,0,0.9);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(50,50,50,0.9)),to(rgba(0,0,0,0.9)));background:-webkit-linear-gradient(top,rgba(50,50,50,0.9),rgba(0,0,0,0.9));background:-moz-linear-gradient(top,rgba(50,50,50,0.9),rgba(0,0,0,0.9));background:-o-linear-gradient(top,rgba(50,50,50,0.9),rgba(0,0,0,0.9));background:-ms-linear-gradient(top,rgba(50,50,50,0.9),rgba(0,0,0,0.9));background:linear-gradient(rgba(50,50,50,0.9),rgba(0,0,0,0.9));}.mejs-overlay-loading span{display:block;width:80px;height:80px;background:transparent url(loading.gif) 50% 50% no-repeat;}.mejs-container .mejs-controls{position:absolute;background:none;list-style-type:none;margin:0;padding:0;bottom:0;left:0;background:url(background.png);background:rgba(0,0,0,0.7);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(50,50,50,0.7)),to(rgba(0,0,0,0.7)));background:-webkit-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:-moz-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:-o-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:-ms-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:linear-gradient(rgba(50,50,50,0.7),rgba(0,0,0,0.7));height:30px;width:100%;}.mejs-container .mejs-controls div{list-style-type:none;background-image:none;display:block;float:left;margin:0;padding:0;width:26px;height:26px;font-size:11px;line-height:11px;background:0;font-family:Helvetica,Arial;border:0;}.mejs-controls .mejs-button button{cursor:pointer;display:block;font-size:0;line-height:0;text-decoration:none;margin:7px 5px;padding:0;position:absolute;height:16px;width:16px;border:0;background:transparent url(controls.png) no-repeat;}.mejs-controls .mejs-button button:focus{outline:solid 1px yellow;}.mejs-container .mejs-controls .mejs-time{color:#fff;display:block;height:17px;width:auto;padding:8px 3px 0 3px;overflow:hidden;text-align:center;padding:auto 4px;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;}.mejs-container .mejs-controls .mejs-time span{font-size:11px;color:#fff;line-height:12px;display:block;float:left;margin:1px 2px 0 0;width:auto;}.mejs-controls .mejs-play button{background-position:0 0;}.mejs-controls .mejs-pause button{background-position:0 -16px;}.mejs-controls .mejs-stop button{background-position:-112px 0;}.mejs-controls div.mejs-time-rail{width:200px;padding-top:5px;}.mejs-controls .mejs-time-rail span{display:block;position:absolute;width:180px;height:10px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;cursor:pointer;}.mejs-controls .mejs-time-rail .mejs-time-total{margin:5px;background:#333;background:rgba(50,50,50,0.8);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(30,30,30,0.8)),to(rgba(60,60,60,0.8)));background:-webkit-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:-moz-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:-o-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:-ms-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:linear-gradient(rgba(30,30,30,0.8),rgba(60,60,60,0.8));}.mejs-controls .mejs-time-rail .mejs-time-buffering{width:100%;background-image:-o-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-ms-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);-webkit-background-size:15px 15px;-moz-background-size:15px 15px;-o-background-size:15px 15px;background-size:15px 15px;-webkit-animation:buffering-stripes 2s linear infinite;-moz-animation:buffering-stripes 2s linear infinite;-ms-animation:buffering-stripes 2s linear infinite;-o-animation:buffering-stripes 2s linear infinite;animation:buffering-stripes 2s linear infinite;}@-webkit-keyframes buffering-stripes{from{background-position:0 0;}to{background-position:30px 0;}}@-moz-keyframes buffering-stripes{from{background-position:0 0;}to{background-position:30px 0;}}@-ms-keyframes buffering-stripes{from{background-position:0 0;}to{background-position:30px 0;}}@-o-keyframes buffering-stripes{from{background-position:0 0;}to{background-position:30px 0;}}@keyframes buffering-stripes{from{background-position:0 0;}to{background-position:30px 0;}}.mejs-controls .mejs-time-rail .mejs-time-loaded{background:#3caac8;background:rgba(60,170,200,0.8);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(44,124,145,0.8)),to(rgba(78,183,212,0.8)));background:-webkit-linear-gradient(top,rgba(44,124,145,0.8),rgba(78,183,212,0.8));background:-moz-linear-gradient(top,rgba(44,124,145,0.8),rgba(78,183,212,0.8));background:-o-linear-gradient(top,rgba(44,124,145,0.8),rgba(78,183,212,0.8));background:-ms-linear-gradient(top,rgba(44,124,145,0.8),rgba(78,183,212,0.8));background:linear-gradient(rgba(44,124,145,0.8),rgba(78,183,212,0.8));width:0;}.mejs-controls .mejs-time-rail .mejs-time-current{width:0;background:#fff;background:rgba(255,255,255,0.8);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(255,255,255,0.9)),to(rgba(200,200,200,0.8)));background:-webkit-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:-moz-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:-o-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:-ms-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:linear-gradient(rgba(255,255,255,0.9),rgba(200,200,200,0.8));}.mejs-controls .mejs-time-rail .mejs-time-handle{display:none;position:absolute;margin:0;width:10px;background:#fff;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;cursor:pointer;border:solid 2px #333;top:-2px;text-align:center;}.mejs-controls .mejs-time-rail .mejs-time-float{position:absolute;display:none;background:#eee;width:36px;height:17px;border:solid 1px #333;top:-26px;margin-left:-18px;text-align:center;color:#111;}.mejs-controls .mejs-time-rail .mejs-time-float-current{margin:2px;width:30px;display:block;text-align:center;left:0;}.mejs-controls .mejs-time-rail .mejs-time-float-corner{position:absolute;display:block;width:0;height:0;line-height:0;border:solid 5px #eee;border-color:#eee transparent transparent transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;top:15px;left:13px;}.mejs-controls .mejs-fullscreen-button button{background-position:-32px 0;}.mejs-controls .mejs-unfullscreen button{background-position:-32px -16px;}.mejs-controls .mejs-mute button{background-position:-16px -16px;}.mejs-controls .mejs-unmute button{background-position:-16px 0;}.mejs-controls .mejs-volume-button{position:relative;}.mejs-controls .mejs-volume-button .mejs-volume-slider{display:none;height:115px;width:25px;background:url(background.png);background:rgba(50,50,50,0.7);-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;top:-115px;left:0;z-index:1;position:absolute;margin:0;}.mejs-controls .mejs-volume-button:hover{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px;}.mejs-controls .mejs-volume-button .mejs-volume-slider .mejs-volume-total{position:absolute;left:11px;top:8px;width:2px;height:100px;background:#ddd;background:rgba(255,255,255,0.5);margin:0;}.mejs-controls .mejs-volume-button .mejs-volume-slider .mejs-volume-current{position:absolute;left:11px;top:8px;width:2px;height:100px;background:#ddd;background:rgba(255,255,255,0.9);margin:0;}.mejs-controls .mejs-volume-button .mejs-volume-slider .mejs-volume-handle{position:absolute;left:4px;top:-3px;width:16px;height:6px;background:#ddd;background:rgba(255,255,255,0.9);cursor:N-resize;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;margin:0;}.mejs-controls div.mejs-horizontal-volume-slider{height:26px;width:60px;position:relative;}.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-total{position:absolute;left:0;top:11px;width:50px;height:8px;margin:0;padding:0;font-size:1px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;background:#333;background:rgba(50,50,50,0.8);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(30,30,30,0.8)),to(rgba(60,60,60,0.8)));background:-webkit-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:-moz-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:-o-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:-ms-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:linear-gradient(rgba(30,30,30,0.8),rgba(60,60,60,0.8));}.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-current{position:absolute;left:0;top:11px;width:50px;height:8px;margin:0;padding:0;font-size:1px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;background:#fff;background:rgba(255,255,255,0.8);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(255,255,255,0.9)),to(rgba(200,200,200,0.8)));background:-webkit-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:-moz-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:-o-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:-ms-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:linear-gradient(rgba(255,255,255,0.9),rgba(200,200,200,0.8));}.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-handle{display:none;}.mejs-controls .mejs-captions-button{position:relative;}.mejs-controls .mejs-captions-button button{background-position:-48px 0;}.mejs-controls .mejs-captions-button .mejs-captions-selector{visibility:hidden;position:absolute;bottom:26px;right:-10px;width:130px;height:100px;background:url(background.png);background:rgba(50,50,50,0.7);border:solid 1px transparent;padding:10px;overflow:hidden;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}.mejs-controls .mejs-captions-button .mejs-captions-selector ul{margin:0;padding:0;display:block;list-style-type:none!important;overflow:hidden;}.mejs-controls .mejs-captions-button .mejs-captions-selector ul li{margin:0 0 6px 0;padding:0;list-style-type:none!important;display:block;color:#fff;overflow:hidden;}.mejs-controls .mejs-captions-button .mejs-captions-selector ul li input{clear:both;float:left;margin:3px 3px 0 5px;}.mejs-controls .mejs-captions-button .mejs-captions-selector ul li label{width:100px;float:left;padding:4px 0 0 0;line-height:15px;font-family:helvetica,arial;font-size:10px;}.mejs-controls .mejs-captions-button .mejs-captions-translations{font-size:10px;margin:0 0 5px 0;}.mejs-chapters{position:absolute;top:0;left:0;-xborder-right:solid 1px #fff;width:10000px;z-index:1;}.mejs-chapters .mejs-chapter{position:absolute;float:left;background:#222;background:rgba(0,0,0,0.7);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(50,50,50,0.7)),to(rgba(0,0,0,0.7)));background:-webkit-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:-moz-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:-o-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:-ms-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:linear-gradient(rgba(50,50,50,0.7),rgba(0,0,0,0.7));filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,startColorstr=#323232,endColorstr=#000000);overflow:hidden;border:0;}.mejs-chapters .mejs-chapter .mejs-chapter-block{font-size:11px;color:#fff;padding:5px;display:block;border-right:solid 1px #333;border-bottom:solid 1px #333;cursor:pointer;}.mejs-chapters .mejs-chapter .mejs-chapter-block-last{border-right:none;}.mejs-chapters .mejs-chapter .mejs-chapter-block:hover{background:#666;background:rgba(102,102,102,0.7);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(102,102,102,0.7)),to(rgba(50,50,50,0.6)));background:-webkit-linear-gradient(top,rgba(102,102,102,0.7),rgba(50,50,50,0.6));background:-moz-linear-gradient(top,rgba(102,102,102,0.7),rgba(50,50,50,0.6));background:-o-linear-gradient(top,rgba(102,102,102,0.7),rgba(50,50,50,0.6));background:-ms-linear-gradient(top,rgba(102,102,102,0.7),rgba(50,50,50,0.6));background:linear-gradient(rgba(102,102,102,0.7),rgba(50,50,50,0.6));filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,startColorstr=#666666,endColorstr=#323232);}.mejs-chapters .mejs-chapter .mejs-chapter-block .ch-title{font-size:12px;font-weight:bold;display:block;white-space:nowrap;text-overflow:ellipsis;margin:0 0 3px 0;line-height:12px;}.mejs-chapters .mejs-chapter .mejs-chapter-block .ch-timespan{font-size:12px;line-height:12px;margin:3px 0 4px 0;display:block;white-space:nowrap;text-overflow:ellipsis;}.mejs-captions-layer{position:absolute;bottom:0;left:0;text-align:center;line-height:22px;font-size:12px;color:#fff;}.mejs-captions-layer a{color:#fff;text-decoration:underline;}.mejs-captions-layer[lang=ar]{font-size:20px;font-weight:normal;}.mejs-captions-position{position:absolute;width:100%;bottom:15px;left:0;}.mejs-captions-position-hover{bottom:45px;}.mejs-captions-text{padding:3px 5px;background:url(background.png);background:rgba(20,20,20,0.8);}.mejs-clear{clear:both;}.me-cannotplay a{color:#fff;font-weight:bold;}.me-cannotplay span{padding:15px;display:block;}.mejs-controls .mejs-loop-off button{background-position:-64px -16px;}.mejs-controls .mejs-loop-on button{background-position:-64px 0;}.mejs-controls .mejs-backlight-off button{background-position:-80px -16px;}.mejs-controls .mejs-backlight-on button{background-position:-80px 0;}.mejs-controls .mejs-picturecontrols-button{background-position:-96px 0;}.mejs-contextmenu{position:absolute;width:150px;padding:10px;border-radius:4px;top:0;left:0;background:#fff;border:solid 1px #999;z-index:1001;}.mejs-contextmenu .mejs-contextmenu-separator{height:1px;font-size:0;margin:5px 6px;background:#333;}.mejs-contextmenu .mejs-contextmenu-item{font-family:Helvetica,Arial;font-size:12px;padding:4px 6px;cursor:pointer;color:#333;}.mejs-contextmenu .mejs-contextmenu-item:hover{background:#2C7C91;color:#fff;}.mejs-controls .mejs-sourcechooser-button{position:relative;}.mejs-controls .mejs-sourcechooser-button button{background-position:-128px 0;}.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector{visibility:hidden;position:absolute;bottom:26px;right:-10px;width:130px;height:100px;background:url(background.png);background:rgba(50,50,50,0.7);border:solid 1px transparent;padding:10px;overflow:hidden;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul{margin:0;padding:0;display:block;list-style-type:none!important;overflow:hidden;}.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul li{margin:0 0 6px 0;padding:0;list-style-type:none!important;display:block;color:#fff;overflow:hidden;}.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul li input{clear:both;float:left;margin:3px 3px 0 5px;}.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul li label{width:100px;float:left;padding:4px 0 0 0;line-height:15px;font-family:helvetica,arial;font-size:10px;}
|
1 |
+
.mejs-container{position:relative;background:#000;font-family:Helvetica,Arial;text-align:left;vertical-align:top;text-indent:0;}.me-plugin{position:absolute;}.mejs-embed,.mejs-embed body{width:100%;height:100%;margin:0;padding:0;background:#000;overflow:hidden;}.mejs-fullscreen{overflow:hidden!important;}.mejs-container-fullscreen{position:fixed;left:0;top:0;right:0;bottom:0;overflow:hidden;z-index:1000;}.mejs-container-fullscreen .mejs-mediaelement,.mejs-container-fullscreen video{width:100%;height:100%;}.mejs-clear{clear:both;}.mejs-background{position:absolute;top:0;left:0;}.mejs-mediaelement{position:absolute;top:0;left:0;width:100%;height:100%;}.mejs-poster{position:absolute;top:0;left:0;background-size:contain;background-position:50% 50%;background-repeat:no-repeat;}:root .mejs-poster img{display:none;}.mejs-poster img{border:0;padding:0;border:0;}.mejs-overlay{position:absolute;top:0;left:0;}.mejs-overlay-play{cursor:pointer;}.mejs-overlay-button{position:absolute;top:50%;left:50%;width:100px;height:100px;margin:-50px 0 0 -50px;background:url(bigplay.svg) no-repeat;}.no-svg .mejs-overlay-button{background-image:url(bigplay.png);}.mejs-overlay:hover .mejs-overlay-button{background-position:0 -100px;}.mejs-overlay-loading{position:absolute;top:50%;left:50%;width:80px;height:80px;margin:-40px 0 0 -40px;background:#333;background:url(background.png);background:rgba(0,0,0,0.9);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(50,50,50,0.9)),to(rgba(0,0,0,0.9)));background:-webkit-linear-gradient(top,rgba(50,50,50,0.9),rgba(0,0,0,0.9));background:-moz-linear-gradient(top,rgba(50,50,50,0.9),rgba(0,0,0,0.9));background:-o-linear-gradient(top,rgba(50,50,50,0.9),rgba(0,0,0,0.9));background:-ms-linear-gradient(top,rgba(50,50,50,0.9),rgba(0,0,0,0.9));background:linear-gradient(rgba(50,50,50,0.9),rgba(0,0,0,0.9));}.mejs-overlay-loading span{display:block;width:80px;height:80px;background:transparent url(loading.gif) 50% 50% no-repeat;}.mejs-container .mejs-controls{position:absolute;list-style-type:none;margin:0;padding:0;bottom:0;left:0;background:url(background.png);background:rgba(0,0,0,0.7);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(50,50,50,0.7)),to(rgba(0,0,0,0.7)));background:-webkit-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:-moz-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:-o-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:-ms-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:linear-gradient(rgba(50,50,50,0.7),rgba(0,0,0,0.7));height:30px;width:100%;}.mejs-container .mejs-controls div{list-style-type:none;background-image:none;display:block;float:left;margin:0;padding:0;width:26px;height:26px;font-size:11px;line-height:11px;font-family:Helvetica,Arial;border:0;}.mejs-controls .mejs-button button{cursor:pointer;display:block;font-size:0;line-height:0;text-decoration:none;margin:7px 5px;padding:0;position:absolute;height:16px;width:16px;border:0;background:transparent url(controls.svg) no-repeat;}.no-svg .mejs-controls .mejs-button button{background-image:url(controls.png);}.mejs-controls .mejs-button button:focus{outline:solid 1px yellow;}.mejs-container .mejs-controls .mejs-time{color:#fff;display:block;height:17px;width:auto;padding:8px 3px 0 3px;overflow:hidden;text-align:center;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;}.mejs-container .mejs-controls .mejs-time span{color:#fff;font-size:11px;line-height:12px;display:block;float:left;margin:1px 2px 0 0;width:auto;}.mejs-controls .mejs-play button{background-position:0 0;}.mejs-controls .mejs-pause button{background-position:0 -16px;}.mejs-controls .mejs-stop button{background-position:-112px 0;}.mejs-controls div.mejs-time-rail{direction:ltr;width:200px;padding-top:5px;}.mejs-controls .mejs-time-rail span{display:block;position:absolute;width:180px;height:10px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;cursor:pointer;}.mejs-controls .mejs-time-rail .mejs-time-total{margin:5px;background:#333;background:rgba(50,50,50,0.8);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(30,30,30,0.8)),to(rgba(60,60,60,0.8)));background:-webkit-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:-moz-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:-o-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:-ms-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:linear-gradient(rgba(30,30,30,0.8),rgba(60,60,60,0.8));}.mejs-controls .mejs-time-rail .mejs-time-buffering{width:100%;background-image:-o-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-ms-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);-webkit-background-size:15px 15px;-moz-background-size:15px 15px;-o-background-size:15px 15px;background-size:15px 15px;-webkit-animation:buffering-stripes 2s linear infinite;-moz-animation:buffering-stripes 2s linear infinite;-ms-animation:buffering-stripes 2s linear infinite;-o-animation:buffering-stripes 2s linear infinite;animation:buffering-stripes 2s linear infinite;}@-webkit-keyframes buffering-stripes{from{background-position:0 0;}to{background-position:30px 0;}}@-moz-keyframes buffering-stripes{from{background-position:0 0;}to{background-position:30px 0;}}@-ms-keyframes buffering-stripes{from{background-position:0 0;}to{background-position:30px 0;}}@-o-keyframes buffering-stripes{from{background-position:0 0;}to{background-position:30px 0;}}@keyframes buffering-stripes{from{background-position:0 0;}to{background-position:30px 0;}}.mejs-controls .mejs-time-rail .mejs-time-loaded{background:#3caac8;background:rgba(60,170,200,0.8);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(44,124,145,0.8)),to(rgba(78,183,212,0.8)));background:-webkit-linear-gradient(top,rgba(44,124,145,0.8),rgba(78,183,212,0.8));background:-moz-linear-gradient(top,rgba(44,124,145,0.8),rgba(78,183,212,0.8));background:-o-linear-gradient(top,rgba(44,124,145,0.8),rgba(78,183,212,0.8));background:-ms-linear-gradient(top,rgba(44,124,145,0.8),rgba(78,183,212,0.8));background:linear-gradient(rgba(44,124,145,0.8),rgba(78,183,212,0.8));width:0;}.mejs-controls .mejs-time-rail .mejs-time-current{background:#fff;background:rgba(255,255,255,0.8);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(255,255,255,0.9)),to(rgba(200,200,200,0.8)));background:-webkit-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:-moz-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:-o-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:-ms-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:linear-gradient(rgba(255,255,255,0.9),rgba(200,200,200,0.8));width:0;}.mejs-controls .mejs-time-rail .mejs-time-handle{display:none;position:absolute;margin:0;width:10px;background:#fff;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;cursor:pointer;border:solid 2px #333;top:-2px;text-align:center;}.mejs-controls .mejs-time-rail .mejs-time-float{position:absolute;display:none;background:#eee;width:36px;height:17px;border:solid 1px #333;top:-26px;margin-left:-18px;text-align:center;color:#111;}.mejs-controls .mejs-time-rail .mejs-time-float-current{margin:2px;width:30px;display:block;text-align:center;left:0;}.mejs-controls .mejs-time-rail .mejs-time-float-corner{position:absolute;display:block;width:0;height:0;line-height:0;border:solid 5px #eee;border-color:#eee transparent transparent transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;top:15px;left:13px;}.mejs-long-video .mejs-controls .mejs-time-rail .mejs-time-float{width:48px;}.mejs-long-video .mejs-controls .mejs-time-rail .mejs-time-float-current{width:44px;}.mejs-long-video .mejs-controls .mejs-time-rail .mejs-time-float-corner{left:18px;}.mejs-controls .mejs-fullscreen-button button{background-position:-32px 0;}.mejs-controls .mejs-unfullscreen button{background-position:-32px -16px;}.mejs-controls .mejs-mute button{background-position:-16px -16px;}.mejs-controls .mejs-unmute button{background-position:-16px 0;}.mejs-controls .mejs-volume-button{position:relative;}.mejs-controls .mejs-volume-button .mejs-volume-slider{display:none;height:115px;width:25px;background:url(background.png);background:rgba(50,50,50,0.7);-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;top:-115px;left:0;z-index:1;position:absolute;margin:0;}.mejs-controls .mejs-volume-button:hover{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px;}.mejs-controls .mejs-volume-button .mejs-volume-slider .mejs-volume-total{position:absolute;left:11px;top:8px;width:2px;height:100px;background:#ddd;background:rgba(255,255,255,0.5);margin:0;}.mejs-controls .mejs-volume-button .mejs-volume-slider .mejs-volume-current{position:absolute;left:11px;top:8px;width:2px;height:100px;background:#ddd;background:rgba(255,255,255,0.9);margin:0;}.mejs-controls .mejs-volume-button .mejs-volume-slider .mejs-volume-handle{position:absolute;left:4px;top:-3px;width:16px;height:6px;background:#ddd;background:rgba(255,255,255,0.9);cursor:N-resize;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;margin:0;}.mejs-controls div.mejs-horizontal-volume-slider{height:26px;width:60px;position:relative;}.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-total{position:absolute;left:0;top:11px;width:50px;height:8px;margin:0;padding:0;font-size:1px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;background:#333;background:rgba(50,50,50,0.8);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(30,30,30,0.8)),to(rgba(60,60,60,0.8)));background:-webkit-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:-moz-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:-o-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:-ms-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:linear-gradient(rgba(30,30,30,0.8),rgba(60,60,60,0.8));}.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-current{position:absolute;left:0;top:11px;width:50px;height:8px;margin:0;padding:0;font-size:1px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;background:#fff;background:rgba(255,255,255,0.8);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(255,255,255,0.9)),to(rgba(200,200,200,0.8)));background:-webkit-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:-moz-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:-o-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:-ms-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:linear-gradient(rgba(255,255,255,0.9),rgba(200,200,200,0.8));}.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-handle{display:none;}.mejs-controls .mejs-captions-button{position:relative;}.mejs-controls .mejs-captions-button button{background-position:-48px 0;}.mejs-controls .mejs-captions-button .mejs-captions-selector{visibility:hidden;position:absolute;bottom:26px;right:-10px;width:130px;height:100px;background:url(background.png);background:rgba(50,50,50,0.7);border:solid 1px transparent;padding:10px;overflow:hidden;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}.mejs-controls .mejs-captions-button .mejs-captions-selector ul{margin:0;padding:0;display:block;list-style-type:none!important;overflow:hidden;}.mejs-controls .mejs-captions-button .mejs-captions-selector ul li{margin:0 0 6px 0;padding:0;list-style-type:none!important;display:block;color:#fff;overflow:hidden;}.mejs-controls .mejs-captions-button .mejs-captions-selector ul li input{clear:both;float:left;margin:3px 3px 0 5px;}.mejs-controls .mejs-captions-button .mejs-captions-selector ul li label{width:100px;float:left;padding:4px 0 0 0;line-height:15px;font-family:helvetica,arial;font-size:10px;}.mejs-controls .mejs-captions-button .mejs-captions-translations{font-size:10px;margin:0 0 5px 0;}.mejs-chapters{position:absolute;top:0;left:0;-xborder-right:solid 1px #fff;width:10000px;z-index:1;}.mejs-chapters .mejs-chapter{position:absolute;float:left;background:#222;background:rgba(0,0,0,0.7);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(50,50,50,0.7)),to(rgba(0,0,0,0.7)));background:-webkit-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:-moz-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:-o-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:-ms-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:linear-gradient(rgba(50,50,50,0.7),rgba(0,0,0,0.7));filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,startColorstr=#323232,endColorstr=#000000);overflow:hidden;border:0;}.mejs-chapters .mejs-chapter .mejs-chapter-block{font-size:11px;color:#fff;padding:5px;display:block;border-right:solid 1px #333;border-bottom:solid 1px #333;cursor:pointer;}.mejs-chapters .mejs-chapter .mejs-chapter-block-last{border-right:none;}.mejs-chapters .mejs-chapter .mejs-chapter-block:hover{background:#666;background:rgba(102,102,102,0.7);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(102,102,102,0.7)),to(rgba(50,50,50,0.6)));background:-webkit-linear-gradient(top,rgba(102,102,102,0.7),rgba(50,50,50,0.6));background:-moz-linear-gradient(top,rgba(102,102,102,0.7),rgba(50,50,50,0.6));background:-o-linear-gradient(top,rgba(102,102,102,0.7),rgba(50,50,50,0.6));background:-ms-linear-gradient(top,rgba(102,102,102,0.7),rgba(50,50,50,0.6));background:linear-gradient(rgba(102,102,102,0.7),rgba(50,50,50,0.6));filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,startColorstr=#666666,endColorstr=#323232);}.mejs-chapters .mejs-chapter .mejs-chapter-block .ch-title{font-size:12px;font-weight:bold;display:block;white-space:nowrap;text-overflow:ellipsis;margin:0 0 3px 0;line-height:12px;}.mejs-chapters .mejs-chapter .mejs-chapter-block .ch-timespan{font-size:12px;line-height:12px;margin:3px 0 4px 0;display:block;white-space:nowrap;text-overflow:ellipsis;}.mejs-captions-layer{position:absolute;bottom:0;left:0;text-align:center;line-height:22px;font-size:12px;color:#fff;}.mejs-captions-layer a{color:#fff;text-decoration:underline;}.mejs-captions-layer[lang=ar]{font-size:20px;font-weight:normal;}.mejs-captions-position{position:absolute;width:100%;bottom:15px;left:0;}.mejs-captions-position-hover{bottom:45px;}.mejs-captions-text{padding:3px 5px;background:url(background.png);background:rgba(20,20,20,0.8);}.me-cannotplay a{color:#fff;font-weight:bold;}.me-cannotplay span{padding:15px;display:block;}.mejs-controls .mejs-loop-off button{background-position:-64px -16px;}.mejs-controls .mejs-loop-on button{background-position:-64px 0;}.mejs-controls .mejs-backlight-off button{background-position:-80px -16px;}.mejs-controls .mejs-backlight-on button{background-position:-80px 0;}.mejs-controls .mejs-picturecontrols-button{background-position:-96px 0;}.mejs-contextmenu{position:absolute;width:150px;padding:10px;border-radius:4px;top:0;left:0;background:#fff;border:solid 1px #999;z-index:1001;}.mejs-contextmenu .mejs-contextmenu-separator{height:1px;font-size:0;margin:5px 6px;background:#333;}.mejs-contextmenu .mejs-contextmenu-item{font-family:Helvetica,Arial;font-size:12px;padding:4px 6px;cursor:pointer;color:#333;}.mejs-contextmenu .mejs-contextmenu-item:hover{background:#2C7C91;color:#fff;}.mejs-controls .mejs-sourcechooser-button{position:relative;}.mejs-controls .mejs-sourcechooser-button button{background-position:-128px 0;}.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector{visibility:hidden;position:absolute;bottom:26px;right:-10px;width:130px;height:100px;background:url(background.png);background:rgba(50,50,50,0.7);border:solid 1px transparent;padding:10px;overflow:hidden;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul{margin:0;padding:0;display:block;list-style-type:none!important;overflow:hidden;}.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul li{margin:0 0 6px 0;padding:0;list-style-type:none!important;display:block;color:#fff;overflow:hidden;}.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul li input{clear:both;float:left;margin:3px 3px 0 5px;}.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul li label{width:100px;float:left;padding:4px 0 0 0;line-height:15px;font-family:helvetica,arial;font-size:10px;}.mejs-postroll-layer{position:absolute;bottom:0;left:0;width:100%;height:100%;background:url(background.png);background:rgba(50,50,50,0.7);z-index:1000;overflow:hidden;}.mejs-postroll-layer-content{width:100%;height:100%;}.mejs-postroll-close{position:absolute;right:0;top:0;background:url(background.png);background:rgba(50,50,50,0.7);color:#fff;padding:4px;z-index:100;cursor:pointer;}
|
lib/media-element/wp-mediaelement.css
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.mejs-container, .mejs-embed, .mejs-embed body {
|
2 |
+
background: #464646;
|
3 |
+
}
|
4 |
+
|
5 |
+
.mejs-controls .mejs-time-rail .mejs-time-loaded {
|
6 |
+
background: #21759b;
|
7 |
+
}
|
8 |
+
|
9 |
+
.mejs-controls .mejs-time-rail .mejs-time-current {
|
10 |
+
background: #d54e21;
|
11 |
+
}
|
12 |
+
|
13 |
+
.me-cannotplay {
|
14 |
+
width: auto !important;
|
15 |
+
}
|
lib/media-element/wp-mediaelement.js
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function($) {
|
2 |
+
// add mime-type aliases to MediaElement plugin support
|
3 |
+
mejs.plugins.silverlight[0].types.push('video/x-ms-wmv');
|
4 |
+
mejs.plugins.silverlight[0].types.push('audio/x-ms-wma');
|
5 |
+
|
6 |
+
$(function() {
|
7 |
+
var settings = {};
|
8 |
+
|
9 |
+
if (typeof _wpmejsSettings !== 'undefined')
|
10 |
+
settings.pluginPath = _wpmejsSettings.pluginPath;
|
11 |
+
|
12 |
+
$('.wp-audio-shortcode, .wp-video-shortcode, .bp_media_content video').mediaelementplayer(settings);
|
13 |
+
});
|
14 |
+
|
15 |
+
}(jQuery));
|
readme.txt
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
=== rtMedia for WordPress, BuddyPress and bbPress ===
|
2 |
-
Contributors: rtcamp, rahul286, gagan0123, saurabhshukla, JoshuaAbenazer, faishal, desaiuditd, nitun.lanjewar, umesh.nevase, suhasgirgaonkar, neerukoul, hrishiv90
|
3 |
Donate link: http://rtcamp.com/donate
|
4 |
Tags: BuddyPress, media, multimedia, album, audio, songs, music, video, photo, image, upload, share, MediaElement.js, ffmpeg, kaltura, media-node, rtMedia, WordPress, bbPress
|
5 |
License: GPLv2 or later
|
6 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
7 |
-
Requires at least: WordPress 3.
|
8 |
-
Tested up to: WordPress 3.
|
9 |
-
Stable tag: 3.0.
|
10 |
|
11 |
rtMedia adds albums, audio/video encoding, privacy/sharing, front-end uploads & more. All this works nicely on mobile/tablets devices.
|
12 |
|
@@ -160,6 +160,15 @@ Please visit [rtMedia's Features page](http://rtcamp.com/buddypress-media/?utm_s
|
|
160 |
|
161 |
Please visit [rtMedia's Roadmap page](http://rtcamp.com/buddypress-media/roadmap/?utm_source=readme&utm_medium=plugin&utm_campaign=buddypress-media "Visit rtMedia's Features page") to get some details about future releases.
|
162 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
163 |
= 3.0.10 =
|
164 |
* Add Dahsboard Widget
|
165 |
* Fix uploader for Mobile
|
@@ -526,12 +535,14 @@ Please visit [rtMedia's Roadmap page](http://rtcamp.com/buddypress-media/roadmap
|
|
526 |
|
527 |
== Upgrade Notice ==
|
528 |
|
529 |
-
= 3.0.
|
530 |
-
Requires BuddyPress 1.7 or higher, if using BuddyPress.
|
|
|
531 |
== Sponsors ==
|
532 |
|
533 |
* *[Henry Wright](http://profiles.wordpress.org/henrywright-1)* has kindly sponsored the *Featured Media* feature.
|
534 |
* 优素映像 (Yousu Image) has sponsored the latest *Like* feature which doesn't depend on BuddyPress, any more.
|
|
|
535 |
|
536 |
|
537 |
== Translation ==
|
1 |
=== rtMedia for WordPress, BuddyPress and bbPress ===
|
2 |
+
Contributors: rtcamp, rahul286, gagan0123, saurabhshukla, JoshuaAbenazer, faishal, desaiuditd, nitun.lanjewar, rittesh.patel, umesh.nevase, suhasgirgaonkar, neerukoul, hrishiv90
|
3 |
Donate link: http://rtcamp.com/donate
|
4 |
Tags: BuddyPress, media, multimedia, album, audio, songs, music, video, photo, image, upload, share, MediaElement.js, ffmpeg, kaltura, media-node, rtMedia, WordPress, bbPress
|
5 |
License: GPLv2 or later
|
6 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
7 |
+
Requires at least: WordPress 3.6
|
8 |
+
Tested up to: WordPress 3.6 + BuddyPress 1.7
|
9 |
+
Stable tag: 3.0.11
|
10 |
|
11 |
rtMedia adds albums, audio/video encoding, privacy/sharing, front-end uploads & more. All this works nicely on mobile/tablets devices.
|
12 |
|
160 |
|
161 |
Please visit [rtMedia's Roadmap page](http://rtcamp.com/buddypress-media/roadmap/?utm_source=readme&utm_medium=plugin&utm_campaign=buddypress-media "Visit rtMedia's Features page") to get some details about future releases.
|
162 |
|
163 |
+
= 3.0.11 =
|
164 |
+
* Added profile picture along with the link back to the profile in the media pop ups ( sponsored by Richard Ellis )
|
165 |
+
* Fixed WordPress 3.6 attachment meta function issue & mediaElementJs
|
166 |
+
* Fixed Context Null issue in activity
|
167 |
+
* Fixed image size issue in gallery
|
168 |
+
* Fixed lightbox whitespace issue
|
169 |
+
* Fixed backbone paging on custom shortcode
|
170 |
+
* Other minor bug fixes
|
171 |
+
|
172 |
= 3.0.10 =
|
173 |
* Add Dahsboard Widget
|
174 |
* Fix uploader for Mobile
|
535 |
|
536 |
== Upgrade Notice ==
|
537 |
|
538 |
+
= 3.0.11 =
|
539 |
+
Requires BuddyPress 1.7 or higher, if using BuddyPress. Added profile picture along with the link, WordPress 3.6 and Other minor bug fixes.
|
540 |
+
|
541 |
== Sponsors ==
|
542 |
|
543 |
* *[Henry Wright](http://profiles.wordpress.org/henrywright-1)* has kindly sponsored the *Featured Media* feature.
|
544 |
* 优素映像 (Yousu Image) has sponsored the latest *Like* feature which doesn't depend on BuddyPress, any more.
|
545 |
+
* Richard Ellis has sponsored the profile picture along with the link back to the profile in the media pop ups.
|
546 |
|
547 |
|
548 |
== Translation ==
|
templates/media/media-single.php
CHANGED
@@ -1,42 +1,54 @@
|
|
1 |
<div class="rtmedia-container rtmedia-single-container">
|
2 |
<div class="row">
|
3 |
-
<?php
|
4 |
global $rt_ajax_request;
|
5 |
-
if (have_rtmedia()) : rtmedia();
|
|
|
6 |
|
7 |
-
<div id="rtmedia-single-media-container" class="rtmedia-single-media columns <?php
|
8 |
|
9 |
-
<?php rtmedia_title(); ?>
|
10 |
|
11 |
|
12 |
-
<div class="rtmedia-media" id ="rtmedia-media-<?php echo rtmedia_id(); ?>">
|
13 |
-
<?php rtmedia_media(true); ?>
|
14 |
</div>
|
15 |
|
16 |
</div>
|
17 |
-
<div class="rtmedia-single-meta columns <?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
|
19 |
-
|
|
|
|
|
|
|
20 |
|
21 |
<div class="rtmedia-item-actions">
|
22 |
-
<?php rtmedia_actions(); ?>
|
23 |
</div>
|
24 |
|
25 |
-
<?php if (rtmedia_comments_enabled()) { ?>
|
26 |
<div class="rtmedia-item-comments row">
|
27 |
<div class="large-12 columns">
|
28 |
<h2>Comments</h2>
|
29 |
<div class="rtmedia-comments-container">
|
30 |
-
<?php rtmedia_comments(); ?>
|
31 |
</div>
|
32 |
-
<?php rtmedia_comment_form(); ?>
|
33 |
</div>
|
34 |
</div>
|
35 |
<?php } ?>
|
36 |
</div>
|
37 |
|
38 |
<?php else: ?>
|
39 |
-
<p><?php echo __("Oops !! There's no media found for the request !!", "rtmedia"); ?></p>
|
40 |
<?php endif; ?>
|
41 |
|
42 |
</div>
|
1 |
<div class="rtmedia-container rtmedia-single-container">
|
2 |
<div class="row">
|
3 |
+
<?php
|
4 |
global $rt_ajax_request;
|
5 |
+
if ( have_rtmedia () ) : rtmedia ();
|
6 |
+
?>
|
7 |
|
8 |
+
<div id="rtmedia-single-media-container" class="rtmedia-single-media columns <?php echo ($rt_ajax_request) ? "large-9" : "large-12"; ?>">
|
9 |
|
10 |
+
<?php rtmedia_title (); ?>
|
11 |
|
12 |
|
13 |
+
<div class="rtmedia-media" id ="rtmedia-media-<?php echo rtmedia_id (); ?>">
|
14 |
+
<?php rtmedia_media ( true ); ?>
|
15 |
</div>
|
16 |
|
17 |
</div>
|
18 |
+
<div class="rtmedia-single-meta columns <?php echo ($rt_ajax_request) ? "large-3" : "large-12"; ?>">
|
19 |
+
<?php if ( $rt_ajax_request ) { ?>
|
20 |
+
<div>
|
21 |
+
<div class="userprofile">
|
22 |
+
<?php rtmedia_author_profile_pic ( true ); ?>
|
23 |
+
</div>
|
24 |
+
<div class="username">
|
25 |
+
<?php rtmedia_author_name ( true ); ?>
|
26 |
+
</div>
|
27 |
|
28 |
+
</div>
|
29 |
+
<?php } ?>
|
30 |
+
<?php rtmedia_description ();
|
31 |
+
?>
|
32 |
|
33 |
<div class="rtmedia-item-actions">
|
34 |
+
<?php rtmedia_actions (); ?>
|
35 |
</div>
|
36 |
|
37 |
+
<?php if ( rtmedia_comments_enabled () ) { ?>
|
38 |
<div class="rtmedia-item-comments row">
|
39 |
<div class="large-12 columns">
|
40 |
<h2>Comments</h2>
|
41 |
<div class="rtmedia-comments-container">
|
42 |
+
<?php rtmedia_comments (); ?>
|
43 |
</div>
|
44 |
+
<?php rtmedia_comment_form (); ?>
|
45 |
</div>
|
46 |
</div>
|
47 |
<?php } ?>
|
48 |
</div>
|
49 |
|
50 |
<?php else: ?>
|
51 |
+
<p><?php echo __ ( "Oops !! There's no media found for the request !!", "rtmedia" ); ?></p>
|
52 |
<?php endif; ?>
|
53 |
|
54 |
</div>
|