New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@cloudinary/html

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cloudinary/html - npm Package Compare versions

Comparing version
1.12.0
to
1.13.0
+3
-2
layers/htmlVideoLayer.d.ts

@@ -1,2 +0,2 @@

import { Plugins, HtmlPluginState, VideoSources, VideoType, VideoPoster } from '../types';
import { Plugins, HtmlPluginState, VideoSources, VideoType, VideoPoster, VideoOptions } from '../types';
import { CloudinaryVideo } from "@cloudinary/url-gen";

@@ -19,3 +19,4 @@ export declare class HtmlVideoLayer {

};
constructor(element: HTMLVideoElement | null, userCloudinaryVideo: CloudinaryVideo, sources: VideoSources, plugins?: Plugins, videoAttributes?: object, userCloudinaryPoster?: VideoPoster);
videoOptions: VideoOptions;
constructor(element: HTMLVideoElement | null, userCloudinaryVideo: CloudinaryVideo, sources: VideoSources, plugins?: Plugins, videoAttributes?: object, userCloudinaryPoster?: VideoPoster, videoOptions?: VideoOptions);
/**

@@ -22,0 +23,0 @@ * Handles user supplied sources or default sources

+10
-3

@@ -6,3 +6,3 @@ import cloneDeep from 'lodash.clonedeep';

var HtmlVideoLayer = /** @class */ (function () {
function HtmlVideoLayer(element, userCloudinaryVideo, sources, plugins, videoAttributes, userCloudinaryPoster) {
function HtmlVideoLayer(element, userCloudinaryVideo, sources, plugins, videoAttributes, userCloudinaryPoster, videoOptions) {
var _this = this;

@@ -13,2 +13,3 @@ this.mimeType = 'video';

this.originalVideo = userCloudinaryVideo;
this.videoOptions = videoOptions;
this.htmlPluginState = { cleanupCallbacks: [], pluginEventSubscription: [] };

@@ -37,3 +38,3 @@ var pluginCloudinaryVideo = cloneDeep(userCloudinaryVideo);

defaultTypes.forEach(function (type) {
_this.appendSourceTag(userCloudinaryVideo, type);
_this.appendSourceTag(cloneDeep(userCloudinaryVideo), type);
});

@@ -62,3 +63,8 @@ }

HtmlVideoLayer.prototype.appendSourceTag = function (userCloudinaryVideo, type, mimeType) {
var _a;
var source = document.createElement('source');
var shouldUseFetchFormat = (_a = this.videoOptions) === null || _a === void 0 ? void 0 : _a.useFetchFormat;
if (shouldUseFetchFormat) {
userCloudinaryVideo.format(type);
}
var url = userCloudinaryVideo.toURL();

@@ -70,3 +76,4 @@ // Split url to get analytics string so that we can insert the file extension (type) before it

var analyticsStr = srcParts[1] ? "".concat(ANALYTICS_DELIMITER).concat(srcParts[1]) : '';
source.src = "".concat(srcParts[0], ".").concat(type).concat(analyticsStr);
var ext = shouldUseFetchFormat ? '' : ".".concat(type);
source.src = "".concat(srcParts[0]).concat(ext).concat(analyticsStr);
// Ideally, we want to use the VIDEO_MIME_TYPE to detect the mime of the extension

@@ -73,0 +80,0 @@ // For future proofing of simple formats (say .foo and mimetype of video/foo), we also fallback to the actual type

{
"name": "@cloudinary/html",
"version": "1.12.0",
"version": "1.13.0",
"description": "An HTML wrapper for Cloudinary",

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

@@ -40,2 +40,5 @@ import { CloudinaryImage } from "@cloudinary/url-gen/assets/CloudinaryImage";

export type VideoPoster = CloudinaryImage | 'auto';
export type VideoOptions = {
useFetchFormat?: boolean;
};
export {};

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display