render-media
Advanced tools
+9
-16
@@ -97,14 +97,13 @@ exports.render = render | ||
| function renderMediaSource () { | ||
| if (!MediaSource) { | ||
| return nextTick(cb, new Error( | ||
| 'Video/audio streaming is not supported in your browser. You can still share ' + | ||
| 'or download ' + file.name + ' (once it\'s fully downloaded). Use Chrome for ' + | ||
| 'MediaSource support.' | ||
| )) | ||
| } | ||
| var tagName = MEDIASOURCE_VIDEO_EXTS.indexOf(extname) >= 0 ? 'video' : 'audio' | ||
| if (VIDEOSTREAM_EXTS.indexOf(extname) >= 0) useVideostream() | ||
| else useMediaSource() | ||
| if (MediaSource) { | ||
| if (VIDEOSTREAM_EXTS.indexOf(extname) >= 0) { | ||
| useVideostream() | ||
| } else { | ||
| useMediaSource() | ||
| } | ||
| } else { | ||
| useBlobURL() | ||
| } | ||
@@ -237,8 +236,2 @@ function useVideostream () { | ||
| function nextTick (cb, err, val) { | ||
| process.nextTick(function () { | ||
| cb(err, val) | ||
| }) | ||
| } | ||
| function getBlobURL (file, cb) { | ||
@@ -245,0 +238,0 @@ var extname = path.extname(file.name).toLowerCase() |
+1
-1
| { | ||
| "name": "render-media", | ||
| "description": "Intelligently render media files in the browser", | ||
| "version": "2.3.1", | ||
| "version": "2.4.0", | ||
| "author": { | ||
@@ -6,0 +6,0 @@ "name": "Feross Aboukhadijeh", |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
42024
-0.67%347
-1.42%