render-media
Advanced tools
Comparing version 2.3.1 to 2.4.0
25
index.js
@@ -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() |
{ | ||
"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", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
42024
347