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

gatsby-remark-video-shortcode

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gatsby-remark-video-shortcode - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

22

index.js

@@ -13,6 +13,2 @@ "use strict";

var extractString = function extractString(str) {
return str.substring(1, str.length - 1);
};
module.exports = function (_ref, pluginOptions) {

@@ -33,11 +29,11 @@ var markdownAST = _ref.markdownAST;

var x = tree.children[0].attributes;
var url = extractString(x.url ? _.escape(x.url) : "");
var control = extractString(x.control);
var loop = extractString(x.loop);
var autoplay = extractString(x.autoplay);
var muted = extractString(x.muted);
var height = extractString(x.height);
var width = extractString(x.width);
var poster = extractString(x.poster ? _.escape(x.poster) : "");
var html = ("\n <div style=\"position: relative; margin-left: auto; margin-right: auto;\">\n <video " + (control && "controls=" + control) + " loop=" + loop + "\n " + (autoplay && muted && "autoplay=" + autoplay) + " allowfullscreen=true\n " + (muted && "muted=" + muted) + " height=" + height + " width=" + width + " poster=" + poster + ">\n <source src=" + url + " type=\"video/mp4\" />\n <source src=" + url + " type=\"video/ogg\" />\n <source src=" + url + " type=\"video/webm\" />\n </video>\n </div>\n\n ").trim();
var url = x.url ? _.escape(x.url) : "";
var control = x.control;
var loop = x.loop;
var autoplay = x.autoplay;
var muted = x.muted;
var height = x.height;
var width = x.width;
var poster = x.poster ? _.escape(x.poster) : "";
var html = ("\n <div style=\"position: relative; margin-left: auto; margin-right: auto;\">\n <video " + (control === "true" ? "controls" : "") + " " + (loop === "true" ? "loop" : "") + "\n " + (autoplay === "true" && muted === "true" ? "autoplay" : "") + " allowfullscreen=true\n " + (muted === "true" ? "muted=true" : "") + " height=" + height + " width=" + width + " poster=" + poster + ">\n <source src=" + url + " type=\"video/mp4\" />\n <source src=" + url + " type=\"video/ogg\" />\n <source src=" + url + " type=\"video/webm\" />\n </video>\n </div>\n\n ").trim();
node.type = "html";

@@ -44,0 +40,0 @@ node.children = undefined;

{
"name": "gatsby-remark-video-shortcode",
"description": "Processes videos in markdown so they can be used in the production build.",
"version": "1.0.2",
"version": "1.0.3",
"author": "Aayushi Agrawal aayushi.agrawal13@gmail.com",

@@ -6,0 +6,0 @@ "bugs": {

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