Mediasite.namespace("Mediasite.Player.DataProvider"),Mediasite.Player.DataProviderType={None:0,Server:1,PublishToGo:2,Recorder:3},Mediasite.Player.DataProvider.GetProvider=function(n,t,i,r,u,f){switch(n){case Mediasite.Player.DataProviderType.Server:return new Mediasite.Player.DataProvider.Server(t,i,r,u,f);case Mediasite.Player.DataProviderType.PublishToGo:return new Mediasite.Player.DataProvider.PublishToGo;case Mediasite.Player.DataProviderType.Recorder:return new Mediasite.Player.DataProvider.Recorder(t,i,r);default:return new Mediasite.Player.DataProvider.Server(t,i,r,u)}},Mediasite.Player.DataProvider.Server=function(n,t,i,r,u){function setAbsoluteSlideBaseUrl(n){var i,u,t,r;if(n.Streams)for(i=0,u=n.Streams.length;i0&&(u=jQuery.grep(o,function(n){return n&&n.Text.match(h)}),u=jQuery.map(u,function(n){return jQuery.extend({},n,{Type:Mediasite.TimingEventType.Caption})})),jQuery.isArray(f)&&f.length>0&&(l=jQuery.grep(f,function(n){var i=n.Text+" "+n.Description;return n&&i.match(h)}),$.each(l,function(n,t){s.push({Type:Mediasite.TimingEventType.SlideText,Text:t.Text+" "+t.Description,Time:t.Time,Number:t.Number})})),$.merge(u,s),u=u.sort(function(n,t){return n.Time-t.Time}),i(u,t)},this.SaveBookmark=function(){},this.ReportMediaOpen=function(){},this.ReportMediaView=function(){}},Mediasite.Player.DataProvider.Recorder=function(n,t){function ajaxSetup(){$(document).ajaxComplete(function(n,t){var r;try{r=JSON.parse(t.responseText)}catch(n){if(t.statusCode().status==404)r={Message:"An error occurred. Please check the recorder logs.",Success:!1};else return}if(r.Message!=null){Mediasite.Player.DisplayMessage({message:r.Message,width:"500"});return}})}function getUserPreferences(){return{UserFromName:r.UserPreferences.GetValue(Mediasite.Player.Options.UserFromName,""),UserFromEmail:r.UserPreferences.GetValue(Mediasite.Player.Options.UserFromEmail,""),Volume:r.UserPreferences.GetValue(Mediasite.Player.Options.Volume,"100"),SlideDisplay:r.UserPreferences.GetValue(Mediasite.Player.Options.SlideDisplay,Mediasite.Player.SlideDisplayPref.LargeThumbs),ShowSlideDescriptions:r.UserPreferences.GetValue(Mediasite.Player.Options.ShowSlideDescriptions,!1)}}var r=this;r.serviceLocation=t,this.UserPreferences=new Mediasite.Player.UserPreferences,this.LoadPlayerData=function(){var t={PresentationId:Mediasite.GetQueryParam("presentationId")},n={};return n.Success=!1,$.ajax({async:!1,type:"POST",dataType:"json",contentType:"application/json; charset=utf-8",url:r.serviceLocation,data:JSON.stringify(t),success:function(t){t.Presentation.ServerClockSkew=+new Date-t.Presentation.ServerTimeForClockSkew,t.PlayerLayoutOptions.PlayerType=Mediasite.Player.PlayerType.ContentOnlyPlayer,n.PlayerLayoutOptions=$.extend({},t.PlayerLayoutOptions),n.PlayerLayoutOptions.PlayerLoader="Javascript/Players/ContentOnlyPlayer/Mediasite.Player.ContentOnlyPlayerView.js",n.GlobalOptions={AppRoot:"",EnableContextMenuForPlayer:!0,ErrorPage:"",ServiceEndpoint:"",SessionTimeout:12e5,SlideGroupMaxInGroup:10,SlideGroupMinToTrigger:25,SlideGroupThreshold:2e3,UseLiveEventPolling:!1,CompatiblePlugins:undefined,DesiredPlugins:Mediasite.Player.MediaPlugins.None,UseExtensions:!1},n.UserData=Mediasite.UserData?Mediasite.UserData:{},n.UserData.PresentationBookmark=n.UserData.PresentationBookmark?$.extend(n.UserData,t.PresentationBookmark):$.extend({},t.PresentationBookmark),n.UserData.UserPreferences=getUserPreferences(),n.CurrentPresentation=new Mediasite.Presentation(t.Presentation),n.CurrentPresentation.SharingEnabled=!1,n.PlaybackOptions=new Mediasite.Player.PlaybackOptions(n.CurrentPresentation,null),n.PlaybackOptions.AutoStart=!0,n.Success=!0}}),n},this.LoadMarkup=function(n){$.ajax({url:n,type:"get",dataType:"html",async:!1,success:function(n){$("#PlayerContent").empty(),$("#PlayerContent").append(n)}})},this.GetLiveStatus=function(){},this.GetLiveEvents=function(){},this.GetInvite=function(){},this.SendInvite=function(){},this.SendQuestion=function(){},this.Search=function(){return undefined},this.SaveBookmark=function(){},this.ReportState=function(){},this.ReportMediaOpen=function(){},this.ReportMediaView=function(){},$(function(){ajaxSetup()})}