Socket
Socket
Sign inDemoInstall

dash-manifest-creator

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

dash-manifest-creator - npm Package Compare versions

Comparing version 1.0.4 to 1.0.6

23

classes/MPD.js

@@ -24,12 +24,11 @@ /*

import { saveAs } from 'file-saver'
export class MPD {
constructor (videoData = null) {
this.doc = document.implementation.createDocument("", "", null)
this.mpd = null
class MPD {
constructor (videoData = null, doc) {
this.video = videoData
this.doc = doc
this.mpd = doc.createElement('MPD')
}
createMpd (videoData = this.video, mediaUrl = '', startNumber = "1") {
createMpd (videoData = this.video, mediaUrl = '', startNumber = 1) {
const date = new Date(Date.now()).toISOString()
this.mpd = this.doc.createElement('MPD')
this.mpd.setAttribute('xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance')

@@ -47,3 +46,3 @@ this.mpd.setAttribute('xmlns', 'urn:mpeg:dash:schema:mpd:2011')

const st = this.createSegmentTemplate(as, "1000", "2000", startNumber, videoData, mediaUrl)
return this.doc
}

@@ -75,2 +74,3 @@

createSegmentTemplate (el, timescale = "1000", duration = "2000", startNumber = "1", videoData = this.video, media = '') {
console.log('MEDIA:::',decodeURI(media))
const st = this.doc.createElement('SegmentTemplate')

@@ -83,2 +83,3 @@ st.setAttribute('timescale', timescale)

el.appendChild(st)
console.log('ST:::', st)
return st

@@ -94,5 +95,6 @@ }

const xml = new XMLSerializer()
const str = xml.serializeToString(this.mpd)
let str = xml.serializeToString(this.mpd)
str = str.replaceAll('&', '&')
const file = new Blob([str], {
type: "text/xml",
type: "application/xml",
})

@@ -102,1 +104,4 @@ return file

}
export {
MPD
}
{
"name": "dash-manifest-creator",
"version": "1.0.4",
"version": "1.0.6",
"description": "A pure javascript package for creating MPEG-DASH manifests in the browser.",

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

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