{"id":27912,"date":"2021-10-25T15:28:05","date_gmt":"2021-10-25T15:28:05","guid":{"rendered":"http:\/\/Video-aspect-ratio-editor-using-Nuxt.Js"},"modified":"2023-07-07T15:40:45","modified_gmt":"2023-07-07T22:40:45","slug":"video-aspect-ratio-editor-using-nuxt-js","status":"publish","type":"post","link":"https:\/\/cloudinary.com\/blog\/guest_post\/video-aspect-ratio-editor-using-nuxt-js\/","title":{"rendered":"Video aspect ratio editor using Nuxt.Js"},"content":{"rendered":"<div class=\"wp-block-cloudinary-markdown \"><h2>Introduction<\/h2>\n<p>An aspect ratio of an image is the ratio of an image\u2019s width to its height. It is commonly two numbers separated by a colon such as 16:9. As we increasingly have different devices being created some with varying display sizes and viewing angles, aspect ratios help us create optimally viewable videos. This situation has been exacerbated by different software demanding their own aspect ratios such as social media websites.<\/p>\n<p>In this tutorial, we review how we can dynamically render the same video in varying aspect ratios.<\/p>\n<h2>Codesandbox<\/h2>\n<p>The final project can be viewed on <a href=\"https:\/\/codesandbox.io\/s\/video-aspect-ratio-editor-62mth\">Codesandbox<\/a>.<\/p>\n<\/div>\n\n\n  <div class=\"wp-block-cloudinary-code-sandbox \">\n    <iframe\n      src=\"https:\/\/codesandbox.io\/embed\/video-aspect-ratio-editor-62mth?theme=dark&amp;codemirror=1&amp;highlights=&amp;editorsize=50&amp;fontsize=14&amp;expanddevtools=0&amp;hidedevtools=0&amp;eslint=0&amp;forcerefresh=0&amp;hidenavigation=0&amp;initialpath=%2F&amp;module=&amp;moduleview=0&amp;previewwindow=&amp;view=&amp;runonclick=1\"\n      height=\"500\"\n      style=\"width: 100%;\"\n      title=\"video-aspect-ratio-editor\"\n      loading=\"lazy\"\n      allow=\"accelerometer; ambient-light-sensor; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; payment; usb; vr; xr-spatial-tracking\"\n      sandbox=\"allow-forms allow-modals allow-popups allow-presentation allow-same-origin allow-scripts\"\n    ><\/iframe>\n  <\/div>\n\n\n<div class=\"wp-block-cloudinary-markdown \"><p>You can find the full source code on my <a href=\"https:\/\/github.com\/musebe\/video-aspect-ratio-editor.git\">Github<\/a> repository.<\/p>\n<h2>Prerequisites<\/h2>\n<p>A basic understanding of HTML, CSS, and JavaScript is required to be able to follow along with this tutorial. Knowledge of Vue.Js and Nuxt.Js is not required to understand but would be beneficial.<\/p>\n<h1>Setup<\/h1>\n<h2>Nuxt.Js<\/h2>\n<p><a href=\"https:\/\/nuxtjs.org\">Nuxt.Js<\/a> is an intuitive Vue framework that boasts of being easy to learn and easy to use. To quickly get started with Nuxt.Js, ensure you have <a href=\"https:\/\/yarnpkg.com\">Yarn package manager<\/a> installed or <a href=\"https:\/\/www.npmjs.com\">Node package manager<\/a> greater than version v5.2+ or v6.1. This will ensure that <a href=\"https:\/\/www.npmjs.com\/package\/npx\">npx<\/a> is installed by default. This enables us to use the <a href=\"https:\/\/github.com\/nuxt\/create-nuxt-app\">create-nuxt-app<\/a> utility.<\/p>\n<p>To get started, open the terminal in your working directory of preference.<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php shcb-wrap-lines\">\nyarn create nuxt-app nuxtjs-video-aspect-ratio-editor\n\n<span class=\"hljs-comment\"># OR<\/span>\n\nnpx create-nuxt-app nuxtjs-video-aspect-ratio-editor\n\n<span class=\"hljs-comment\"># OR<\/span>\n\nnpm init nuxt-app nuxtjs-video-aspect-ratio-editor\n\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>This will result in a series of questions. Here are our recommended defaults:<\/p>\n<blockquote>\n<p>Project name: nuxtjs-video-aspect-ratio-editor<\/p>\n<\/blockquote>\n<blockquote>\n<p>Programming language: JavaScript<\/p>\n<\/blockquote>\n<blockquote>\n<p>Package manager: Yarn<\/p>\n<\/blockquote>\n<blockquote>\n<p>UI framework: Tailwind CSS<\/p>\n<\/blockquote>\n<blockquote>\n<p>Nuxt.js modules: N\/A<\/p>\n<\/blockquote>\n<blockquote>\n<p>Linting tools: N\/A<\/p>\n<\/blockquote>\n<blockquote>\n<p>Testing frameworks: None<\/p>\n<\/blockquote>\n<blockquote>\n<p>Rendering mode: Universal (SSR \/ SSG)<\/p>\n<\/blockquote>\n<blockquote>\n<p>Deployment target: Server (Node.js hosting)<\/p>\n<\/blockquote>\n<blockquote>\n<p>Development tools: N\/A<\/p>\n<\/blockquote>\n<blockquote>\n<p>What is your Github username: <code>&lt;your-github-username&gt;<\/code><\/p>\n<\/blockquote>\n<blockquote>\n<p>Version control system: Git<\/p>\n<\/blockquote>\n<p>Once the setup is complete, you may now enter the directory and run the project:<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php shcb-wrap-lines\">\ncd nuxtjs-video-aspect-ratio-editor\n\n\nyarn dev\n\n<span class=\"hljs-comment\"># OR<\/span>\n\nnpm run dev\n\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<h2>@nuxtjs\/cloudinary<\/h2>\n<p><a href=\"https:\/\/cloudinary\">Cloudinary<\/a> is a media management platform that enables us to make the most of our media assets through its comprehensive service, APIs and SDKs. We are going to install the recommended Nuxt.Js plugin, <a href=\"https:\/\/cloudinary.nuxtjs.org\">@nuxtjs\/cloudinary<\/a>.<\/p>\n<p>Open the terminal in your project folder to add the dependency:<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"CSS\" data-shcb-language-slug=\"css\"><span><code class=\"hljs language-css shcb-wrap-lines\">\n<span class=\"hljs-selector-tag\">yarn<\/span> <span class=\"hljs-selector-tag\">add<\/span> <span class=\"hljs-keyword\">@nuxtjs<\/span>\/cloudinary\n\n# <span class=\"hljs-keyword\">or<\/span>\n\nnpm install @nuxtjs\/cloudinary\n\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">CSS<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">css<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>Once installation is complete, add the module in the <code>modules<\/code> section of the <code>nuxt.config.js<\/code> file:<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\">\n<span class=\"hljs-comment\">\/\/ nuxt.config.js<\/span>\n\n<span class=\"hljs-keyword\">export<\/span>  <span class=\"hljs-keyword\">default<\/span>  {\n\n...\n\nmodules: &#91;\n\n<span class=\"hljs-string\">'@nuxtjs\/cloudinary'<\/span>\n\n]\n\n...\n\n}\n\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>We will then configure our Cloudinary instance by adding a <code>cloudinary<\/code> section to the <code>nuxt.config.js<\/code> file:<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\">\n<span class=\"hljs-comment\">\/\/ nuxt.config.js<\/span>\n\n<span class=\"hljs-keyword\">export<\/span>  <span class=\"hljs-keyword\">default<\/span>  {\n\n...\n\ncloudinary: {\n\n<span class=\"hljs-attr\">cloudName<\/span>:  process.env.NUXT_ENV_CLOUDINARY_CLOUD_NAME,\n\n<span class=\"hljs-attr\">useComponent<\/span>:  <span class=\"hljs-literal\">true<\/span>,\n\n<span class=\"hljs-attr\">secure<\/span>:  <span class=\"hljs-literal\">true<\/span>\n\n}\n\n}\n\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-5\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>In the above piece of code, we refer to an environmental variable (<code>NUXT_ENV_CLOUDINARY_CLOUD_NAME<\/code>). Environmental variables as values that are not dependent on our code itself but on the environment in the code that is executed. They are also useful for sensitive credentials we do not want to be exposed to in our code repositories. Let us first create the <code>.env<\/code> file which will contain our environmental variables:<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-6\" data-shcb-language-name=\"CSS\" data-shcb-language-slug=\"css\"><span><code class=\"hljs language-css shcb-wrap-lines\">\n<span class=\"hljs-selector-tag\">touch<\/span> <span class=\"hljs-selector-class\">.env<\/span>\n\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-6\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">CSS<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">css<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>We will then set our environmental variables in the file<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-7\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml shcb-wrap-lines\">\nNUXT_ENV_CLOUDINARY_CLOUD_NAME=<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">secret-cloud-name<\/span>&gt;<\/span>\n\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-7\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">HTML, XML<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">xml<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<h2>Uploading video file<\/h2>\n<p>Before uploading the video file, we first need to create a form for the user to select the file for upload:<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-8\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml shcb-wrap-lines\">\n<span class=\"hljs-comment\">&lt;!-- pages\/index.vue --&gt;<\/span>\n\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">form<\/span> <span class=\"hljs-attr\">action<\/span>=<span class=\"hljs-string\">\"#\"<\/span>  <span class=\"hljs-attr\">method<\/span>=<span class=\"hljs-string\">\"POST\"<\/span>  @<span class=\"hljs-attr\">submit.prevent<\/span>=<span class=\"hljs-string\">\"submit\"<\/span>  &gt;<\/span>\n\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">label<\/span> <span class=\"hljs-attr\">for<\/span>=<span class=\"hljs-string\">\"email\"<\/span>&gt;<\/span>Video<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">label<\/span>&gt;<\/span>\n\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">input<\/span>\n\n<span class=\"hljs-attr\">id<\/span>=<span class=\"hljs-string\">\"file\"<\/span>\n\n<span class=\"hljs-attr\">name<\/span>=<span class=\"hljs-string\">\"file\"<\/span>\n\n<span class=\"hljs-attr\">type<\/span>=<span class=\"hljs-string\">\"file\"<\/span>\n\n<span class=\"hljs-attr\">required<\/span>\n\n@<span class=\"hljs-attr\">change<\/span>=<span class=\"hljs-string\">\"handleFile\"<\/span>\n\n\/&gt;<\/span>\n\n<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n\n<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">p<\/span> <span class=\"hljs-attr\">v-if<\/span>=<span class=\"hljs-string\">\"uploading\"<\/span>  &gt;<\/span>\n\nUploading...\n\n<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">p<\/span>&gt;<\/span>\n\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">button<\/span> <span class=\"hljs-attr\">v-else<\/span>  <span class=\"hljs-attr\">type<\/span>=<span class=\"hljs-string\">\"submit\"<\/span>  &gt;<\/span>\n\nUpload\n\n<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">button<\/span>&gt;<\/span>\n\n<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n\n<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">form<\/span>&gt;<\/span>\n\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-8\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">HTML, XML<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">xml<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>On file selection, the <code>handleFile<\/code> method will be called whereas the <code>submit<\/code> method will be called once the form is submitted.<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-9\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\">\n<span class=\"hljs-comment\">\/\/ pages\/index.vue<\/span>\n\n<span class=\"hljs-keyword\">export<\/span>  <span class=\"hljs-keyword\">default<\/span>  {\n\ndata()  {\n\n<span class=\"hljs-keyword\">return<\/span>  {\n\n<span class=\"hljs-attr\">uploading<\/span>:  <span class=\"hljs-literal\">false<\/span>,\n\n<span class=\"hljs-attr\">uploadVideo<\/span>:  <span class=\"hljs-literal\">null<\/span>,\n\n<span class=\"hljs-attr\">cloudinaryVideo<\/span>:  <span class=\"hljs-literal\">null<\/span>,\n\n...\n\n};\n\n},\n\n<span class=\"hljs-attr\">methods<\/span>:  {\n\n<span class=\"hljs-keyword\">async<\/span>  handleFile(e)  {\n\n<span class=\"hljs-keyword\">this<\/span>.uploadVideo  =  e.target.files&#91;<span class=\"hljs-number\">0<\/span>];\n\n},\n\n<span class=\"hljs-keyword\">async<\/span>  readData(f)  {\n\n<span class=\"hljs-keyword\">return<\/span>  <span class=\"hljs-keyword\">new<\/span>  <span class=\"hljs-built_in\">Promise<\/span>(<span class=\"hljs-function\">(<span class=\"hljs-params\">resolve<\/span>)  =&gt;<\/span>  {\n\n<span class=\"hljs-keyword\">const<\/span>  reader  =  <span class=\"hljs-keyword\">new<\/span>  FileReader();\n\nreader.onloadend  =  <span class=\"hljs-function\"><span class=\"hljs-params\">()<\/span>  =&gt;<\/span>  resolve(reader.result);\n\nreader.readAsDataURL(f);\n\n});\n\n},\n\n<span class=\"hljs-keyword\">async<\/span>  submit()  {\n\n<span class=\"hljs-keyword\">this<\/span>.uploading  =  <span class=\"hljs-literal\">true<\/span>;\n\n<span class=\"hljs-keyword\">const<\/span>  videoData  =  <span class=\"hljs-keyword\">await<\/span>  <span class=\"hljs-keyword\">this<\/span>.readData(<span class=\"hljs-keyword\">this<\/span>.uploadVideo);\n\n<span class=\"hljs-keyword\">this<\/span>.cloudinaryVideo  =  <span class=\"hljs-keyword\">await<\/span>  <span class=\"hljs-keyword\">this<\/span>.$cloudinary.upload(videoData,  {\n\n<span class=\"hljs-attr\">upload_preset<\/span>:  <span class=\"hljs-string\">\"default-preset\"<\/span>,\n\n<span class=\"hljs-attr\">folder<\/span>:  <span class=\"hljs-string\">\"nuxtjs-video-aspect-ratio-editor\"<\/span>,\n\n});\n\n<span class=\"hljs-keyword\">this<\/span>.uploading  =  <span class=\"hljs-literal\">false<\/span>;\n\n...\n\n},\n\n...\n\n},\n\n};\n\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-9\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>The <code>handleFile<\/code> method simply stores the selected file in our local state. The <code>submit<\/code> method uses the <code>readData<\/code> method to obtain the file data from the selected file. It then uploads this file data to Cloudinary specifying the upload present and the upload folder.<\/p>\n<p>An upload preset is a pre-determined set of options to be applied to a file upload on Cloudinary. To create an upload preset, proceed to the <a href=\"https:\/\/cloudinary.com\/console\/lui\/upload_presets\/new\">create upload preset<\/a> page. We recommend using the following defaults:<\/p>\n<blockquote>\n<p>Name: default-preset<\/p>\n<\/blockquote>\n<blockquote>\n<p>Unique filename: true<\/p>\n<\/blockquote>\n<blockquote>\n<p>Delivery type: upload<\/p>\n<\/blockquote>\n<blockquote>\n<p>Access mode: public<\/p>\n<\/blockquote>\n<p>Once the file upload is complete is when we now proceed to generate the videos with varying aspect ratios.<\/p>\n<h2>Changing aspect ratios<\/h2>\n<p>We first need to determine which aspect ratios we want to convert to. Let\u2019s add them into a state variable.<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-10\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\">\n<span class=\"hljs-comment\">\/\/ pages\/index.vue<\/span>\n\n<span class=\"hljs-keyword\">export<\/span>  <span class=\"hljs-keyword\">default<\/span>  {\n\ndata(){\n\n<span class=\"hljs-keyword\">return<\/span>  {\n\n...\n\naspectRatios: &#91;\n\n{ <span class=\"hljs-attr\">value<\/span>:  <span class=\"hljs-string\">\"7680x4320\"<\/span>, <span class=\"hljs-attr\">label<\/span>:  <span class=\"hljs-string\">\"7680 x 4320 (8K UHDTV)\"<\/span>  },\n\n{ <span class=\"hljs-attr\">value<\/span>:  <span class=\"hljs-string\">\"5120x2880\"<\/span>, <span class=\"hljs-attr\">label<\/span>:  <span class=\"hljs-string\">\"5120 x 2880 (5K, iMac with retina screen)\"<\/span>  },\n\n{ <span class=\"hljs-attr\">value<\/span>:  <span class=\"hljs-string\">\"3840x2160\"<\/span>, <span class=\"hljs-attr\">label<\/span>:  <span class=\"hljs-string\">\"3840 \u00d7 2160 (4K UHDTV)\"<\/span>  },\n\n{ <span class=\"hljs-attr\">value<\/span>:  <span class=\"hljs-string\">\"2048x1536\"<\/span>, <span class=\"hljs-attr\">label<\/span>:  <span class=\"hljs-string\">\"2048 x 1536 (iPad with retina screen)\"<\/span>  },\n\n{ <span class=\"hljs-attr\">value<\/span>:  <span class=\"hljs-string\">\"1920x1200\"<\/span>, <span class=\"hljs-attr\">label<\/span>:  <span class=\"hljs-string\">\"1920 x 1200 (WUXGA)\"<\/span>  },\n\n{ <span class=\"hljs-attr\">value<\/span>:  <span class=\"hljs-string\">\"1920x1080\"<\/span>, <span class=\"hljs-attr\">label<\/span>:  <span class=\"hljs-string\">\"1920 x 1080 (HD TV, iPhone 6 plus)\"<\/span>  },\n\n{ <span class=\"hljs-attr\">value<\/span>:  <span class=\"hljs-string\">\"1334x750\"<\/span>, <span class=\"hljs-attr\">label<\/span>:  <span class=\"hljs-string\">\"1334 x 750 (iPhone 6)\"<\/span>  },\n\n{ <span class=\"hljs-attr\">value<\/span>:  <span class=\"hljs-string\">\"1200x630\"<\/span>, <span class=\"hljs-attr\">label<\/span>:  <span class=\"hljs-string\">\"1200 x 630 (Facebook)\"<\/span>  },\n\n{ <span class=\"hljs-attr\">value<\/span>:  <span class=\"hljs-string\">\"1136x640\"<\/span>, <span class=\"hljs-attr\">label<\/span>:  <span class=\"hljs-string\">\"1136 x 640 (iPhone 5 screen)\"<\/span>  },\n\n{ <span class=\"hljs-attr\">value<\/span>:  <span class=\"hljs-string\">\"1024x768\"<\/span>, <span class=\"hljs-attr\">label<\/span>:  <span class=\"hljs-string\">\"1024 x 768 (iPad)\"<\/span>  },\n\n{ <span class=\"hljs-attr\">value<\/span>:  <span class=\"hljs-string\">\"1024x512\"<\/span>, <span class=\"hljs-attr\">label<\/span>:  <span class=\"hljs-string\">\"1024 x 512 (Twitter)\"<\/span>  },\n\n{ <span class=\"hljs-attr\">value<\/span>:  <span class=\"hljs-string\">\"960x640\"<\/span>, <span class=\"hljs-attr\">label<\/span>:  <span class=\"hljs-string\">\"960 x 640 (iPhone 4 screen)\"<\/span>  },\n\n{ <span class=\"hljs-attr\">value<\/span>:  <span class=\"hljs-string\">\"800x600\"<\/span>, <span class=\"hljs-attr\">label<\/span>:  <span class=\"hljs-string\">\"800 x 600\"<\/span>  },\n\n{ <span class=\"hljs-attr\">value<\/span>:  <span class=\"hljs-string\">\"728x90\"<\/span>, <span class=\"hljs-attr\">label<\/span>:  <span class=\"hljs-string\">\"728 x 90 (Common web banner ad size)\"<\/span>  },\n\n{ <span class=\"hljs-attr\">value<\/span>:  <span class=\"hljs-string\">\"720x576\"<\/span>, <span class=\"hljs-attr\">label<\/span>:  <span class=\"hljs-string\">\"720 x 576 (PAL)\"<\/span>  },\n\n{ <span class=\"hljs-attr\">value<\/span>:  <span class=\"hljs-string\">\"640x480\"<\/span>, <span class=\"hljs-attr\">label<\/span>:  <span class=\"hljs-string\">\"640 x 480 (VGA)\"<\/span>  },\n\n{ <span class=\"hljs-attr\">value<\/span>:  <span class=\"hljs-string\">\"576x486\"<\/span>, <span class=\"hljs-attr\">label<\/span>:  <span class=\"hljs-string\">\"576 x 486 (NTSC)\"<\/span>  },\n\n{ <span class=\"hljs-attr\">value<\/span>:  <span class=\"hljs-string\">\"320x480\"<\/span>, <span class=\"hljs-attr\">label<\/span>:  <span class=\"hljs-string\">\"320 x 480 (HVGA)\"<\/span>  },\n\n],\n\n...\n\n};\n\n}\n\n}\n\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-10\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>The above are the most commonly used aspect ratios. We will not proceed to generate the converted videos once the Cloudinary upload is done:<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-11\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\">\n<span class=\"hljs-comment\">\/\/ pages\/index.vue<\/span>\n\n<span class=\"hljs-keyword\">export<\/span>  <span class=\"hljs-keyword\">default<\/span>  {\n\ndata()  {\n\n<span class=\"hljs-keyword\">return<\/span>  {\n\n...\n\nvideos: &#91;],\n\n};\n\n},\n\n<span class=\"hljs-attr\">methods<\/span>:  {\n\n...\n\nasync  submit()  {\n\n...\n\nthis.generateVideos();\n\n},\n\ngenerateVideos()  {\n\n<span class=\"hljs-keyword\">this<\/span>.videos  =  <span class=\"hljs-keyword\">this<\/span>.aspectRatios.map(<span class=\"hljs-function\">(<span class=\"hljs-params\">ratio<\/span>)  =&gt;<\/span>  ({\n\nratio,\n\n<span class=\"hljs-attr\">url<\/span>:  <span class=\"hljs-keyword\">this<\/span>.$cloudinary.video.url(<span class=\"hljs-keyword\">this<\/span>.cloudinaryVideo.public_id,  {\n\n<span class=\"hljs-attr\">width<\/span>:  <span class=\"hljs-built_in\">parseInt<\/span>(ratio.value.split(<span class=\"hljs-string\">\"x\"<\/span>)&#91;<span class=\"hljs-number\">0<\/span>]),\n\n<span class=\"hljs-attr\">height<\/span>:  <span class=\"hljs-built_in\">parseInt<\/span>(ratio.value.split(<span class=\"hljs-string\">\"x\"<\/span>)&#91;<span class=\"hljs-number\">1<\/span>]),\n\n<span class=\"hljs-attr\">crop<\/span>:  <span class=\"hljs-string\">\"crop\"<\/span>,\n\n}),\n\n<span class=\"hljs-attr\">element<\/span>:  <span class=\"hljs-keyword\">this<\/span>.$cloudinary.video.element(<span class=\"hljs-keyword\">this<\/span>.cloudinaryVideo.public_id,  {\n\n<span class=\"hljs-attr\">width<\/span>:  <span class=\"hljs-built_in\">parseInt<\/span>(ratio.value.split(<span class=\"hljs-string\">\"x\"<\/span>)&#91;<span class=\"hljs-number\">0<\/span>]),\n\n<span class=\"hljs-attr\">height<\/span>:  <span class=\"hljs-built_in\">parseInt<\/span>(ratio.value.split(<span class=\"hljs-string\">\"x\"<\/span>)&#91;<span class=\"hljs-number\">1<\/span>]),\n\n<span class=\"hljs-attr\">crop<\/span>:  <span class=\"hljs-string\">\"crop\"<\/span>,\n\n<span class=\"hljs-attr\">controls<\/span>:  <span class=\"hljs-literal\">true<\/span>,\n\n})\n\n.toHtml(),\n\n}));\n\n},\n\n},\n\n};\n\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-11\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<p>The above piece of code triggers the <code>generate videos method once the upload is complete. This method iterates through each of the aspect ratios generating transformed URLS and transformed HTML video elements. This is by making use of the <\/code>$cloudinary.video.URL and the <code>$cloudinary.video.element<\/code> methods passing in the width and the height. The output is stored in the <code>video<\/code> state variable. We will not iterate this state variable to render the video and the download link to our users:<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-12\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml shcb-wrap-lines\">\n<span class=\"hljs-comment\">&lt;!-- pages\/index.vue --&gt;<\/span>\n\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">ul<\/span> <span class=\"hljs-attr\">role<\/span>=<span class=\"hljs-string\">\"list\"<\/span>  &gt;<\/span>\n\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">li<\/span> <span class=\"hljs-attr\">v-for<\/span>=<span class=\"hljs-string\">\"(video, index) in videos\"<\/span>  <span class=\"hljs-attr\">:key<\/span>=<span class=\"hljs-string\">\"index\"<\/span>&gt;<\/span>\n\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span> <span class=\"hljs-attr\">v-html<\/span>=<span class=\"hljs-string\">\"video.element\"<\/span>&gt;<\/span><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">h3<\/span>&gt;<\/span>{{ video.ratio.label }}<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">h3<\/span>&gt;<\/span>\n\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">a<\/span> <span class=\"hljs-attr\">target<\/span>=<span class=\"hljs-string\">\"_blank\"<\/span>  <span class=\"hljs-attr\">:href<\/span>=<span class=\"hljs-string\">\"video.url\"<\/span>  &gt;<\/span>\n\nDownload\n\n<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">a<\/span>&gt;<\/span>\n\n<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n\n<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n\n<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n\n<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">li<\/span>&gt;<\/span>\n\n<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">ul<\/span>&gt;<\/span>\n\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-12\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">HTML, XML<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">xml<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n<h2>Conclusion<\/h2>\n<p>Using the above tutorial, we have been able to dynamically change <a href=\"https:\/\/cloudinary.com\/glossary\/video-aspect-ratio\">video aspect ratios<\/a> in our applications. There are additional options we can specify to better customize our experience. Feel free to read more on the <a href=\"https:\/\/cloudinary.com\/documentation\/video_manipulation_and_delivery\">video transformations documentation page<\/a>.<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"","protected":false},"author":41,"featured_media":27913,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_cloudinary_featured_overwrite":false,"footnotes":""},"categories":[1],"tags":[134,372,371,303],"class_list":["post-27912","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-guest-post","tag-nuxtjs","tag-under-review","tag-video"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.6 (Yoast SEO v26.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Video aspect ratio editor using Nuxt.Js<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/cloudinary.com\/blog\/guest_post\/video-aspect-ratio-editor-using-nuxt-js\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Video aspect ratio editor using Nuxt.Js\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cloudinary.com\/blog\/guest_post\/video-aspect-ratio-editor-using-nuxt-js\/\" \/>\n<meta property=\"og:site_name\" content=\"Cloudinary Blog\" \/>\n<meta property=\"article:published_time\" content=\"2021-10-25T15:28:05+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-07-07T22:40:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/v1681925915\/Web_Assets\/blog\/d68086066778ab15a89240e441d22549955bed3e-800x600-1_279137f329\/d68086066778ab15a89240e441d22549955bed3e-800x600-1_279137f329-png?_i=AA\" \/>\n\t<meta property=\"og:image:width\" content=\"800\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"NewsArticle\",\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/video-aspect-ratio-editor-using-nuxt-js\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/video-aspect-ratio-editor-using-nuxt-js\/\"},\"author\":{\"name\":\"\",\"@id\":\"\"},\"headline\":\"Video aspect ratio editor using Nuxt.Js\",\"datePublished\":\"2021-10-25T15:28:05+00:00\",\"dateModified\":\"2023-07-07T22:40:45+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/video-aspect-ratio-editor-using-nuxt-js\/\"},\"wordCount\":7,\"publisher\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/video-aspect-ratio-editor-using-nuxt-js\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681925915\/Web_Assets\/blog\/d68086066778ab15a89240e441d22549955bed3e-800x600-1_279137f329\/d68086066778ab15a89240e441d22549955bed3e-800x600-1_279137f329.png?_i=AA\",\"keywords\":[\"Guest Post\",\"NuxtJS\",\"Under Review\",\"Video\"],\"inLanguage\":\"en-US\",\"copyrightYear\":\"2021\",\"copyrightHolder\":{\"@id\":\"https:\/\/cloudinary.com\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/video-aspect-ratio-editor-using-nuxt-js\/\",\"url\":\"https:\/\/cloudinary.com\/blog\/guest_post\/video-aspect-ratio-editor-using-nuxt-js\/\",\"name\":\"Video aspect ratio editor using Nuxt.Js\",\"isPartOf\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/video-aspect-ratio-editor-using-nuxt-js\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/video-aspect-ratio-editor-using-nuxt-js\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681925915\/Web_Assets\/blog\/d68086066778ab15a89240e441d22549955bed3e-800x600-1_279137f329\/d68086066778ab15a89240e441d22549955bed3e-800x600-1_279137f329.png?_i=AA\",\"datePublished\":\"2021-10-25T15:28:05+00:00\",\"dateModified\":\"2023-07-07T22:40:45+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/video-aspect-ratio-editor-using-nuxt-js\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cloudinary.com\/blog\/guest_post\/video-aspect-ratio-editor-using-nuxt-js\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/video-aspect-ratio-editor-using-nuxt-js\/#primaryimage\",\"url\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681925915\/Web_Assets\/blog\/d68086066778ab15a89240e441d22549955bed3e-800x600-1_279137f329\/d68086066778ab15a89240e441d22549955bed3e-800x600-1_279137f329.png?_i=AA\",\"contentUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681925915\/Web_Assets\/blog\/d68086066778ab15a89240e441d22549955bed3e-800x600-1_279137f329\/d68086066778ab15a89240e441d22549955bed3e-800x600-1_279137f329.png?_i=AA\",\"width\":800,\"height\":600},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/video-aspect-ratio-editor-using-nuxt-js\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/cloudinary.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Video aspect ratio editor using Nuxt.Js\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#website\",\"url\":\"https:\/\/cloudinary.com\/blog\/\",\"name\":\"Cloudinary Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/cloudinary.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\",\"name\":\"Cloudinary Blog\",\"url\":\"https:\/\/cloudinary.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA\",\"contentUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA\",\"width\":312,\"height\":60,\"caption\":\"Cloudinary Blog\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Video aspect ratio editor using Nuxt.Js","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/cloudinary.com\/blog\/guest_post\/video-aspect-ratio-editor-using-nuxt-js\/","og_locale":"en_US","og_type":"article","og_title":"Video aspect ratio editor using Nuxt.Js","og_url":"https:\/\/cloudinary.com\/blog\/guest_post\/video-aspect-ratio-editor-using-nuxt-js\/","og_site_name":"Cloudinary Blog","article_published_time":"2021-10-25T15:28:05+00:00","article_modified_time":"2023-07-07T22:40:45+00:00","og_image":[{"width":800,"height":600,"url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/v1681925915\/Web_Assets\/blog\/d68086066778ab15a89240e441d22549955bed3e-800x600-1_279137f329\/d68086066778ab15a89240e441d22549955bed3e-800x600-1_279137f329-png?_i=AA","type":"image\/png"}],"twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/cloudinary.com\/blog\/guest_post\/video-aspect-ratio-editor-using-nuxt-js\/#article","isPartOf":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/video-aspect-ratio-editor-using-nuxt-js\/"},"author":{"name":"","@id":""},"headline":"Video aspect ratio editor using Nuxt.Js","datePublished":"2021-10-25T15:28:05+00:00","dateModified":"2023-07-07T22:40:45+00:00","mainEntityOfPage":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/video-aspect-ratio-editor-using-nuxt-js\/"},"wordCount":7,"publisher":{"@id":"https:\/\/cloudinary.com\/blog\/#organization"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/video-aspect-ratio-editor-using-nuxt-js\/#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681925915\/Web_Assets\/blog\/d68086066778ab15a89240e441d22549955bed3e-800x600-1_279137f329\/d68086066778ab15a89240e441d22549955bed3e-800x600-1_279137f329.png?_i=AA","keywords":["Guest Post","NuxtJS","Under Review","Video"],"inLanguage":"en-US","copyrightYear":"2021","copyrightHolder":{"@id":"https:\/\/cloudinary.com\/#organization"}},{"@type":"WebPage","@id":"https:\/\/cloudinary.com\/blog\/guest_post\/video-aspect-ratio-editor-using-nuxt-js\/","url":"https:\/\/cloudinary.com\/blog\/guest_post\/video-aspect-ratio-editor-using-nuxt-js\/","name":"Video aspect ratio editor using Nuxt.Js","isPartOf":{"@id":"https:\/\/cloudinary.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/video-aspect-ratio-editor-using-nuxt-js\/#primaryimage"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/video-aspect-ratio-editor-using-nuxt-js\/#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681925915\/Web_Assets\/blog\/d68086066778ab15a89240e441d22549955bed3e-800x600-1_279137f329\/d68086066778ab15a89240e441d22549955bed3e-800x600-1_279137f329.png?_i=AA","datePublished":"2021-10-25T15:28:05+00:00","dateModified":"2023-07-07T22:40:45+00:00","breadcrumb":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/video-aspect-ratio-editor-using-nuxt-js\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cloudinary.com\/blog\/guest_post\/video-aspect-ratio-editor-using-nuxt-js\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudinary.com\/blog\/guest_post\/video-aspect-ratio-editor-using-nuxt-js\/#primaryimage","url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681925915\/Web_Assets\/blog\/d68086066778ab15a89240e441d22549955bed3e-800x600-1_279137f329\/d68086066778ab15a89240e441d22549955bed3e-800x600-1_279137f329.png?_i=AA","contentUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681925915\/Web_Assets\/blog\/d68086066778ab15a89240e441d22549955bed3e-800x600-1_279137f329\/d68086066778ab15a89240e441d22549955bed3e-800x600-1_279137f329.png?_i=AA","width":800,"height":600},{"@type":"BreadcrumbList","@id":"https:\/\/cloudinary.com\/blog\/guest_post\/video-aspect-ratio-editor-using-nuxt-js\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cloudinary.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Video aspect ratio editor using Nuxt.Js"}]},{"@type":"WebSite","@id":"https:\/\/cloudinary.com\/blog\/#website","url":"https:\/\/cloudinary.com\/blog\/","name":"Cloudinary Blog","description":"","publisher":{"@id":"https:\/\/cloudinary.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cloudinary.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/cloudinary.com\/blog\/#organization","name":"Cloudinary Blog","url":"https:\/\/cloudinary.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA","contentUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1649718331\/Web_Assets\/blog\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877\/cloudinary_logo_for_white_bg_1937437aa7_19374666c7_193742f877.png?_i=AA","width":312,"height":60,"caption":"Cloudinary Blog"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":""}]}},"jetpack_featured_media_url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681925915\/Web_Assets\/blog\/d68086066778ab15a89240e441d22549955bed3e-800x600-1_279137f329\/d68086066778ab15a89240e441d22549955bed3e-800x600-1_279137f329.png?_i=AA","_links":{"self":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/27912","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/comments?post=27912"}],"version-history":[{"count":2,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/27912\/revisions"}],"predecessor-version":[{"id":30205,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/27912\/revisions\/30205"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/media\/27913"}],"wp:attachment":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/media?parent=27912"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/categories?post=27912"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/tags?post=27912"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}