Plugin Directory

Changeset 144123


Ignore:
Timestamp:
08/09/2009 07:19:42 AM (16 years ago)
Author:
ruslany
Message:

Minified javascript files.

Location:
wp-media-player/trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • wp-media-player/trunk/scripts/expressionplayer.js

    r100591 r144123  
    1 // ExpressionPlayer extends the Sys.UI.SilverlightMedia player class, adding URL parsing and mediainfo support
    2 //
    31
    4 Type.registerNamespace('ExpressionPlayer');
    5 
    6 //
    7 // optional URL parameters
    8 //
    9 ExpressionPlayer.UrlParam = {
    10     startTime   :   "startTime",    // specify start time for presentation on url in seconds as ...&start=5&...
    11     chapter     :   "chapter",      // start presentation at chapter # passed on url...&chapter=2&...
    12     loopCount   :   "loopCount",    // specify # of times to loop presentation on url as ...&loop=5&...  (-1 means forever)
    13     mediaSource :   "mediaSource",  // overrides the video source passed into the script, plays this video instead
    14     volume      :   "volume",       // overrides starting volume
    15     muted       :   "muted",        // mute=true mutes volume at start
    16     duration    :   "duration",     // amount of time to play
    17     autoplay    :   "autoplay",     // auto start playing presentation (default = 1 - yes)
    18     autoload    :   "autoload",     // cue up media on load.
    19     mediainfo   :   "mediainfo",    // media info, URL to JScript file with function 'mediainfo' which returns a JSON array (see docs)
    20     fakeoutput  :   "fakeoutput"    // used only internally, causes script to use stock output for content.
    21 };
    22 
    23 
    24 ExpressionPlayer.Player = function(domElement) {
    25     ExpressionPlayer.Player.initializeBase(this, [domElement]);   
    26 }
    27 ExpressionPlayer.Player.prototype =  {
    28     _fInitialized: false,
    29     _fakeOutput: "",
    30     _startButton: null,
    31 
    32     initialize: function() {
    33         ExpressionPlayer.Player.callBaseMethod(this, 'initialize');
    34 
    35         var content = this.get_element().content;       
    36          
    37         // listen to URL parameters
    38         this.set_autoPlay( $getArgument(ExpressionPlayer.UrlParam.autoplay, this.get_autoPlay().toString()) === "true" );
    39         this.set_autoLoad( $getArgument(ExpressionPlayer.UrlParam.autoload, this.get_autoLoad().toString()) === "true" );
    40         this.set_mediaSource( $getArgument(ExpressionPlayer.UrlParam.mediaSource, this.get_mediaSource() ) );
    41         this.set_mediainfo( $getArgument(ExpressionPlayer.UrlParam.mediainfo, this.get_mediainfo()) );
    42         this.set_muted( $getArgument(ExpressionPlayer.UrlParam.muted, this.get_muted().toString() ) === "true" );
    43         this.set_volume( parseFloat($getArgument(ExpressionPlayer.UrlParam.volume, this.get_volume() )) );
    44         this.set_fakeOutput( $getArgument(ExpressionPlayer.UrlParam.fakeoutput, this.get_fakeOutput()) );
    45         var chapterArg = $getArgument(ExpressionPlayer.UrlParam.chapter);
    46         if (chapterArg!=="") {
    47             this.set_currentChapter(parseInt(chapterArg));
    48         }
    49 
    50         if (this.get_mediainfo()!=="") {       
    51             this._initMediainfo();
    52         }
    53 
    54         this._fInitialized=true;
    55     },
    56    
    57     _meOpened: function() {
    58         ExpressionPlayer.Player.callBaseMethod(this, '_meOpened');
    59         this.set_position( parseFloat($getArgument(ExpressionPlayer.UrlParam.startTime, this.get_position())) );
    60     },
    61 
    62     set_galleryInfo : function ( galleryItems, callbackDelegate ) {
    63         if (this._gallery == null) {
    64             var galleryElement = this.get_element().content.findName( "GalleryArea" );       
    65             if (galleryElement!=null) {
    66                 var galleryToggleButton = this.get_element().content.findName( "GalleryToggleButton" );
    67                 this._gallery = new Sys.UI.Silverlight._ImageList( galleryElement, galleryToggleButton, false, callbackDelegate, this);
    68             }
    69         }       
    70         if (this._gallery != null) {
    71             this._gallery.set_items( galleryItems );
    72         }
    73     },
    74 
    75     get_mediainfo: function () {
    76         return this._mediainfo;
    77     },
    78    
    79     set_mediainfo: function(mediainfo) {
    80         this._mediainfo = mediainfo;
    81         if (this._fInitialized) {
    82             this._initMediainfo();
    83         }
    84     },
    85 
    86     _initMediainfo: function() {
    87         // Load mediainfo from a mediainfo JSON array or a function that returns
    88         if (typeof(this._mediainfo)==="function") {
    89             this.set_chapters( this._mediainfo().chapters );
    90             this.set_placeholderSource( this._mediainfo().placeholderSource );
    91             this.set_mediaSource( this._mediainfo().mediaSource );
    92         }
    93         else if (this._mediainfo.mediaSource!=null) {
    94             this.set_chapters( this._mediainfo.chapters );
    95             this.set_placeholderSource( this._mediainfo.placeholderSource );
    96             this.set_mediaSource( this._mediainfo.mediaSource );
    97         }
    98         else {
    99             throw Error.invalidOperation("unknown type for mediainfo");
    100         }
    101     },   
    102    
    103     set_fakeOutput: function(value) {
    104         if ("".length>0) {
    105             this._fakeOutput=unescape(value);
    106             if (this._fakeOutput!="") {
    107                 this.set_mediainfo(
    108                     { "mediaSource": this._fakeOutput+"/sl.wmv",
    109                       "placeholderSource": this._fakeOutput+"/sl1.jpg",
    110                       "chapters": [ new Sys.UI.Silverlight.MediaChapter("", 1,this._fakeOutput+"/sl1.jpg") ,
    111                                     new Sys.UI.Silverlight.MediaChapter("", 2,this._fakeOutput+"/sl2.jpg") ,
    112                                     new Sys.UI.Silverlight.MediaChapter("", 4,this._fakeOutput+"/sl3.jpg")  ] }
    113                     );
    114             }
    115         }
    116     },
    117    
    118     get_fakeOutput: function() {
    119         return this._fakeOutput;
    120     },
    121 
    122     set_timeIndex: function(value) {
    123         // check for skipping past end of file and raise media ended
    124         if(this._mediaElement && this._canSeek && value>this._naturalduration ) {
    125             this._raiseEvent("mediaEnded", Sys.EventArgs.Empty);
    126         }
    127         else {
    128             ExpressionPlayer.Player.callBaseMethod(this, 'set_position', [value]);
    129         }
    130     },
    131    
    132    
    133    
    134     add_playPreviousVideo:function(handler) {
    135         this.get_events().addHandler("playPreviousVideo", handler);
    136     },
    137    
    138     remove_playPreviousVideo:function(handler) {
    139         this.get_events().removeHandler("playPreviousVideo", handler);
    140     },
    141            
    142     _onPrevious:function() {
    143         var chapters = this.get_chapters();
    144         var tmWindowMin = 2;
    145         if (chapters!=null && chapters.length>0)
    146             tmWindowMin = Math.min(tmWindowMin, chapters[0].get_position());
    147         if (this.get_position() < tmWindowMin) {
    148                 this._raiseEvent("playPreviousVideo");         
    149                 return;
    150             }
    151         ExpressionPlayer.Player.callBaseMethod(this, '_onPrevious');       
    152     },
    153    
    154     add_playNextVideo:function(handler) {
    155         this.get_events().addHandler("playNextVideo", handler);
    156     },
    157    
    158     remove_playNextVideo:function(handler) {
    159         this.get_events().removeHandler("playNextVideo", handler);
    160     },                           
    161                            
    162     _onNext:function() {
    163         var chapters = this.get_chapters();
    164         if (!chapters || !chapters.length) {       
    165             var delta = Math.max(5, this._duration / 10);
    166             var newTime = delta + this.get_position();
    167             if (newTime > this._duration) {
    168                 this._raiseEvent("playNextVideo");         
    169                 return;
    170             }
    171         }
    172         else {
    173             var chapterLast = chapters[chapters.length-1];
    174             if (chapterLast.get_position()<this.get_position()) {               
    175                 this._raiseEvent("playNextVideo");
    176                 return;
    177             }             
    178         } 
    179         ExpressionPlayer.Player.callBaseMethod(this, '_onNext');     
    180     }
    181 }
    182 
    183 ExpressionPlayer.Player._playerCount = 0;
    184 ExpressionPlayer.Player._getUniqueName = function(baseName) {
    185     return baseName + ExpressionPlayer.Player._playerCount++;
    186 }
    187 ExpressionPlayer.Player.registerClass('ExpressionPlayer.Player',  Sys.UI.Silverlight.MediaPlayer);
    188 
    189 
    190 
    191 ExpressionPlayer.GalleryItem = function (title, thumbnailSource) {
    192     this._title = title;
    193     this._thumbnailSource = thumbnailSource;
    194     ExpressionPlayer.GalleryItem.initializeBase(this);
    195 }
    196 ExpressionPlayer.GalleryItem.prototype = {
    197     get_thumbnailSource : function() {
    198         return this._thumbnailSource;
    199     },
    200     get_title : function () {
    201         return this._title;
    202     }
    203 }
    204 ExpressionPlayer.GalleryItem.registerClass("ExpressionPlayer.GalleryItem");
    205 
    206 
    207 
    208 ExpressionPlayer.ShowHideAnimationButton = function(player, controlName, nameElement, showing) {
    209     var domElement = player.get_element().content.findName( controlName );   
    210     ExpressionPlayer.ShowHideAnimationButton.initializeBase(this, [domElement, true, null, this._onToggle, null, this]);   
    211     this._animOpen = nameElement ? player.get_element().content.findName(nameElement + "_Show") : null;
    212     this._animClose = nameElement ? player.get_element().content.findName(nameElement + "_Hide") : null;   
    213     this._showing = !!showing;
    214 }
    215 ExpressionPlayer.ShowHideAnimationButton.prototype= {
    216    _onToggle: function () {
    217         this._showing = !this._showing;
    218         if (this._showing && this._animOpen) {
    219             this._animOpen.begin();
    220         }
    221         if (!this._showing && this._animClose) {
    222             this._animClose.begin();           
    223         }
    224     },
    225 
    226    dispose: function() {
    227         this._animOpen = null;
    228         this._animClose = null; 
    229         ExpressionPlayer.ShowHideAnimationButton.callBaseMethod(this, "dispose");               
    230    }
    231 }
    232 ExpressionPlayer.ShowHideAnimationButton.registerClass('ExpressionPlayer.ShowHideAnimationButton', Sys.UI.Silverlight._Button);
    233 
    234 
    235 ExpressionPlayer.HotspotButton = function (player, controlName) {
    236     var domElement = player.get_element().content.findName( controlName );   
    237     ExpressionPlayer.HotspotButton.initializeBase(this, [domElement, true, null, null, null, this]);     
    238     this.timeoutId = 0;
    239     this._showAnim = player.get_element().content.findName(controlName+"_MouseEnter");
    240     this._hideAnim = player.get_element().content.findName(controlName+"_MouseLeave");
    241 }
    242 ExpressionPlayer.HotspotButton.prototype = {
    243     _onEnter : function () {   
    244         this._showHideControls ( true );
    245     },
    246    
    247     _onLeave : function () {   
    248          this._showHideControls ( false );
    249     },
    250    
    251     _showHideControls : function (fShow) {   
    252         if (this._timeoutId!=0) {
    253             window.clearTimeout( this._timeoutId );
    254             this._timeoutId = 0;
    255         }
    256        
    257         if (!fShow) {
    258             this._timeoutId = window.setTimeout(Function.createDelegate(this, this._hideControls), 1000);     
    259         } else {
    260             this._showControls();
    261         }
    262     },
    263 
    264     _hideControls : function () {
    265         if (this._controlsShowing) {
    266             this._hideAnim.begin();
    267         }     
    268         this._controlsShowing = false;
    269     },
    270 
    271     _showControls : function() {
    272         if (!this._controlsShowing) {
    273             this._showAnim.begin();       
    274         }
    275         this._controlsShowing = true;
    276     }   
    277 }
    278 ExpressionPlayer.HotspotButton.registerClass('ExpressionPlayer.HotspotButton', Sys.UI.Silverlight._Button);
    279 
    280 
    281 
    282 function $getArgument(strArg, defVal) {
    283    var urlArgs=window.location.search.substring(1);
    284    var vals = urlArgs.split("&");
    285    var strArgLower = strArg.toLowerCase();
    286    for (var i=0;i<vals.length;i++) {
    287         var nvPair = vals[i].split("=");
    288         if (nvPair[0].toLowerCase() === strArgLower) {
    289             return unescape(nvPair[1]);
    290         }
    291    }
    292    if (typeof(defVal)!=='undefined') {
    293         return defVal;
    294    }
    295    return "";
    296 }
    297 
    298 
     2
     3Type.registerNamespace('ExpressionPlayer');ExpressionPlayer.UrlParam={startTime:"startTime",chapter:"chapter",loopCount:"loopCount",mediaSource:"mediaSource",volume:"volume",muted:"muted",duration:"duration",autoplay:"autoplay",autoload:"autoload",mediainfo:"mediainfo",fakeoutput:"fakeoutput"};ExpressionPlayer.Player=function(domElement){ExpressionPlayer.Player.initializeBase(this,[domElement]);}
     4ExpressionPlayer.Player.prototype={_fInitialized:false,_fakeOutput:"",_startButton:null,initialize:function(){ExpressionPlayer.Player.callBaseMethod(this,'initialize');var content=this.get_element().content;this.set_autoPlay($getArgument(ExpressionPlayer.UrlParam.autoplay,this.get_autoPlay().toString())==="true");this.set_autoLoad($getArgument(ExpressionPlayer.UrlParam.autoload,this.get_autoLoad().toString())==="true");this.set_mediaSource($getArgument(ExpressionPlayer.UrlParam.mediaSource,this.get_mediaSource()));this.set_mediainfo($getArgument(ExpressionPlayer.UrlParam.mediainfo,this.get_mediainfo()));this.set_muted($getArgument(ExpressionPlayer.UrlParam.muted,this.get_muted().toString())==="true");this.set_volume(parseFloat($getArgument(ExpressionPlayer.UrlParam.volume,this.get_volume())));this.set_fakeOutput($getArgument(ExpressionPlayer.UrlParam.fakeoutput,this.get_fakeOutput()));var chapterArg=$getArgument(ExpressionPlayer.UrlParam.chapter);if(chapterArg!==""){this.set_currentChapter(parseInt(chapterArg));}
     5if(this.get_mediainfo()!==""){this._initMediainfo();}
     6this._fInitialized=true;},_meOpened:function(){ExpressionPlayer.Player.callBaseMethod(this,'_meOpened');this.set_position(parseFloat($getArgument(ExpressionPlayer.UrlParam.startTime,this.get_position())));},set_galleryInfo:function(galleryItems,callbackDelegate){if(this._gallery==null){var galleryElement=this.get_element().content.findName("GalleryArea");if(galleryElement!=null){var galleryToggleButton=this.get_element().content.findName("GalleryToggleButton");this._gallery=new Sys.UI.Silverlight._ImageList(galleryElement,galleryToggleButton,false,callbackDelegate,this);}}
     7if(this._gallery!=null){this._gallery.set_items(galleryItems);}},get_mediainfo:function(){return this._mediainfo;},set_mediainfo:function(mediainfo){this._mediainfo=mediainfo;if(this._fInitialized){this._initMediainfo();}},_initMediainfo:function(){if(typeof(this._mediainfo)==="function"){this.set_chapters(this._mediainfo().chapters);this.set_placeholderSource(this._mediainfo().placeholderSource);this.set_mediaSource(this._mediainfo().mediaSource);}
     8else if(this._mediainfo.mediaSource!=null){this.set_chapters(this._mediainfo.chapters);this.set_placeholderSource(this._mediainfo.placeholderSource);this.set_mediaSource(this._mediainfo.mediaSource);}
     9else{throw Error.invalidOperation("unknown type for mediainfo");}},set_fakeOutput:function(value){if("".length>0){this._fakeOutput=unescape(value);if(this._fakeOutput!=""){this.set_mediainfo({"mediaSource":this._fakeOutput+"/sl.wmv","placeholderSource":this._fakeOutput+"/sl1.jpg","chapters":[new Sys.UI.Silverlight.MediaChapter("",1,this._fakeOutput+"/sl1.jpg"),new Sys.UI.Silverlight.MediaChapter("",2,this._fakeOutput+"/sl2.jpg"),new Sys.UI.Silverlight.MediaChapter("",4,this._fakeOutput+"/sl3.jpg")]});}}},get_fakeOutput:function(){return this._fakeOutput;},set_timeIndex:function(value){if(this._mediaElement&&this._canSeek&&value>this._naturalduration){this._raiseEvent("mediaEnded",Sys.EventArgs.Empty);}
     10else{ExpressionPlayer.Player.callBaseMethod(this,'set_position',[value]);}},add_playPreviousVideo:function(handler){this.get_events().addHandler("playPreviousVideo",handler);},remove_playPreviousVideo:function(handler){this.get_events().removeHandler("playPreviousVideo",handler);},_onPrevious:function(){var chapters=this.get_chapters();var tmWindowMin=2;if(chapters!=null&&chapters.length>0)
     11tmWindowMin=Math.min(tmWindowMin,chapters[0].get_position());if(this.get_position()<tmWindowMin){this._raiseEvent("playPreviousVideo");return;}
     12ExpressionPlayer.Player.callBaseMethod(this,'_onPrevious');},add_playNextVideo:function(handler){this.get_events().addHandler("playNextVideo",handler);},remove_playNextVideo:function(handler){this.get_events().removeHandler("playNextVideo",handler);},_onNext:function(){var chapters=this.get_chapters();if(!chapters||!chapters.length){var delta=Math.max(5,this._duration/10);var newTime=delta+this.get_position();if(newTime>this._duration){this._raiseEvent("playNextVideo");return;}}
     13else{var chapterLast=chapters[chapters.length-1];if(chapterLast.get_position()<this.get_position()){this._raiseEvent("playNextVideo");return;}}
     14ExpressionPlayer.Player.callBaseMethod(this,'_onNext');}}
     15ExpressionPlayer.Player._playerCount=0;ExpressionPlayer.Player._getUniqueName=function(baseName){return baseName+ExpressionPlayer.Player._playerCount++;}
     16ExpressionPlayer.Player.registerClass('ExpressionPlayer.Player',Sys.UI.Silverlight.MediaPlayer);ExpressionPlayer.GalleryItem=function(title,thumbnailSource){this._title=title;this._thumbnailSource=thumbnailSource;ExpressionPlayer.GalleryItem.initializeBase(this);}
     17ExpressionPlayer.GalleryItem.prototype={get_thumbnailSource:function(){return this._thumbnailSource;},get_title:function(){return this._title;}}
     18ExpressionPlayer.GalleryItem.registerClass("ExpressionPlayer.GalleryItem");ExpressionPlayer.ShowHideAnimationButton=function(player,controlName,nameElement,showing){var domElement=player.get_element().content.findName(controlName);ExpressionPlayer.ShowHideAnimationButton.initializeBase(this,[domElement,true,null,this._onToggle,null,this]);this._animOpen=nameElement?player.get_element().content.findName(nameElement+"_Show"):null;this._animClose=nameElement?player.get_element().content.findName(nameElement+"_Hide"):null;this._showing=!!showing;}
     19ExpressionPlayer.ShowHideAnimationButton.prototype={_onToggle:function(){this._showing=!this._showing;if(this._showing&&this._animOpen){this._animOpen.begin();}
     20if(!this._showing&&this._animClose){this._animClose.begin();}},dispose:function(){this._animOpen=null;this._animClose=null;ExpressionPlayer.ShowHideAnimationButton.callBaseMethod(this,"dispose");}}
     21ExpressionPlayer.ShowHideAnimationButton.registerClass('ExpressionPlayer.ShowHideAnimationButton',Sys.UI.Silverlight._Button);ExpressionPlayer.HotspotButton=function(player,controlName){var domElement=player.get_element().content.findName(controlName);ExpressionPlayer.HotspotButton.initializeBase(this,[domElement,true,null,null,null,this]);this.timeoutId=0;this._showAnim=player.get_element().content.findName(controlName+"_MouseEnter");this._hideAnim=player.get_element().content.findName(controlName+"_MouseLeave");}
     22ExpressionPlayer.HotspotButton.prototype={_onEnter:function(){this._showHideControls(true);},_onLeave:function(){this._showHideControls(false);},_showHideControls:function(fShow){if(this._timeoutId!=0){window.clearTimeout(this._timeoutId);this._timeoutId=0;}
     23if(!fShow){this._timeoutId=window.setTimeout(Function.createDelegate(this,this._hideControls),1000);}else{this._showControls();}},_hideControls:function(){if(this._controlsShowing){this._hideAnim.begin();}
     24this._controlsShowing=false;},_showControls:function(){if(!this._controlsShowing){this._showAnim.begin();}
     25this._controlsShowing=true;}}
     26ExpressionPlayer.HotspotButton.registerClass('ExpressionPlayer.HotspotButton',Sys.UI.Silverlight._Button);function $getArgument(strArg,defVal){var urlArgs=window.location.search.substring(1);var vals=urlArgs.split("&");var strArgLower=strArg.toLowerCase();for(var i=0;i<vals.length;i++){var nvPair=vals[i].split("=");if(nvPair[0].toLowerCase()===strArgLower){return unescape(nvPair[1]);}}
     27if(typeof(defVal)!=='undefined'){return defVal;}
     28return"";}
  • wp-media-player/trunk/scripts/startplayer.js

    r141136 r144123  
    11
    2 function StartMediaPlayer(parentId,playerWidth,playerHeight){this._hostname=ExpressionPlayer.Player._getUniqueName("xamlHost");Silverlight.createObjectEx({source:this.xamlSource,parentElement:$get(parentId||"mediaPlayer_0"),id:this._hostname,properties:{width:playerWidth,height:playerHeight,version:'1.0',background:"Black",isWindowless:'false',inplaceInstallPrompt:true},events:{onLoad:Function.createDelegate(this,this._handleLoad)}});this._currentMediainfo=-1;}
    3 StartMediaPlayer.prototype={_handleLoad:function(){this._player=$create(ExtendedPlayer.Player,{autoPlay:this.autoPlayParam,autoLoad:this.autoLoadParam,scaleMode:this.scaleModeParam,muted:this.mutedParam,enableCaptions:this.enableCaptionsParam,volume:1.0},{mediaEnded:Function.createDelegate(this,this._onMediaEnded),mediaFailed:Function.createDelegate(this,this._onMediaFailed),playPreviousVideo:Function.createDelegate(this,this._onPlayPreviousVideo),playNextVideo:Function.createDelegate(this,this._onPlayNextVideo)},null,$get(this._hostname));this._playlist=this.getPlaylist();this._onPlayNextVideo(null,null);},_onMediaEnded:function(sender,eventArgs){window.setTimeout(Function.createDelegate(this,this._onPlayNextVideo),1000);},_onMediaFailed:function(sender,eventArgs){alert(String.format(Sys.UI.Silverlight.MediaRes.mediaFailed,this._player.get_mediaSource()));},_onPlayPreviousVideo:function(sender,eventArgs){if(this._playlist!=null){if(this._currentMediainfo>0){this._player.set_mediainfo(this._playlist[--this._currentMediainfo]);}}},_onPlayNextVideo:function(sender,eventArgs){if(this._playlist!=null){if(this._currentMediainfo<this._playlist.length-1){this._player.set_mediainfo(this._playlist[++this._currentMediainfo]);}}}}
     2function StartMediaPlayer(parentId,xamlSource,playerWidth,playerHeight){this._hostname=ExpressionPlayer.Player._getUniqueName("xamlHost");Silverlight.createObjectEx({source:xamlSource,parentElement:$get(parentId||"mediaPlayer_0"),id:this._hostname,properties:{width:playerWidth,height:playerHeight,version:'1.0',background:"Black",isWindowless:'false',inplaceInstallPrompt:true},events:{onLoad:Function.createDelegate(this,this._handleLoad)}});}
     3StartMediaPlayer.prototype={_handleLoad:function(){this._player=$create(ExtendedPlayer.Player,{autoPlay:this.autoPlayParam,autoLoad:this.autoLoadParam,scaleMode:1,muted:this.mutedParam,enableCaptions:true,volume:1.0},{mediaOpened:Function.createDelegate(this,this._onMediaOpened),mediaEnded:Function.createDelegate(this,this._onMediaEnded),mediaFailed:Function.createDelegate(this,this._onMediaFailed)},null,$get(this._hostname));this._playlist=this.getPlaylist();this._player.set_mediainfo(this._playlist[0]);},_onMediaOpened:function(sender,eventArgs){this._logMediaStatus(1);},_onMediaEnded:function(sender,eventArgs){this._logMediaStatus(2);},_onMediaFailed:function(sender,eventArgs){alert(String.format(Sys.UI.Silverlight.MediaRes.mediaFailed,this._player.get_mediaSource()));},_logMediaStatus:function(status){jQuery.ajax({type:'GET',url:this.ajaxUrl,data:'pid='+this.postId+'&stat='+status+'&file='+encodeURIComponent(this._playlist[0].mediaSource),cache:false});}}
    44function StartWithParent(parentId,appId){new StartMediaPlayer(parentId);}
     5Sys.UI.Silverlight.ControlRes={'runtimeErrorWithoutPosition':"Runtime error {2} in control '{0}', method {6}: {3}",'scaleModeRequiresMatrixTransform':"When ScaleMode is set to zoom or stretch, the root Canvas must have not have a RenderTransform applied, or must only have a ScaleTransform.",'mediaError_NotFound':"Media '{3}' in control '{0}' could not be found.",'runtimeErrorWithPosition':"Runtime error {2} in control '{0}', method {6} (line {4}, col {5}): {3}",'silverlightVersionFormat':"Must be in the format 'MajorVersion.MinorVersion'.",'otherError':"{1} error #{2} in control '{0}': {3}",'cannotChangeSource':"You cannot change the XAML source after initialization.",'parserError':"Invalid XAML for control '{0}'. [{7}] (line {4}, col {5}): {3}",'sourceAlreadySet':"You cannot change the XAML source after initialization.",'parentNotFound':"{1} error #{2} in control '{0}': {3}"};Sys.UI.Silverlight.MediaRes={'volumeRange':"Volume must be a number greater than or equal to 0 and less than or equal to 1.",'mediaFailed':"Unable to load media '{0}'. This may be because there is no such file at this location or the video file is encoded incorrectly.",'noMediaElement':"The XAML document does not contain a media element.",'noThumbElement':"{1} error #{2} in control '{0}': {3}",'invalidChapter':"Must be greater than or equal to 0 and less than the length of the chapter's array.",'silverlightNotLoaded':"{1} error #{2} in control '{0}': {3}"};
  • wp-media-player/trunk/wp-media-player.php

    r144122 r144123  
    532532                wp_enqueue_script('expressionplayer', $this -> pluginurl.'scripts/expressionplayer.js');
    533533                wp_enqueue_script('player', $this -> pluginurl.'styles/'.strtolower($this -> player_styles[$this -> plugin_parameters['style']]).'/player.js');
    534                 wp_enqueue_script('startmediaplayer', $this -> pluginurl.'scripts/startplayer.js.dev.js', array('jquery'));
     534                wp_enqueue_script('startmediaplayer', $this -> pluginurl.'scripts/startplayer.js.js', array('jquery'));
    535535            }
    536536        }
Note: See TracChangeset for help on using the changeset viewer.