{"id":28504,"date":"2022-05-05T08:40:35","date_gmt":"2022-05-05T08:40:35","guid":{"rendered":"http:\/\/create-in-video-ads-in-next.js"},"modified":"2022-05-05T08:40:35","modified_gmt":"2022-05-05T08:40:35","slug":"create-in-video-ads-in-next-js","status":"publish","type":"post","link":"https:\/\/cloudinary.com\/blog\/guest_post\/create-in-video-ads-in-next-js\/","title":{"rendered":"Create In-Video Ads in Next.js"},"content":{"rendered":"<div class=\"wp-block-cloudinary-markdown \"><p>More than 80% of people view videos on the Internet regularly, and that people enjoy watching videos with attractive, intelligent, and timely material that isn\u2019t news to anyone.<\/p>\n<p>When watching ads for their favorite product, customers devote their time and thought. Based on the information offered in the videos, they can make informed selections regarding the products.<\/p>\n<p>Anyone can gain a competitive advantage over their current market competitors by using in-video advertising. Videos are currently the most efficient means in the advertising space of enhancing a company\u2019s sales.<\/p>\n<p>This post will teach us how to create in-video ads in Next.js using Cloudinary as our video hosting service.<\/p>\n<h2>Sandbox<\/h2>\n<p>We completed this project in a <a href=\"https:\/\/codesandbox.io\/s\/distracted-boyd-ez3fz5\">Code<\/a><a href=\"https:\/\/codesandbox.io\/s\/distracted-boyd-ez3fz5\">S<\/a><a href=\"https:\/\/codesandbox.io\/s\/distracted-boyd-ez3fz5\">andbox<\/a>. Fork and run it to get started quickly.<\/p>\n<\/div>\n  \n  <div class=\"wp-block-cloudinary-code-sandbox \">\n    <iframe\n      src=\"https:\/\/codesandbox.io\/embed\/distracted-boyd-ez3fz5?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=\"Create in-video ads in Next.js\"\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><a href=\"https:\/\/github.com\/Olanetsoft\/Create-in-video-ads-in-Next.js\">https:\/\/github.com\/Olanetsoft\/Create-in-video-ads-in-Next.js<\/a><\/p>\n<h2>Getting Started with Next.js<\/h2>\n<p><a href=\"https:\/\/nextjs.org\/\">Next.js<\/a> is an open-source, React-based frontend development web framework that allows server-side rendering and the generation of static websites and applications.<\/p>\n<p>To create a new project, we use the <code>npx create-next-app<\/code> command to scaffold a new project in a directory of our choice.<\/p>\n<p>Once the app is created, and the dependencies are automatically installed, we will see a message with instructions for navigating to our site and running it locally.<\/p>\n<p>We do this with the following command:<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml shcb-wrap-lines\">    cd <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">project<\/span> <span class=\"hljs-attr\">name<\/span>&gt;<\/span> &amp;&amp; npm start\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><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>Next.js will initiate a hot-reloading development environment accessible by default at <a href=\"http:\/\/localhost:3000\">http:\/\/localhost:3000<\/a>.<\/p>\n<p>To get started, we\u2019ll create a folder called <code>components<\/code>. We\u2019ll also create a file named <code>video.js<\/code> in the root directory and update it with the following code snippet.<\/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\">    <span class=\"hljs-keyword\">import<\/span> { useRef } <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\"react\"<\/span>;\n    \n    <span class=\"hljs-keyword\">export<\/span> <span class=\"hljs-keyword\">default<\/span> <span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span> <span class=\"hljs-title\">Video<\/span>(<span class=\"hljs-params\"><\/span>) <\/span>{\n      <span class=\"hljs-keyword\">return<\/span> (\n        <span class=\"xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span> <span class=\"hljs-attr\">className<\/span>=<span class=\"hljs-string\">\"wrapper\"<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span> <span class=\"hljs-attr\">className<\/span>=<span class=\"hljs-string\">\"video-wrapper\"<\/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><\/span>\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 will import the <code>video<\/code> component we just created in <code>pages\/index.js<\/code> with the following code snippet.<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\">    <span class=\"hljs-keyword\">import<\/span> Head <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\"next\/head\"<\/span>;\n    <span class=\"hljs-keyword\">import<\/span> styles <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\"..\/styles\/Home.module.css\"<\/span>;\n    \n    <span class=\"hljs-keyword\">import<\/span> Video <span class=\"hljs-keyword\">from<\/span> <span class=\"hljs-string\">\"..\/components\/video\"<\/span>;\n    \n    <span class=\"hljs-keyword\">export<\/span> <span class=\"hljs-keyword\">default<\/span> <span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span> <span class=\"hljs-title\">Home<\/span>(<span class=\"hljs-params\"><\/span>) <\/span>{\n      <span class=\"hljs-keyword\">return<\/span> (\n        <span class=\"xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span> <span class=\"hljs-attr\">className<\/span>=<span class=\"hljs-string\">{styles.container}<\/span>&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">Head<\/span>&gt;<\/span>\n            <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">title<\/span>&gt;<\/span>Create in-video ads in Next.js<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">title<\/span>&gt;<\/span>\n            <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">meta<\/span> <span class=\"hljs-attr\">name<\/span>=<span class=\"hljs-string\">\"description\"<\/span> <span class=\"hljs-attr\">content<\/span>=<span class=\"hljs-string\">\"Create in-video ads in Next.js\"<\/span> \/&gt;<\/span>\n            <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">link<\/span> <span class=\"hljs-attr\">rel<\/span>=<span class=\"hljs-string\">\"icon\"<\/span> <span class=\"hljs-attr\">href<\/span>=<span class=\"hljs-string\">\"\/favicon.ico\"<\/span> \/&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">Head<\/span>&gt;<\/span>\n    \n          <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">main<\/span> <span class=\"hljs-attr\">className<\/span>=<span class=\"hljs-string\">{styles.main}<\/span>&gt;<\/span>\n            <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">h1<\/span> <span class=\"hljs-attr\">className<\/span>=<span class=\"hljs-string\">{styles.title}<\/span>&gt;<\/span>Create in-video ads in Next.js<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">h1<\/span>&gt;<\/span>\n            <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">Video<\/span> \/&gt;<\/span>\n          <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">main<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span><\/span>\n      );\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\">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>Our application should now look similar to what is shown below.<\/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_21D53CC698093D54FC9826E10F148F3F63DC48022FA6C6C0ACC44452BC5B53D7_1649887962585_Screenshot+2022-04-13+at+23.12.15.png\" alt=\"Create in-video ads in Nextjs\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"2000\" height=\"1115\"\/><\/p>\n<h2>Building the video component<\/h2>\n<p>This section will demonstrate how to implement the in-video ads with the following code snippet.<\/p>\n<p><a href=\"https:\/\/gist.github.com\/Olanetsoft\/64930afe3cace27f255fc84739eb9462\">https:\/\/gist.github.com\/Olanetsoft\/64930afe3cace27f255fc84739eb9462<\/a><\/p>\n<p><a href=\"https:\/\/gist.github.com\/Olanetsoft\/64930afe3cace27f255fc84739eb9462\">https:\/\/gist.github.com\/Olanetsoft\/64930afe3cace27f255fc84739eb9462<\/a><\/p>\n<p>In the code snippet above, we:<\/p>\n<ul>\n<li>Declare a <code>useRef<\/code> hook <code>videoRef<\/code>, <code>adVideoRef<\/code>, and <code>skipButtonRef<\/code> that allows us to store a reference to any HTML element<\/li>\n<li>Create an <code>onVideoTimeUpdate<\/code> function that will be called when the main video playback progress changes<\/li>\n<li>Create a throttle function that will delay the calls. This way, the calls will be made after every 800 milliseconds or after whatever duration we want, thus avoiding the <code>onVideoTimeUpdate<\/code> function being called too often<\/li>\n<li>Create a <code>skipAd<\/code> function that ensures that the ad video is paused\/ended, hides the ad video element, hides the skip button, increments the main video\u2019s current playback time by a second, and then unpauses the main video<\/li>\n<\/ul>\n<p>Next, we will add some CSS styles to the application with the code snippet below.<\/p>\n<p><a href=\"https:\/\/gist.github.com\/Olanetsoft\/861db6c482ef5832473bbbf538707e40\">https:\/\/gist.github.com\/Olanetsoft\/861db6c482ef5832473bbbf538707e40<\/a><\/p>\n<p><a href=\"https:\/\/gist.github.com\/Olanetsoft\/861db6c482ef5832473bbbf538707e40\">https:\/\/gist.github.com\/Olanetsoft\/861db6c482ef5832473bbbf538707e40<\/a><\/p>\n<p>After testing our application, we should get something similar to what you see below.<\/p>\n<p><a href=\"https:\/\/www.loom.com\/share\/be9e1d1f0527488bacb5f4b10c0f0fc7\">https:\/\/www.loom.com\/share\/be9e1d1f0527488bacb5f4b10c0f0fc7<\/a><\/p>\n<h1>Conclusion<\/h1>\n<p>This post demonstrated how to create in-video ads in Next.js.<\/p>\n<h1>Resources<\/h1>\n<p>We may also find these resources helpful.<\/p>\n<ul>\n<li>\n<a href=\"https:\/\/cloudinary.com\/documentation\/transformation_reference\">Cloudinary transformation URL reference<\/a>\n<\/li>\n<li>\n<a href=\"https:\/\/cloudinary.com\/documentation\">Cloudinary Documentation<\/a>\n<\/li>\n<\/ul>\n<\/div>","protected":false},"excerpt":{"rendered":"","protected":false},"author":41,"featured_media":28505,"comment_status":"","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_cloudinary_featured_overwrite":false,"footnotes":""},"categories":[1],"tags":[134,177,212,382,371,303],"class_list":["post-28504","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-guest-post","tag-javascript","tag-next-js","tag-player-video","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>Create In-Video Ads in Next.js<\/title>\n<meta name=\"description\" content=\"This post demonstrated how to create in-video ads in Next.js.\" \/>\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-in-video-ads-in-next-js\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Create In-Video Ads in Next.js\" \/>\n<meta property=\"og:description\" content=\"This post demonstrated how to create in-video ads in Next.js.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cloudinary.com\/blog\/guest_post\/create-in-video-ads-in-next-js\/\" \/>\n<meta property=\"og:site_name\" content=\"Cloudinary Blog\" \/>\n<meta property=\"article:published_time\" content=\"2022-05-05T08:40:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681928513\/Web_Assets\/blog\/c62b9b877c469e69036ad64b06324e5530272962-3200x2400-1_2850536c77\/c62b9b877c469e69036ad64b06324e5530272962-3200x2400-1_2850536c77.jpg?_i=AA\" \/>\n\t<meta property=\"og:image:width\" content=\"3200\" \/>\n\t<meta property=\"og:image:height\" content=\"2400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\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-in-video-ads-in-next-js\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-in-video-ads-in-next-js\/\"},\"author\":{\"name\":\"\",\"@id\":\"\"},\"headline\":\"Create In-Video Ads in Next.js\",\"datePublished\":\"2022-05-05T08:40:35+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-in-video-ads-in-next-js\/\"},\"wordCount\":6,\"publisher\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-in-video-ads-in-next-js\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681928513\/Web_Assets\/blog\/c62b9b877c469e69036ad64b06324e5530272962-3200x2400-1_2850536c77\/c62b9b877c469e69036ad64b06324e5530272962-3200x2400-1_2850536c77.jpg?_i=AA\",\"keywords\":[\"Guest Post\",\"Javascript\",\"Next.js\",\"Player Video\",\"Under Review\",\"Video\"],\"inLanguage\":\"en-US\",\"copyrightYear\":\"2022\",\"copyrightHolder\":{\"@id\":\"https:\/\/cloudinary.com\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-in-video-ads-in-next-js\/\",\"url\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-in-video-ads-in-next-js\/\",\"name\":\"Create In-Video Ads in Next.js\",\"isPartOf\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-in-video-ads-in-next-js\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-in-video-ads-in-next-js\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681928513\/Web_Assets\/blog\/c62b9b877c469e69036ad64b06324e5530272962-3200x2400-1_2850536c77\/c62b9b877c469e69036ad64b06324e5530272962-3200x2400-1_2850536c77.jpg?_i=AA\",\"datePublished\":\"2022-05-05T08:40:35+00:00\",\"description\":\"This post demonstrated how to create in-video ads in Next.js.\",\"breadcrumb\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-in-video-ads-in-next-js\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cloudinary.com\/blog\/guest_post\/create-in-video-ads-in-next-js\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-in-video-ads-in-next-js\/#primaryimage\",\"url\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681928513\/Web_Assets\/blog\/c62b9b877c469e69036ad64b06324e5530272962-3200x2400-1_2850536c77\/c62b9b877c469e69036ad64b06324e5530272962-3200x2400-1_2850536c77.jpg?_i=AA\",\"contentUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681928513\/Web_Assets\/blog\/c62b9b877c469e69036ad64b06324e5530272962-3200x2400-1_2850536c77\/c62b9b877c469e69036ad64b06324e5530272962-3200x2400-1_2850536c77.jpg?_i=AA\",\"width\":3200,\"height\":2400},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/create-in-video-ads-in-next-js\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/cloudinary.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create In-Video Ads in Next.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":"Create In-Video Ads in Next.js","description":"This post demonstrated how to create in-video ads in Next.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\/create-in-video-ads-in-next-js\/","og_locale":"en_US","og_type":"article","og_title":"Create In-Video Ads in Next.js","og_description":"This post demonstrated how to create in-video ads in Next.js.","og_url":"https:\/\/cloudinary.com\/blog\/guest_post\/create-in-video-ads-in-next-js\/","og_site_name":"Cloudinary Blog","article_published_time":"2022-05-05T08:40:35+00:00","og_image":[{"width":3200,"height":2400,"url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681928513\/Web_Assets\/blog\/c62b9b877c469e69036ad64b06324e5530272962-3200x2400-1_2850536c77\/c62b9b877c469e69036ad64b06324e5530272962-3200x2400-1_2850536c77.jpg?_i=AA","type":"image\/jpeg"}],"twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-in-video-ads-in-next-js\/#article","isPartOf":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-in-video-ads-in-next-js\/"},"author":{"name":"","@id":""},"headline":"Create In-Video Ads in Next.js","datePublished":"2022-05-05T08:40:35+00:00","mainEntityOfPage":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-in-video-ads-in-next-js\/"},"wordCount":6,"publisher":{"@id":"https:\/\/cloudinary.com\/blog\/#organization"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-in-video-ads-in-next-js\/#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681928513\/Web_Assets\/blog\/c62b9b877c469e69036ad64b06324e5530272962-3200x2400-1_2850536c77\/c62b9b877c469e69036ad64b06324e5530272962-3200x2400-1_2850536c77.jpg?_i=AA","keywords":["Guest Post","Javascript","Next.js","Player Video","Under Review","Video"],"inLanguage":"en-US","copyrightYear":"2022","copyrightHolder":{"@id":"https:\/\/cloudinary.com\/#organization"}},{"@type":"WebPage","@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-in-video-ads-in-next-js\/","url":"https:\/\/cloudinary.com\/blog\/guest_post\/create-in-video-ads-in-next-js\/","name":"Create In-Video Ads in Next.js","isPartOf":{"@id":"https:\/\/cloudinary.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-in-video-ads-in-next-js\/#primaryimage"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-in-video-ads-in-next-js\/#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681928513\/Web_Assets\/blog\/c62b9b877c469e69036ad64b06324e5530272962-3200x2400-1_2850536c77\/c62b9b877c469e69036ad64b06324e5530272962-3200x2400-1_2850536c77.jpg?_i=AA","datePublished":"2022-05-05T08:40:35+00:00","description":"This post demonstrated how to create in-video ads in Next.js.","breadcrumb":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-in-video-ads-in-next-js\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cloudinary.com\/blog\/guest_post\/create-in-video-ads-in-next-js\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-in-video-ads-in-next-js\/#primaryimage","url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681928513\/Web_Assets\/blog\/c62b9b877c469e69036ad64b06324e5530272962-3200x2400-1_2850536c77\/c62b9b877c469e69036ad64b06324e5530272962-3200x2400-1_2850536c77.jpg?_i=AA","contentUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681928513\/Web_Assets\/blog\/c62b9b877c469e69036ad64b06324e5530272962-3200x2400-1_2850536c77\/c62b9b877c469e69036ad64b06324e5530272962-3200x2400-1_2850536c77.jpg?_i=AA","width":3200,"height":2400},{"@type":"BreadcrumbList","@id":"https:\/\/cloudinary.com\/blog\/guest_post\/create-in-video-ads-in-next-js\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cloudinary.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Create In-Video Ads in Next.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\/v1681928513\/Web_Assets\/blog\/c62b9b877c469e69036ad64b06324e5530272962-3200x2400-1_2850536c77\/c62b9b877c469e69036ad64b06324e5530272962-3200x2400-1_2850536c77.jpg?_i=AA","_links":{"self":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/28504","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=28504"}],"version-history":[{"count":0,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/28504\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/media\/28505"}],"wp:attachment":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/media?parent=28504"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/categories?post=28504"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/tags?post=28504"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}