-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decouple setup playback process from the load source process #15
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some files could not be reviewed due to errors:
�[31mERROR�[0m: Can't find config file: eslint:recommended
�[31mERROR�[0m: Can't find config file: eslint:recommended
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some files could not be reviewed due to errors:
�[31mERROR�[0m: Can't find config file: eslint:recommended
�[31mERROR�[0m: Can't find config file: eslint:recommended
…ggered if loadSourceBeforePlay is true
f7bf8bf
to
6df510b
Compare
README.md
Outdated
}); | ||
``` | ||
|
||
#### `hlsPlayback.loadSourceBeforePlay` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about naming it as preload
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in b90c5ae
Summary
The code that creates an instance of
HLS.JS
also parses the manifest automatically. To avoid this behavior when is necessary, this PR creates a new configuration (options.hlsPlayback.preload
) for parsing happens only after aplay
command is received.Also, configure
Jest
to avoid noise logs on test output.Changes
options.hlsPlayback
;options.hlsPlayback.preload
;defaultOptions
getter representingoptions.hlsPlayback
initial values;options.hlsPlayback
withdefaultOptions
;_manifestParsed
;MANIFEST_PARSED
HLS.JS
event to set valuetrue
on_manifestParsed
flag;false
on_manifestParsed
flag when_setup
method is called;_setup
process;Jest
to run with--silent
flag;HTML5Video
playback (it's already covered on@clappr/core
);How to test
With
options.hlsPlayback.preload
asfalse
:HlsjsPlayback
;network
tab on your browserdeveloper tools
;.m3u8
) or video chunk (.ts
) should have be download.With
options.hlsPlayback.preload
astrue
:HlsjsPlayback
;network
tab on your browserdeveloper tools
;.m3u8
) and video chunks (.ts
) should have be download.A picture/video tells a thousand words
Before this PR
Screen.Recording.2021-01-31.at.15.54.22.mov
After this PR
With
options.hlsPlayback.preload
astrue
:Screen.Recording.2021-01-31.at.15.56.58.mov
With
options.hlsPlayback.preload
asfalse
:Screen.Recording.2021-01-31.at.15.58.12.mov