Skip to content
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

fix(FEC-14000): Download plugins opens empty overlay while there are … #56

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

JonathanTGold
Copy link
Contributor

@JonathanTGold JonathanTGold commented Jun 16, 2024

  1. remove flavors filter preventing audio files from being displayed
  2. display an audio icon for audio files
  3. display language as a description (instead of bitrate in video files) in audio files

Resolves FEC-14000, FEC-13915 FEC-13939

Related pr:
kaltura/kaltura-player-js#805
kaltura/playkit-js-audio-player#27
kaltura/playkit-js-share#50
kaltura/playkit-js-transcript#205

@@ -34,7 +34,13 @@ module.exports = {
{
test: /\.scss$/,
use: [
'style-loader',
{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this needed ?

src/components/sources-list/sources-list.tsx Show resolved Hide resolved
src/download.tsx Outdated Show resolved Hide resolved
src/download.tsx Outdated
@@ -143,11 +144,11 @@ class Download extends KalturaPlayer.core.BasePlugin {
await this.ready;

this.downloadPluginManager.setShowOverlay(false, false);
const downloadMetadata = await this.downloadPluginManager.getDownloadMetadata(true);
this.downloadMetadata = await this.downloadPluginManager.getDownloadMetadata(true);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should also clean up the value, probably in reset()

return flavor.height > 0;
});
const sortedFlavors = flavors.sort((a: {height: number}, b: {height: number}) => {
return a.height < b.height ? 1 : -1;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return a.height < b.height ? 1 : -1;
return a.height - b.height;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you mean b - a in that case

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're right
so b.height - a.height it is

return flavor.height > 0;
});
const sortedFlavors = flavors.sort((a: {height: number}, b: {height: number}) => {
return a.height < b.height ? 1 : -1;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're right
so b.height - a.height it is

@@ -158,7 +165,10 @@ class Download extends KalturaPlayer.core.BasePlugin {

reset() {
this.upperBarManager?.remove(this.iconId);
// @ts-ignore
this.player.getService('AudioPluginsManager').remove(this.audioPlayerIconId)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can add a getter for the service

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants