Changeset 1244


Ignore:
Timestamp:
08/27/10 14:38:59 (3 years ago)
Author:
zach
Message:
  • Fixing issue with file extensions (#953)
Location:
branches/html5
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • branches/html5/jwplayer.html5.js

    r1242 r1244  
    15481548 */ 
    15491549(function(jwplayer) { 
     1550        jwplayer.html5.extensionmap = { 
     1551                "3gp": "video/3gpp", 
     1552                "3gpp": "video/3gpp", 
     1553                "3g2": "video/3gpp2", 
     1554                "3gpp2": "video/3gpp2", 
     1555                "flv": "video/x-flv", 
     1556                "f4a": "audio/mp4", 
     1557                "f4b": "audio/mp4", 
     1558                "f4p": "video/mp4", 
     1559                "f4v": "video/mp4", 
     1560                "mov": "video/quicktime", 
     1561                "m4a": "audio/mp4", 
     1562                "m4b": "audio/mp4", 
     1563                "m4p": "audio/mp4", 
     1564                "m4v": "video/mp4", 
     1565                "mkv": "video/x-matroska", 
     1566                "mp4": "video/mp4", 
     1567                "sdp": "application/sdp", 
     1568                "vp6": "video/x-vp6", 
     1569                "aac": "audio/aac", 
     1570                "mp3": "audio/mp3", 
     1571                "ogg": "audio/ogg", 
     1572                "ogv": "video/ogg", 
     1573                "webm": "video/webm" 
     1574        }; 
     1575})(jwplayer); 
     1576/** 
     1577 * JW Player Video Media component 
     1578 * 
     1579 * @author zach 
     1580 * @version 1.0 
     1581 */ 
     1582(function(jwplayer) { 
    15501583 
    15511584        var _states = { 
     
    18571890                                if (sourceModel.type === undefined) { 
    18581891                                        var extension = jwplayer.html5.utils.extension(sourceModel.file); 
    1859                                         if (extension == "ogv") { 
    1860                                                 extension = "ogg"; 
     1892                                        if (jwplayer.html5.extensionmap[extension] !== undefined) { 
     1893                                                source.type = jwplayer.html5.extensionmap[extension]; 
     1894                                        } else { 
     1895                                                source.type = 'video/' + extension + ';';                                                
    18611896                                        } 
    1862                                         source.type = 'video/' + extension + ';'; 
    18631897                                } else { 
    18641898                                        source.type = sourceModel.type; 
     
    19341968                 
    19351969                //TODO: Figure out how to handle plugins / components 
    1936                 //jwplayer.utils.extend(_model.config, options); 
    19371970                 
    19381971                for (var option in options) { 
  • branches/html5/jwplayer.html5.xml

    r1190 r1244  
    2424                        <description>location of the poster image; shown before the video starts and after it has completed.</description> 
    2525                </flashvar> 
     26                <flashvar type="field">  
     27                        <name>start</name>  
     28                        <default>0</default>  
     29                        <description>position in seconds where playback has to start. Won't work for regular (progressive) videos, but only for streaming (HTTP/RTMP).</description>  
     30                </flashvar>  
    2631        </flashvars> 
    2732 
  • branches/html5/src/html5/jwplayer.html5.mediavideo.js

    r1242 r1244  
    315315                                if (sourceModel.type === undefined) { 
    316316                                        var extension = jwplayer.html5.utils.extension(sourceModel.file); 
    317                                         if (extension == "ogv") { 
    318                                                 extension = "ogg"; 
     317                                        if (jwplayer.html5.extensionmap[extension] !== undefined) { 
     318                                                source.type = jwplayer.html5.extensionmap[extension]; 
     319                                        } else { 
     320                                                source.type = 'video/' + extension + ';';                                                
    319321                                        } 
    320                                         source.type = 'video/' + extension + ';'; 
    321322                                } else { 
    322323                                        source.type = sourceModel.type; 
  • branches/html5/src/html5/jwplayer.html5.model.js

    r1242 r1244  
    4242                 
    4343                //TODO: Figure out how to handle plugins / components 
    44                 //jwplayer.utils.extend(_model.config, options); 
    4544                 
    4645                for (var option in options) { 
Note: See TracChangeset for help on using the changeset viewer.