{"id":27781,"date":"2022-04-06T02:21:02","date_gmt":"2022-04-06T02:21:02","guid":{"rendered":"http:\/\/create-custom-video-ads-in-nuxtjs"},"modified":"2022-04-06T02:21:02","modified_gmt":"2022-04-06T02:21:02","slug":"create-custom-video-ads-in-nuxtjs","status":"publish","type":"post","link":"https:\/\/cloudinary.com\/blog\/guest_post\/create-custom-video-ads-in-nuxtjs\/","title":{"rendered":"Create custom video ads in NuxtJS"},"content":{"rendered":"<div class=\"wp-block-cloudinary-markdown \"><p>Advertisement, popularly known as ads, is a marketing strategy that aims to sell a product or service to a target audience. Popular video sharing and streaming platforms like Youtube, Twitch, e.t.c, generate significant revenue by embedding adverts on their videos to promote products and businesses.<\/p>\n<p>This post discusses creating custom video adverts using <a href=\"https:\/\/cloudinary.com\/\">Cloudinary<\/a> and <a href=\"https:\/\/nuxtjs.org\/\">Nuxt<\/a>. At the end of this tutorial, we will learn how to serve videos in Nuxt using Cloudinary, play an advert at a particular time and for a specific period.<\/p>\n<h2>Sandbox<\/h2>\n<p>We completed this project in <a href=\"https:\/\/codesandbox.io\/s\/upbeat-leftpad-pupx1c\">a CodeSan<\/a><a href=\"https:\/\/codesandbox.io\/s\/upbeat-leftpad-pupx1c\">d<\/a><a href=\"https:\/\/codesandbox.io\/s\/upbeat-leftpad-pupx1c\">box<\/a>. Fork and run it to quickly get started.<\/p>\n<\/div>\n  \n  <div class=\"wp-block-cloudinary-code-sandbox \">\n    <iframe\n      src=\"https:\/\/codesandbox.io\/embed\/upbeat-leftpad-pupx1c?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=\"Code Sandbox\"\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  <div class=\"wp-block-cloudinary-markdown \"><p>Github link <a href=\"https:\/\/github.com\/Mr-Malomz\/video_ads\">here<\/a>.<\/p>\n<h2>Prerequisites<\/h2>\n<p>To fully grasp the concepts presented in this tutorial, a good knowledge of JavaScript and Vue.js is required. Experience with Nuxt isn\u2019t a requirement, but it\u2019s nice to have.<\/p>\n<p>We also need a <a href=\"https:\/\/cloudinary.com\/\">Cloudinary account<\/a> to store and transform media assets. <a href=\"https:\/\/cloudinary.com\/users\/register\/free\"><strong>Signup<\/strong><\/a> <strong>is completely free<\/strong>.<\/p>\n<h2>Getting Started<\/h2>\n<p>We need to create a Nuxt starter project by navigating to the desired directory and running the command below in our terminal.<\/p>\n<pre><code>npx create-nuxt-app video_ads &amp;&amp; cd video_ads\n<\/code><\/pre>\n<p>This command will ask us some questions on how to configure our application. We can answer the questions as shown below:<\/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\">Ok to proceed? (y) &lt; PRESS <span class=\"hljs-string\">\"y\"<\/span> <span class=\"hljs-keyword\">and<\/span> hit ENTER&gt;\nproject name: &lt;PRESS ENTER&gt;\nprogramming langauge: &lt;JAVASCRIPT&gt;\npackage manager: &lt;NPM&gt;\nUI framework: &lt;TAILWIND CSS&gt;\nNuxt.js modules: &lt;AXIOS - PROMISE BASED HTTP CLIENT&gt;\nLinting tools: &lt;ESLINT, PRETTIER&gt;\nTesting framework: &lt;NONE&gt;\nRendering mode: &lt;UNIVERSAL (SSR\/<span class=\"hljs-keyword\">STATIC<\/span>)\nDeployment target: &lt;<span class=\"hljs-keyword\">STATIC<\/span>\/JAMSTACK HOSTING&gt;\nDeployment tools: &lt;JSCONFIG.JSON&gt;\nContinous integration: &lt;NONE&gt;\nVersion control system: &lt;GIT&gt;\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>The command creates a Nuxt.js project with TailwindCSS called <code>video_ads<\/code> and navigates into the project directory.<\/p>\n<p><a href=\"https:\/\/tailwindcss.com\/\">TailwindCSS<\/a> is a utility-first CSS framework packed with classes to help us style our web page.<\/p>\n<p><strong>Configuring Cloudinary in Nuxt<\/strong><\/p>\n<p>First, we need to modify the <code>nuxt.config.js<\/code> file by adding Cloudinary CDNs to the <code>link<\/code>  and <code>script<\/code> section as shown below:<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\">    head: {\n        <span class=\"hljs-attr\">title<\/span>: <span class=\"hljs-string\">'video_thumbnail'<\/span>,\n    <span class=\"hljs-attr\">htmlAttrs<\/span>: {\n      <span class=\"hljs-attr\">lang<\/span>: <span class=\"hljs-string\">'en'<\/span>,\n    },\n    <span class=\"hljs-attr\">meta<\/span>: &#91;\n      { <span class=\"hljs-attr\">charset<\/span>: <span class=\"hljs-string\">'utf-8'<\/span> },\n      { <span class=\"hljs-attr\">name<\/span>: <span class=\"hljs-string\">'viewport'<\/span>, <span class=\"hljs-attr\">content<\/span>: <span class=\"hljs-string\">'width=device-width, initial-scale=1'<\/span> },\n      { <span class=\"hljs-attr\">hid<\/span>: <span class=\"hljs-string\">'description'<\/span>, <span class=\"hljs-attr\">name<\/span>: <span class=\"hljs-string\">'description'<\/span>, <span class=\"hljs-attr\">content<\/span>: <span class=\"hljs-string\">''<\/span> },\n      { <span class=\"hljs-attr\">name<\/span>: <span class=\"hljs-string\">'format-detection'<\/span>, <span class=\"hljs-attr\">content<\/span>: <span class=\"hljs-string\">'telephone=no'<\/span> },\n    ],\n    <span class=\"hljs-attr\">link<\/span>: &#91;\n      { <span class=\"hljs-attr\">rel<\/span>: <span class=\"hljs-string\">'icon'<\/span>, <span class=\"hljs-attr\">type<\/span>: <span class=\"hljs-string\">'image\/x-icon'<\/span>, <span class=\"hljs-attr\">href<\/span>: <span class=\"hljs-string\">'\/favicon.ico'<\/span> },\n      {\n        <span class=\"hljs-attr\">rel<\/span>: <span class=\"hljs-string\">'stylesheet'<\/span>,\n        <span class=\"hljs-attr\">href<\/span>: <span class=\"hljs-string\">'https:\/\/unpkg.com\/cloudinary-video-player@1.5.9\/dist\/cld-video-player.min.css'<\/span>,\n      },\n    ],\n    <span class=\"hljs-attr\">script<\/span>: &#91;\n      {\n        <span class=\"hljs-attr\">src<\/span>: <span class=\"hljs-string\">'https:\/\/unpkg.com\/cloudinary-core@latest\/cloudinary-core-shrinkwrap.min.js'<\/span>,\n      },\n      {\n        <span class=\"hljs-attr\">src<\/span>: <span class=\"hljs-string\">'https:\/\/unpkg.com\/cloudinary-video-player@1.5.9\/dist\/cld-video-player.min.js'<\/span>,\n      },\n    ],\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\">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>Next, we need to include Cloudinary\u2019s cloud name as an environment variable. To do this, first, we need to create a <code>.env<\/code> file in the root directory, and in this file, add the snippet below:<\/p>\n<pre><code>NUXT_ENV_CLOUDINARY_CLOUD_NAME=&lt;YOUR CLOUD NAME HERE&gt;\n<\/code><\/pre>\n<p><strong>PS<\/strong>: We can get <strong>Cloudinary\u2019s cloud name<\/strong> by logging <em>into the<\/em> <a href=\"https:\/\/cloudinary.com\/console\"><em>Cloudinary console<\/em><\/a><em>.<\/em><\/p>\n<h2>Video sourcing and upload to Cloudinary<\/h2>\n<p>Next, we need to upload a sample video to create a custom video advert.<\/p>\n<p><strong>Video URL<\/strong><\/p>\n<ul>\n<li>\n<a href=\"https:\/\/res.cloudinary.com\/dtgbzmpca\/video\/upload\/v1645539487\/dancing-catvideo.webm\">https:\/\/res.cloudinary.com\/dtgbzmpca\/video\/upload\/v1645539487\/dancing-catvideo.webm<\/a>\n<\/li>\n<\/ul>\n<p>In our Cloudinary dashboard, we uploaded the video by clicking on the <strong>Media Library<\/strong> tab, clicking on <strong>Upload<\/strong>, selecting the <strong>Web Address<\/strong> option, inputting the <strong>url<\/strong>, and clicking on the <strong>Arrow Button<\/strong> to upload.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cloudinary-marketing-res.cloudinary.com\/image\/upload\/c_limit,w_2000\/f_auto\/q_auto\/media_jams\/s_09154C99BD025007588E7E863D13AB13FE936D0B55FA69EF06F32C362371F6D6_1635104341304_Screenshot+2021-10-24+at+20.37.46.png\" alt=\"Cloudinary console and upload button for other formats of upload\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"2000\" height=\"275\"\/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cloudinary-marketing-res.cloudinary.com\/image\/upload\/c_limit,w_2000\/f_auto\/q_auto\/media_jams\/s_83F3FBD7ECC4D58C256BC95B11E26148AE441C8ED8A1FF0E7E7D0A2229B1C1FD_1642503859751_Screenshot+2022-01-16+at+22.15.17.png\" alt=\"select web address and enter url\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"2000\" height=\"958\"\/><\/p>\n<p>After uploading the video, we will see it displayed on the console with its <code>publicId<\/code>. The <strong>ID<\/strong> will come in handy when creating a custom video advert.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cloudinary-marketing-res.cloudinary.com\/image\/upload\/c_limit,w_2000\/f_auto\/q_auto\/media_jams\/s_591FD6E74F721203ADBB06626E80032991173FA72FA190B8120E0E3557A4C401_1645661365030_Screenshot+2022-02-24+at+01.03.04.png\" alt=\"Uploaded video with publicId highlighted\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"2000\" height=\"939\"\/><\/p>\n<h2>Creating the Custom Video Ads<\/h2>\n<p>We modify the <code>index.vue<\/code> file in the <code>pages<\/code>  folder to the following:<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml shcb-wrap-lines\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">template<\/span>&gt;<\/span>\n  <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"flex flex-col items-center p-8\"<\/span>&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">h1<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"text-xl font-medium text-blue-900 mb-8\"<\/span>&gt;<\/span>Cloudinary Video Ads<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">h1<\/span>&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"relative\"<\/span>&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">video<\/span> <span class=\"hljs-attr\">:id<\/span>=<span class=\"hljs-string\">\"`video-player`\"<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"w-96 h-96\"<\/span> <span class=\"hljs-attr\">muted<\/span> <span class=\"hljs-attr\">controls<\/span>&gt;<\/span><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">video<\/span>&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span>\n        <span class=\"hljs-attr\">v-if<\/span>=<span class=\"hljs-string\">\"showAds\"<\/span>\n        <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"flex justify-between w-96 py-4 px-4 bg-white shadow-lg absolute bottom-0 z-10\"<\/span>\n      &gt;<\/span>\n        <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">section<\/span> <span class=\"hljs-attr\">class<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">p<\/span>&gt;<\/span>Read more contents from<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">p<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">a<\/span> <span class=\"hljs-attr\">href<\/span>=<span class=\"hljs-string\">\"https:\/\/hackmamba.io\/\"<\/span> <span class=\"hljs-attr\">target<\/span>=<span class=\"hljs-string\">\"_blank\"<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"font-medium text-blue-700\"<\/span>&gt;<\/span>Here<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">a<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">section<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">button<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"font-bold\"<\/span> @<span class=\"hljs-attr\">click<\/span>=<span class=\"hljs-string\">\"closeShowAds\"<\/span>&gt;<\/span>X<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">button<\/span>&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n  <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">template<\/span>&gt;<\/span>\n\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">script<\/span>&gt;<\/span><span class=\"javascript\">\n<span class=\"hljs-keyword\">export<\/span> <span class=\"hljs-keyword\">default<\/span> {\n  <span class=\"hljs-attr\">name<\/span>: <span class=\"hljs-string\">'IndexPage'<\/span>,\n  data() {\n    <span class=\"hljs-keyword\">return<\/span> {\n      <span class=\"hljs-attr\">cld<\/span>: <span class=\"hljs-literal\">null<\/span>,\n      <span class=\"hljs-attr\">player<\/span>: <span class=\"hljs-literal\">null<\/span>,\n      <span class=\"hljs-attr\">showAds<\/span>: <span class=\"hljs-literal\">false<\/span>,\n      <span class=\"hljs-attr\">interval<\/span>: <span class=\"hljs-literal\">null<\/span>,\n      <span class=\"hljs-attr\">timeRun<\/span>: <span class=\"hljs-number\">0<\/span>\n    }\n  },\n  mounted() {\n    <span class=\"hljs-keyword\">this<\/span>.player = <span class=\"hljs-keyword\">this<\/span>.videoList;\n    <span class=\"hljs-keyword\">this<\/span>.cld = cloudinary.Cloudinary.new({\n      <span class=\"hljs-attr\">cloud_name<\/span>: process.env.NUXT_ENV_CLOUDINARY_CLOUD_NAME,\n      <span class=\"hljs-attr\">secure<\/span>: <span class=\"hljs-literal\">true<\/span>,\n    })\n    <span class=\"hljs-keyword\">this<\/span>.player = <span class=\"hljs-keyword\">this<\/span>.cld.videoPlayer(<span class=\"hljs-string\">`video-player`<\/span>)\n    <span class=\"hljs-keyword\">this<\/span>.player.source(<span class=\"hljs-string\">`dancing-catvideo.jpg`<\/span>)\n    <span class=\"hljs-keyword\">this<\/span>.player.play()\n  },\n  <span class=\"hljs-attr\">methods<\/span>: {\n    closeShowAds() {\n      <span class=\"hljs-keyword\">this<\/span>.showAds = <span class=\"hljs-literal\">false<\/span>;\n    },\n    openShowAds() {\n      <span class=\"hljs-keyword\">this<\/span>.showAds = <span class=\"hljs-literal\">true<\/span>;\n    },\n  },\n  created() {\n    <span class=\"hljs-keyword\">this<\/span>.interval = setInterval(<span class=\"hljs-function\"><span class=\"hljs-params\">()<\/span> =&gt;<\/span> {\n      <span class=\"hljs-keyword\">this<\/span>.timeRun += <span class=\"hljs-number\">1<\/span>;\n      <span class=\"hljs-keyword\">if<\/span> (<span class=\"hljs-keyword\">this<\/span>.timeRun === <span class=\"hljs-number\">10<\/span>) {\n        <span class=\"hljs-keyword\">this<\/span>.openShowAds()\n      }\n      <span class=\"hljs-keyword\">if<\/span> (<span class=\"hljs-keyword\">this<\/span>.timeRun === <span class=\"hljs-number\">20<\/span>) {\n        <span class=\"hljs-keyword\">this<\/span>.closeShowAds()\n      }\n    }, <span class=\"hljs-number\">1000<\/span>);\n  },\n}\n<\/span><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">script<\/span>&gt;<\/span>\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><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>The snippet above does the following:<\/p>\n<ul>\n<li>Create data properties to manage Cloudinary instance, video element, toggling advert, monitoring video player, and showing advert.<\/li>\n<li>Use the <code>mounted<\/code> lifecycle method to create a Cloudinary instance, initialize the video player, assign a source to the video using the uploaded video\u2019s <code>publicId<\/code>, and play the video on page load.<\/li>\n<li>Create a <code>closeShowAds<\/code> and <code>openShowAds<\/code> method to close and show the advert.<\/li>\n<li>Use the <code>created<\/code> lifecycle method to monitor the video to show an advert after 10 seconds and close the advert after running for additional 10 seconds.<\/li>\n<li>Markup to show the video and advert section.<\/li>\n<\/ul>\n<p>With that done, we can start a development server using the command below:<\/p>\n<pre><code>npm run dev\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/cloudinary-marketing-res.cloudinary.com\/image\/upload\/c_limit,w_2000\/f_auto\/q_auto\/media_jams\/s_59B14555CE2F7BBDF99A7CA6E18ACA476B33D96981ABF46A30193BD2ABA19357_1647778711975_Screenshot+2022-03-20+at+11.46.12.png\" alt=\"playing video without ads\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"2000\" height=\"944\"\/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cloudinary-marketing-res.cloudinary.com\/image\/upload\/c_limit,w_2000\/f_auto\/q_auto\/media_jams\/s_59B14555CE2F7BBDF99A7CA6E18ACA476B33D96981ABF46A30193BD2ABA19357_1647778762416_Screenshot+2022-03-20+at+11.46.00.png\" alt=\"Video showing ads\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"2000\" height=\"944\"\/><\/p>\n<h1>Conclusion<\/h1>\n<p>This post discussed creating custom video adverts using <a href=\"https:\/\/cloudinary.com\/\">Cloudinary<\/a> and <a href=\"https:\/\/nuxtjs.org\/\">Nuxt<\/a>.<\/p>\n<p>These resources might be helpful:<\/p>\n<ul>\n<li>\n<a href=\"https:\/\/tailwindcss.com\/\">TailwindCSS<\/a>.<\/li>\n<li>\n<a href=\"https:\/\/cloudinary.com\/documentation\/video_manipulation_and_delivery\">Cloudinary Video Transformation<\/a>.<\/li>\n<\/ul>\n<\/div>","protected":false},"excerpt":{"rendered":"","protected":false},"author":41,"featured_media":27782,"comment_status":"","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_cloudinary_featured_overwrite":false,"footnotes":""},"categories":[1],"tags":[384,134,372,371,303,315],"class_list":["post-27781","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-delivery","tag-guest-post","tag-nuxtjs","tag-under-review","tag-video","tag-vue"],"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>Create custom video ads in NuxtJS<\/title>\n<meta name=\"description\" content=\"This post discusses creating custom video adverts using Cloudinary and Nuxt.\" \/>\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\/create-custom-video-ads-in-nuxtjs\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Create custom video ads in NuxtJS\" \/>\n<meta property=\"og:description\" content=\"This post discusses creating custom video adverts using Cloudinary and Nuxt.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cloudinary.com\/blog\/guest_post\/create-custom-video-ads-in-nuxtjs\/\" \/>\n<meta property=\"og:site_name\" content=\"Cloudinary Blog\" \/>\n<meta property=\"article:published_time\" content=\"2022-04-06T02:21:02+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681926305\/Web_Assets\/blog\/5318f092794bb589cf150d331ee78b560280ad8a-2024x1012-1_277829cce2\/5318f092794bb589cf150d331ee78b560280ad8a-2024x1012-1_277829cce2.png?_i=AA\" \/>\n\t<meta property=\"og:image:width\" content=\"2024\" \/>\n\t<meta property=\"og:image:height\" content=\"1012\" \/>\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\/create-custom-video-ads-in-nuxtjs\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-custom-video-ads-in-nuxtjs\/\"},\"author\":{\"name\":\"\",\"@id\":\"\"},\"headline\":\"Create custom video ads in NuxtJS\",\"datePublished\":\"2022-04-06T02:21:02+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-custom-video-ads-in-nuxtjs\/\"},\"wordCount\":6,\"publisher\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-custom-video-ads-in-nuxtjs\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681926305\/Web_Assets\/blog\/5318f092794bb589cf150d331ee78b560280ad8a-2024x1012-1_277829cce2\/5318f092794bb589cf150d331ee78b560280ad8a-2024x1012-1_277829cce2.png?_i=AA\",\"keywords\":[\"Delivery\",\"Guest Post\",\"NuxtJS\",\"Under Review\",\"Video\",\"Vue\"],\"inLanguage\":\"en-US\",\"copyrightYear\":\"2022\",\"copyrightHolder\":{\"@id\":\"https:\/\/cloudinary.com\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-custom-video-ads-in-nuxtjs\/\",\"url\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-custom-video-ads-in-nuxtjs\/\",\"name\":\"Create custom video ads in NuxtJS\",\"isPartOf\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-custom-video-ads-in-nuxtjs\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-custom-video-ads-in-nuxtjs\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681926305\/Web_Assets\/blog\/5318f092794bb589cf150d331ee78b560280ad8a-2024x1012-1_277829cce2\/5318f092794bb589cf150d331ee78b560280ad8a-2024x1012-1_277829cce2.png?_i=AA\",\"datePublished\":\"2022-04-06T02:21:02+00:00\",\"description\":\"This post discusses creating custom video adverts using Cloudinary and Nuxt.\",\"breadcrumb\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-custom-video-ads-in-nuxtjs\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cloudinary.com\/blog\/guest_post\/create-custom-video-ads-in-nuxtjs\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-custom-video-ads-in-nuxtjs\/#primaryimage\",\"url\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681926305\/Web_Assets\/blog\/5318f092794bb589cf150d331ee78b560280ad8a-2024x1012-1_277829cce2\/5318f092794bb589cf150d331ee78b560280ad8a-2024x1012-1_277829cce2.png?_i=AA\",\"contentUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681926305\/Web_Assets\/blog\/5318f092794bb589cf150d331ee78b560280ad8a-2024x1012-1_277829cce2\/5318f092794bb589cf150d331ee78b560280ad8a-2024x1012-1_277829cce2.png?_i=AA\",\"width\":2024,\"height\":1012},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-custom-video-ads-in-nuxtjs\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/cloudinary.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create custom video ads in NuxtJS\"}]},{\"@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":"Create custom video ads in NuxtJS","description":"This post discusses creating custom video adverts using Cloudinary and Nuxt.","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\/create-custom-video-ads-in-nuxtjs\/","og_locale":"en_US","og_type":"article","og_title":"Create custom video ads in NuxtJS","og_description":"This post discusses creating custom video adverts using Cloudinary and Nuxt.","og_url":"https:\/\/cloudinary.com\/blog\/guest_post\/create-custom-video-ads-in-nuxtjs\/","og_site_name":"Cloudinary Blog","article_published_time":"2022-04-06T02:21:02+00:00","og_image":[{"width":2024,"height":1012,"url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681926305\/Web_Assets\/blog\/5318f092794bb589cf150d331ee78b560280ad8a-2024x1012-1_277829cce2\/5318f092794bb589cf150d331ee78b560280ad8a-2024x1012-1_277829cce2.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\/create-custom-video-ads-in-nuxtjs\/#article","isPartOf":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-custom-video-ads-in-nuxtjs\/"},"author":{"name":"","@id":""},"headline":"Create custom video ads in NuxtJS","datePublished":"2022-04-06T02:21:02+00:00","mainEntityOfPage":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-custom-video-ads-in-nuxtjs\/"},"wordCount":6,"publisher":{"@id":"https:\/\/cloudinary.com\/blog\/#organization"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-custom-video-ads-in-nuxtjs\/#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681926305\/Web_Assets\/blog\/5318f092794bb589cf150d331ee78b560280ad8a-2024x1012-1_277829cce2\/5318f092794bb589cf150d331ee78b560280ad8a-2024x1012-1_277829cce2.png?_i=AA","keywords":["Delivery","Guest Post","NuxtJS","Under Review","Video","Vue"],"inLanguage":"en-US","copyrightYear":"2022","copyrightHolder":{"@id":"https:\/\/cloudinary.com\/#organization"}},{"@type":"WebPage","@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-custom-video-ads-in-nuxtjs\/","url":"https:\/\/cloudinary.com\/blog\/guest_post\/create-custom-video-ads-in-nuxtjs\/","name":"Create custom video ads in NuxtJS","isPartOf":{"@id":"https:\/\/cloudinary.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-custom-video-ads-in-nuxtjs\/#primaryimage"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-custom-video-ads-in-nuxtjs\/#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681926305\/Web_Assets\/blog\/5318f092794bb589cf150d331ee78b560280ad8a-2024x1012-1_277829cce2\/5318f092794bb589cf150d331ee78b560280ad8a-2024x1012-1_277829cce2.png?_i=AA","datePublished":"2022-04-06T02:21:02+00:00","description":"This post discusses creating custom video adverts using Cloudinary and Nuxt.","breadcrumb":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-custom-video-ads-in-nuxtjs\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cloudinary.com\/blog\/guest_post\/create-custom-video-ads-in-nuxtjs\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-custom-video-ads-in-nuxtjs\/#primaryimage","url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681926305\/Web_Assets\/blog\/5318f092794bb589cf150d331ee78b560280ad8a-2024x1012-1_277829cce2\/5318f092794bb589cf150d331ee78b560280ad8a-2024x1012-1_277829cce2.png?_i=AA","contentUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681926305\/Web_Assets\/blog\/5318f092794bb589cf150d331ee78b560280ad8a-2024x1012-1_277829cce2\/5318f092794bb589cf150d331ee78b560280ad8a-2024x1012-1_277829cce2.png?_i=AA","width":2024,"height":1012},{"@type":"BreadcrumbList","@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-custom-video-ads-in-nuxtjs\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cloudinary.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Create custom video ads in NuxtJS"}]},{"@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\/v1681926305\/Web_Assets\/blog\/5318f092794bb589cf150d331ee78b560280ad8a-2024x1012-1_277829cce2\/5318f092794bb589cf150d331ee78b560280ad8a-2024x1012-1_277829cce2.png?_i=AA","_links":{"self":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/27781","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=27781"}],"version-history":[{"count":0,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/27781\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/media\/27782"}],"wp:attachment":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/media?parent=27781"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/categories?post=27781"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/tags?post=27781"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}