0.1.0 • Published 9 months ago

akam-general-player v0.1.0

Weekly downloads
-
License
ISC
Repository
-
Last release
9 months ago

General Player


Some Descriptions and Usecases of General Player

propNamedefaultrequiredtypedescription
isLivefalseyesbooleanBy this props you Specify that Live Player must rendered or not
isShowLoadingBeforePlayerfalseyesbooleanthe Loading Page Before Player must shown or not
lastSeen0nonumber OR stringVideo Starts from the user last seen if 0 video starts from first
handlePlayerReady(player) => voidno(player) => voidpass the events of the player that provided in VideoJS Library such as 'wating', 'abort' for more Info checkout https://docs.videojs.com/audiotrack#events
getAdsFromOutnullno(callBackFunction) => voidthis props is for adding the Ads API Call to Player. CAUTION: the CallbackFunction is Coming From the General Player Component And You should just call it after reformat the data based on DTO that will provide next
videoJsOptions(in the end of the Doc)trueobjectan object of the Videojs Options , for more info checkout https://videojs.com/guides/options/
timeToShowNextEpisodeBtn0nonumberwhen to show the Next Episode Button on Player
timeToShowSkipEndTeaser{start: 0,end: 0}no{start: number,end: number}when to show the SkipEndTeaser and when to stop
loadingBeforePlayerContext{poster: '', title: '', permaLink: ''}yes{poster: string, title: string, permaLink: string}data needed for loading before player page
adsCount0nonumbernumber of times the ads must shown in a Video
adsLinknullnostringthe link that player must send request to it to take the Ads data
endTeaser0nonumberwhen the end Teaser starts
contentPosternullnostringPoster of the Content
nextContentPosternullnostringPoster of next Content
nextContentPermaLinknullnostringPermalink of next content
seasonsCount0nonumbernumber of the seasons
contentPermaLinknullnostringPermalink of the Content
eachSecondsLastSeenMustChecked0nonumberHow many times each seconds the lastSeen Api Call?
lastSeenApiCallnullno(contentPermaLink, currentTime) => voidBoth parameters came from General Component you should just use them in your API

CAUTION: for the Ads API Call, before Calling the callbackFunction make sure the Data Schema be like the below DTO: { link: string, title: string, skipTime: number, filePath: string, }

0.1.0

9 months ago