Plugin Directory

Changeset 397939


Ignore:
Timestamp:
06/16/2011 12:39:31 PM (15 years ago)
Author:
CJ_Jackson
Message:

Updated to 0.1.7

Location:
html5avmanager
Files:
78 added
4 edited

Legend:

Unmodified
Added
Removed
  • html5avmanager/trunk/html5avmanager.php

    r397880 r397939  
    55  Plugin URI: http://cj-jackson.com/
    66  Description: A video manager with a Modal-View-Controller and video uploader.
    7   Version: 0.1.6
     7  Version: 0.1.7
    88  Author: Christopher John Jackson
    99  Author URI: http://cj-jackson.com/
     
    514514    static public function determineVideo($file) {
    515515        $type = self::getVideoType();
    516 
    517         if (preg_match('#\.[mp4$|m4v$]#i', $file)) {
     516       
     517        $ext = strtolower(end(explode('.', $file)));
     518
     519        if ($ext == 'mp4' || $ext == 'm4v') {
    518520            return $type['MP4 (H.264 Baseline & AAC-LC)'];
    519521        }
    520522
    521         if (preg_match('#\.webm$#i', $file)) {
     523        if ($ext == 'webm') {
    522524            return $type['WebM (VP8 & Vorbis)'];
    523525        }
     
    528530    static public function determineAudio($file) {
    529531        $type = self::getAudioType();
    530 
    531         if (preg_match('#\.[mp4$|m4a$|aac$]#i', $file)) {
     532       
     533        $ext = strtolower(end(explode('.', $file)));
     534
     535        if ($ext == 'mp4' || $ext == 'm4a' || $ext == 'aac') {
    532536            return $type['AAC/MP4 (Low-Complexity)'];
    533537        }
    534538
    535         if (preg_match('#\.webm$#i', $file)) {
     539        if ($ext == 'webm') {
    536540            return $type['WebM (Vorbis)'];
    537541        }
    538542
    539         if (preg_match('#\.[ogg$|oga$]$#i', $file)) {
     543        if ($ext == 'ogg' || $ext == 'oga') {
    540544            return $type['Ogg (Vorbis)'];
    541545        }
     
    798802                $TempCodecs['MP4 (H.264 Extended & AAC-LC)'] => 'MP4 (Extended)',
    799803                $TempCodecs['MP4 (H.264 Main & AAC-LC)'] => 'MP4 (Main)',
    800                 $TempCodecs['MP4 (H.264 High & AAC-LC)'] => 'MP4 (High)',
     804                $TempCodecs['MP4 (H.264 High & AAC-LC)'] => 'MP4 (High)'
    801805            );
    802806        } else {
     
    804808            $codecs = array(
    805809                $TempCodecs['AAC/MP4 (Low-Complexity)'] => 'AAC',
    806                 $TempCodecs['MP3'] => 'MP3',
     810                $TempCodecs['MP3'] => 'MP3'
    807811            );
    808812        }
     
    826830            $codecs = array(
    827831                $TempCodecs['Ogg (Vorbis)'] => 'Ogg',
    828                 $TempCodecs['WebM (Vorbis)'] => 'WebM',
     832                $TempCodecs['WebM (Vorbis)'] => 'WebM'
    829833            );
    830834        }
  • html5avmanager/trunk/readme.txt

    r397880 r397939  
    55Requires at least: 2.7
    66Tested up to: 3.2
    7 Stable tag: 0.1.6
     7Stable tag: 0.1.7
    88
    99A HTML5 Audio and Video manager that take full advantage of
     
    6262== Changelog ==
    6363
     64= 0.1.7 =
     65* No longer uses 'preg_match' to determine video or audio, uses
     66'strtolower(end(explode('.', $file)))' to get extension in lower case, then use
     67'==' to compare in if statement.
     68* Removed 'jQuery(document).ready()' wrapper from default views.
     69
    6470= 0.1.6 =
    6571* Reregister jquery and jquery-ui script, now load from Google API rather than
  • html5avmanager/trunk/view/videoaudio/audio-default.php

    r397880 r397939  
    5353
    5454<script type="text/javascript">
    55     jQuery(document).ready(function($) {
    56         $('#audio-<?php echo $id ?>').mediaelementplayer({
    57             audioWidth:<?php echo $width ?>
    58         });
     55    jQuery('#audio-<?php echo $id ?>').mediaelementplayer({
     56        audioWidth:<?php echo $width ?>
    5957    });
    6058</script>
  • html5avmanager/trunk/view/videoaudio/video-default.php

    r397880 r397939  
    5656
    5757<script type="text/javascript">
    58     jQuery(document).ready(function($) {
    59         $('#video-<?php echo $id ?>').mediaelementplayer();
    60     });
     58    jQuery('#video-<?php echo $id ?>').mediaelementplayer();
    6159</script>
Note: See TracChangeset for help on using the changeset viewer.