We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Input :
format code extension resolution note 243 webm 640x360 DASH video 190k , vp9, 30fps, vid 247 webm 1280x720 DASH video 509k , vp9, 30fps, v 136 mp4 1280x720 DASH video 958k , avc1.4d401f, 30 17 3gp 176x144 small , mp4v.20.3, mp4a.40.2@ 24k 36 3gp 320x180 small , mp4v.20.3, mp4a.40.2 5 flv 426x240 small , h263, mp3 @ 64k 43 webm 640x360 medium , vp8.0, vorbis@128k 18 mp4 640x360 medium , avc1.42001E, mp4a. 22 mp4 1280x720 hd720 , avc1.64001F, mp4a.4
Code:
function getQualitys(d){ var re = /^([0-9]{1,2})\s+(mp4)\s+([0-9x]+)\s+(.+)$/gm; var m; var gma = []; while ((m = re.exec(d)) !== null) { if (m.index === re.lastIndex) { re.lastIndex++; } gma[gma.length] = [m[1],m[2],m[3],m[4]]; } return gma; }
Node js Output:
[ [ '18', 'mp4', '640x360', 'medium , avc1.42001E, mp4a.40.2@ 96k' ], [ '22', 'mp4', '1280x720', 'hd720 , avc1.64001F, mp4a.40.2@192k (best)' ], [ '18', 'mp4', '640x360', 'medium , avc1.42001E, mp4a.40.2@ 96k' ], [ '22', 'mp4', '1280x720', 'hd720 , avc1.64001F, mp4a.40.2@192k (best)' ] ]
Firefox Output :
[ [ '18', 'mp4', '640x360', 'medium , avc1.42001E, mp4a.40.2@ 96k' ], [ '22', 'mp4', '1280x720', 'hd720 , avc1.64001F, mp4a.40.2@192k (best)' ] ]
Version : v5.7.1 Linux rurigk 3.19.0-49-generic #55-Ubuntu SMP Fri Jan 22 02:10:24 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered:
I tested with node 5.7.1 and the included input and code works just fine for me:
var input = ` format code extension resolution note 243 webm 640x360 DASH video 190k , vp9, 30fps, vid 247 webm 1280x720 DASH video 509k , vp9, 30fps, v 136 mp4 1280x720 DASH video 958k , avc1.4d401f, 30 17 3gp 176x144 small , mp4v.20.3, mp4a.40.2@ 24k 36 3gp 320x180 small , mp4v.20.3, mp4a.40.2 5 flv 426x240 small , h263, mp3 @ 64k 43 webm 640x360 medium , vp8.0, vorbis@128k 18 mp4 640x360 medium , avc1.42001E, mp4a. 22 mp4 1280x720 hd720 , avc1.64001F, mp4a.4 `; function getQualitys(d){ var re = /^([0-9]{1,2})\s+(mp4)\s+([0-9x]+)\s+(.+)$/gm; var m; var gma = []; while ((m = re.exec(d)) !== null) { if (m.index === re.lastIndex) { re.lastIndex++; } gma[gma.length] = [m[1],m[2],m[3],m[4]]; } return gma; } console.dir(getQualitys(input));
Output:
[ [ '18', 'mp4', '640x360', 'medium , avc1.42001E, mp4a.' ], [ '22', 'mp4', '1280x720', 'hd720 , avc1.64001F, mp4a.4' ] ]
Sorry, something went wrong.
Sorry, I discovered my problem the error is in the module that used I have already changed the module and everything has been corrected
No branches or pull requests
Input :
Code:
Node js Output:
Firefox Output :
Version : v5.7.1
Linux rurigk 3.19.0-49-generic #55-Ubuntu SMP Fri Jan 22 02:10:24 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered: