Some calls to this.shakaPlayerInstance.getManifest() are doing before one valid shaka player instance exists. This PR prevents those access to avoid log noises.
Changes
Returns null on presentationTimeline getter if this.shakaPlayerInstance.getManifest() doesn't exists;
Returns 0 on getProgramDateTime method if this.presentationTimeline returns invalid value;
How to test
Play any media;
Open console tab of your developers tools;
Should not have any console about access presentationTimeline of null.
Summary
Some calls to
this.shakaPlayerInstance.getManifest()
are doing before one valid shaka player instance exists. This PR prevents those access to avoid log noises.Changes
null
onpresentationTimeline
getter ifthis.shakaPlayerInstance.getManifest()
doesn't exists;0
ongetProgramDateTime
method ifthis.presentationTimeline
returns invalid value;How to test
console
tab of yourdevelopers tools
;presentationTimeline
ofnull
.A picture is worth a thousand words
Before
https://user-images.githubusercontent.com/5631063/103773574-0775fc80-500a-11eb-8f80-2481cb30202f.mov
After
https://user-images.githubusercontent.com/5631063/103773598-1197fb00-500a-11eb-9739-af2f5243f61c.mov