Skip to content

Commit

Permalink
refactor(stream-inf): uses the parseResolution function to extract a …
Browse files Browse the repository at this point in the history
…resolution object
  • Loading branch information
amtins committed Aug 12, 2023
1 parent 29bde83 commit 5e837a6
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/parse-stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,16 +319,7 @@ export default class ParseStream extends Stream {
event.attributes = parseAttributes(match[1]);

if (event.attributes.RESOLUTION) {
const split = event.attributes.RESOLUTION.split('x');
const resolution = {};

if (split[0]) {
resolution.width = parseInt(split[0], 10);
}
if (split[1]) {
resolution.height = parseInt(split[1], 10);
}
event.attributes.RESOLUTION = resolution;
event.attributes.RESOLUTION = parseResolution(event.attributes.RESOLUTION);
}
if (event.attributes.BANDWIDTH) {
event.attributes.BANDWIDTH = parseInt(event.attributes.BANDWIDTH, 10);
Expand Down

0 comments on commit 5e837a6

Please sign in to comment.