videogular2 icon indicating copy to clipboard operation
videogular2 copied to clipboard

VgQualitySelector Label

Open josephlodero opened this issue 7 years ago • 5 comments

Does anybody here tried to change the label of quality selector?

josephlodero avatar Jun 14 '18 04:06 josephlodero

The Label names come back from both the HLS.js and DashJs libraries straight out of the video source. Are you hoping to do some sort of manipulation of those reported name/values? Considering each video can have a completely different set of available encodes and bitrates how would you match that list consistently? Or are you just talking about the ability to relabel "AUTO" to something else?

kwarismian avatar Jun 14 '18 19:06 kwarismian

Hi @kwarismian,

Thank you for the reply. I was just talking about changing the label. The docs(http://videogular.github.io/videogular2/docs/modules/controls/vg-quality-selector/) said you can override the label by using the onGetBitrate but there is no follow up doc how to use this.

Thanks

josephlodero avatar Jun 17 '18 23:06 josephlodero

@josephlodero you can using onGetBitrate callback.

Create a method on your TS file:

onGetBitrates($event) {
    // Manipalute $event and add your labels
    this.dashBitrates = yourManipulatedEvent;
}

Then assign dashBitrates to VgQualitySelector.

<vg-quality-selector [bitrates]="dashBitrates"
                     (onBitrateChange)="vgDash.setBitrate($event)">
</vg-quality-selector>

Elecash avatar Jun 18 '18 09:06 Elecash

@Elecash Hi,

Thank you for the reply and sorry to bother you..

but can you please give me a full example for this?

Thanks in advance!

josephlodero avatar Jun 21 '18 02:06 josephlodero

@josephlodero Hi, Have you found solution for it? Please describe if you have done it.

abhishekdarteweb avatar Aug 16 '21 05:08 abhishekdarteweb