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

render-media

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

render-media - npm Package Compare versions

Comparing version 2.1.0 to 2.2.0

18

index.js

@@ -6,3 +6,3 @@ exports.render = render

var debug = require('debug')('render-media')
var MediaSourceStream = require('mediasource')
var MediaElementWrapper = require('mediasource')
var path = require('path')

@@ -118,3 +118,6 @@ var streamToBlobURL = require('stream-to-blob-url')

file.createReadStream().pipe(new MediaSourceStream(elem, { extname: extname }))
var wrapper = new MediaElementWrapper(elem)
var writable = wrapper.createWriteStream(getCodec(file.name))
file.createReadStream().pipe(writable)
if (currentTime) elem.currentTime = currentTime

@@ -227,1 +230,12 @@ }

}
function getCodec (name) {
var ext = path.extname(name).toLowerCase()
return {
'.m4a': 'audio/mp4; codecs="mp4a.40.5"',
'.m4v': 'video/mp4; codecs="avc1.640029, mp4a.40.5"',
'.mp3': 'audio/mpeg',
'.mp4': 'video/mp4; codecs="avc1.640029, mp4a.40.5"',
'.webm': 'video/webm; codecs="vorbis, vp8"'
}[ext]
}

4

package.json
{
"name": "render-media",
"description": "Intelligently render media files in the browser",
"version": "2.1.0",
"version": "2.2.0",
"author": {

@@ -15,3 +15,3 @@ "name": "Feross Aboukhadijeh",

"debug": "^2.2.0",
"mediasource": "^1.0.0",
"mediasource": "^2.1.0",
"stream-to-blob-url": "^2.0.0",

@@ -18,0 +18,0 @@ "videostream": "^2.0.0"

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