Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

yt-dash-manifest-generator

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yt-dash-manifest-generator - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

package.json
{
"name": "yt-dash-manifest-generator",
"version": "1.0.1",
"version": "1.0.2",
"description": "",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -30,1 +30,8 @@ # YouTube Dash Manifest Generator NodeJS Documentation

```
**generate_dash_file_from_formats(VideoFormats, VideoLength)**
Takes an array of formats in the way which yt-dl-core provides it as well as the video length in seconds and generates the xml file
```javascript
const xml_string = generate_dash_file_from_formats(VideoFormats, VideoLength)
```
const ytdl = require('ytdl-core');
const xml = require('xml-js')
class DashGenerator {
// if you already have the getInfo data from ytdl-core use this function
// if you already have the getInfo data from ytdl-core as a string, use this function
static generate_dash_file_from_json_data(JsonStringData, VideoLength) {

@@ -12,2 +12,8 @@ const jsonObject = JSON.parse(JsonStringData)

// use this if you already have aformats array
static generate_dash_file_from_formats(VideoFormats, VideoLength) {
const generatedJSON = this.generate_xmljs_json_from_data(VideoFormats, VideoLength)
return xml.json2xml(generatedJSON)
}
// if you do not have the data from ytdl-core already, use this function

@@ -14,0 +20,0 @@ static async generate_dash_file_from_json_data_from_id(VideoId, VideoLength) {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc