src-rx/src/components/Utils.js
/**
     * Convert quality code into text
     * @param {number} quality code
     * @returns {array<string>} lines that decode qulity
     */
Convert quality code into text
@param {number} quality code
@returns {array} lines that decode qulity
Convert quality code into text @param { number } quality code @returns { array } lines that decode qulity
static quality2text(quality) {
        const custom = quality & 0xFFFF0000;
        const text = QUALITY_BITS[quality];
        let result;
        if (text) {
            result = [text];
        } else if (quality & 0x01) {
            result = [QUALITY_BITS[0x01], '0x' + (quality & (0xFFFF & ~1)).toString(16)];
        } else if (quality & 0x02) {
            result = [QUALITY_BITS[0x02], '0x' + (quality & (0xFFFF & ~2)).toString(16)];
        } else {
            result = ['0x' + quality.toString(16)];
        }
        if (custom) {
            result.push('0x' + (custom >> 16).toString(16).toUpperCase());
        }
        return result;
    }
static quality2text ( quality ) { const custom = quality & 0xFFFF0000 ; const text = QUALITY_BITS [ quality ] ; let result ; if ( text ) { result = [ text ] ; } else if ( quality & 0x01 ) { result = [ QUALITY_BITS [ 0x01 ] , '0x' + ( quality & ( 0xFFFF & ~ 1 ) ) . toString ( 16 ) ] ; } else if ( quality & 0x02 ) { result = [ QUALITY_BITS [ 0x02 ] , '0x' + ( quality & ( 0xFFFF & ~ 2 ) ) . toString ( 16 ) ] ; } else { result = [ '0x' + quality . toString ( 16 ) ] ; } if ( custom ) { result . push ( '0x' + ( custom >> 16 ) . toString ( 16 ) . toUpperCase ( ) ) ; } return result ; }
Convert quality code into text
 @param {number} quality code
 @returns {array<string>} lines that decode qulity
Convert quality code into text @param { number } quality code @returns { array<string > } lines that decode qulity