{"id":13743948,"url":"https://github.com/myflashlab/AS3-youtube-parser-video-link","last_synced_at":"2025-05-09T02:31:56.453Z","repository":{"id":26689687,"uuid":"30146570","full_name":"myflashlab/AS3-youtube-parser-video-link","owner":"myflashlab","description":"This AS3 library can parse standard youtube links like https://www.youtube.com/watch?v=QowwaefoCec and will extract different elements of that video like available direct video addresses and video thumbnail. it works with public unrestricted video files only.","archived":false,"fork":false,"pushed_at":"2020-03-22T10:20:29.000Z","size":84,"stargazers_count":20,"open_issues_count":1,"forks_count":8,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-11-15T15:41:21.549Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"ActionScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/myflashlab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-01T13:16:12.000Z","updated_at":"2020-10-12T08:06:47.000Z","dependencies_parsed_at":"2022-08-18T04:55:18.391Z","dependency_job_id":null,"html_url":"https://github.com/myflashlab/AS3-youtube-parser-video-link","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myflashlab%2FAS3-youtube-parser-video-link","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myflashlab%2FAS3-youtube-parser-video-link/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myflashlab%2FAS3-youtube-parser-video-link/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myflashlab%2FAS3-youtube-parser-video-link/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/myflashlab","download_url":"https://codeload.github.com/myflashlab/AS3-youtube-parser-video-link/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253177759,"owners_count":21866394,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T05:01:00.236Z","updated_at":"2025-05-09T02:31:56.210Z","avatar_url":"https://github.com/myflashlab.png","language":"ActionScript","funding_links":[],"categories":["File Formats"],"sub_categories":["Misc Formats"],"readme":"## AS3-youtube-parser-video-link ##\nThis AS3 library can parse standard youtube links like **https://www.youtube.com/watch?v=QowwaefoCec** \nand will extract different elements of that video like available direct video addresses, video title\nand video thumbnail. It works with public unrestricted video files only.\n\nI must add that I wrote this library after being inspired by https://github.com/jeckman/YouTube-Downloader\n\nIt works on Android/iOS/Windows/Mac AIR projects.\n\nUSAGE:\n\n```actionscript\n\nimport com.doitflash.remote.youtube.YouTubeLinkParser;\nimport com.doitflash.remote.youtube.YouTubeLinkParserEvent;\nimport com.doitflash.remote.youtube.VideoType;\nimport com.doitflash.remote.youtube.VideoQuality;\n\nvar _ytParser:YouTubeLinkParser = new YouTubeLinkParser();\n_ytParser.addEventListener(YouTubeLinkParserEvent.COMPLETE, onComplete);\n_ytParser.addEventListener(YouTubeLinkParserEvent.ERROR, onError);\n_ytParser.parse(\"https://www.youtube.com/watch?v=QowwaefoCec\");\n\nfunction onError(e:YouTubeLinkParserEvent):void\n{\n\t// removing listeners just for clean cosing reasons!\n\t_ytParser.removeEventListener(YouTubeLinkParserEvent.COMPLETE, onComplete);\n\t_ytParser.removeEventListener(YouTubeLinkParserEvent.ERROR, onError);\n\ttrace(\"Error: \" + e.param.msg);\n}\n\nfunction onComplete(e:YouTubeLinkParserEvent):void\n{\n\t// removing listeners just for clean coding reasons!\n\t_ytParser.removeEventListener(YouTubeLinkParserEvent.COMPLETE, onComplete);\n\t_ytParser.removeEventListener(YouTubeLinkParserEvent.ERROR, onError);\n         \n\ttrace(\"youTube parse completed...\");\n\ttrace(\"video thumb: \" + _ytParser.thumb);\n\ttrace(\"video title: \" + _ytParser.title);\n\ttrace(\"possible found videos: \" + _ytParser.videoFormats.length);\n\t      \n\ttrace(\"you can only access youtube public videos... no age restriction for example!\");\n\ttrace(\"some video formats may be null so you should check their availablily...\");\n\ttrace(\"to make your job easier, I built another method called getHeaders() which will load video headers for you! you can know the video size using these header information :) \");\n\t\n\t// let's find the VideoType.VIDEO_MP4 video format in VideoQuality.MEDIUM for this video\n\t// NOTICE: you should find your own way of selecting a video format! as different videos may not have all formats or qualities available!\n\t      \n\tvar chosenVideo:String;\n\tfor (var i:int = 0; i \u003c _ytParser.videoFormats.length; i++) \n\t{\n\t\tvar currVideoData:Object = _ytParser.videoFormats[i];\n\t\tif (currVideoData.mimeType.indexOf(VideoType.VIDEO_MP4) \u003e -1 \u0026\u0026 currVideoData.quality == VideoQuality.MEDIUM)\n\t\t{\n\t\t\tchosenVideo = currVideoData.url;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t_ytParser.addEventListener(YouTubeLinkParserEvent.VIDEO_HEADER_RECEIVED, onHeadersReceived);\n\t_ytParser.addEventListener(YouTubeLinkParserEvent.VIDEO_HEADER_ERROR, onHeadersError);\n\t_ytParser.getHeaders(chosenVideo);\n}\n     \nfunction onHeadersError(e:YouTubeLinkParserEvent):void\n{\n\t_ytParser.removeEventListener(YouTubeLinkParserEvent.VIDEO_HEADER_RECEIVED, onHeadersReceived);\n\t_ytParser.removeEventListener(YouTubeLinkParserEvent.VIDEO_HEADER_ERROR, onHeadersError);\n         \n\ttrace(\"Error: \" + e.param.msg)\n}\n     \nfunction onHeadersReceived(event:YouTubeLinkParserEvent):void\n{\n\t_ytParser.removeEventListener(YouTubeLinkParserEvent.VIDEO_HEADER_RECEIVED, onHeadersReceived);\n\t_ytParser.removeEventListener(YouTubeLinkParserEvent.VIDEO_HEADER_ERROR, onHeadersError);\n         \n\tvar lng:int = event.param.headers.length;\n\tvar i:int;\n\tvar currHeader:*;\n         \n\tfor (i = 0; i \u003c lng; i++ )\n\t{\n\t\tcurrHeader = event.param.headers[i];\n\t\ttrace(currHeader.name + \" = \" + currHeader.value);\n\t}\n         \n\t// ok, we are happy! now let's download this video, like any other file you would download:\n\tdownload(event.param.url);\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmyflashlab%2FAS3-youtube-parser-video-link","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmyflashlab%2FAS3-youtube-parser-video-link","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmyflashlab%2FAS3-youtube-parser-video-link/lists"}