{"id":27947,"date":"2021-05-18T22:02:29","date_gmt":"2021-05-18T22:02:29","guid":{"rendered":"http:\/\/add-custom-video-transitions-with-react-and-cloudinary"},"modified":"2025-03-02T14:07:54","modified_gmt":"2025-03-02T22:07:54","slug":"add-custom-video-transitions-with-react-and-cloudinary","status":"publish","type":"post","link":"https:\/\/cloudinary.com\/blog\/guest_post\/add-custom-video-transitions-with-react-and-cloudinary\/","title":{"rendered":"Add Custom Video Transitions with React"},"content":{"rendered":"<div class=\"wp-block-cloudinary-markdown \"><p>For added cohesion and professionalism in videos, adding transitions goes a long way. In this tutorial, we\u2019ll first look at how Cloudinary allows us to concatenate two videos together with a custom transition between them. Then, we\u2019ll learn how to display it all together in a React component.<\/p>\n<\/div>\n\n\n  <div class=\"wp-block-cloudinary-code-sandbox \">\n    <iframe\n      src=\"https:\/\/codesandbox.io\/embed\/video-transitions-react-cloudinary-jzhld?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=%2Fsrc%2FApp.js&amp;moduleview=0&amp;previewwindow=&amp;view=&amp;runonclick=1\"\n      height=\"500\"\n      style=\"width: 100%;\"\n      title=\"Add Custom Video Transitions with React &amp; Cloudinary\"\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 \"><h2>Upload your assets to Cloudinary<\/h2>\n<p>To start, we\u2019ll upload the videos to Cloudinary. The fastest way to do this is using the <a href=\"https:\/\/cloudinary.com\/users\/login?RelayState=%2Fconsole%3Fap%3Dlwj\">Cloudinary console<\/a>.<\/p>\n<p>For this tutorial, we\u2019ll use three videos:<\/p>\n<ol>\n<li>The first video we want to show<\/li>\n<li>The second video that should play after the first one<\/li>\n<li>A video to use as a transition, often referred to as a \u201cluma matte\u201d<\/li>\n<\/ol>\n<p>For our first video, we\u2019ll use this one:<\/p>\n<video controls>\n  <source src=\"https:\/\/res.cloudinary.com\/jlengstorf\/video\/upload\/q_auto,f_auto,w_600\/mediajams\/disappointed-coffee.mp4\" \/>\n<\/video>\n<pre class=\"js-syntax-highlighted\"><code>https:\/\/res.cloudinary.com\/jlengstorf\/video\/upload\/mediajams\/disappointed-coffee.mp4\n<\/code><\/pre>\n<p>For the second video, we\u2019ll use this:<\/p>\n<video controls>\n  <source src=\"https:\/\/res.cloudinary.com\/jlengstorf\/video\/upload\/q_auto,f_auto,w_600\/mediajams\/deploy-to-netlify.mp4\" \/>\n<\/video>\n<pre class=\"js-syntax-highlighted\"><code>https:\/\/res.cloudinary.com\/jlengstorf\/video\/upload\/mediajams\/deploy-to-netlify.mp4\n<\/code><\/pre>\n<p>And finally, let\u2019s use this as our luma matte:<\/p>\n<video controls>\n  <source src=\"https:\/\/res.cloudinary.com\/jlengstorf\/video\/upload\/q_auto,f_auto,w_600\/mediajams\/transition.mp4\" \/>\n<\/video>\n<pre class=\"js-syntax-highlighted\"><code>https:\/\/res.cloudinary.com\/jlengstorf\/video\/upload\/mediajams\/transition.mp4\n<\/code><\/pre>\n<p>Now that we have the pieces, we can assemble them into a single, seamless video!<\/p>\n<h2>Create a Video Component in React<\/h2>\n<p>Before we add the logo, let\u2019s create a React component that displays our Cloudinary video.<\/p>\n<pre class=\"js-syntax-highlighted\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript shcb-wrap-lines\"><span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span> <span class=\"hljs-title\">Video<\/span>(<span class=\"hljs-params\">{ cloudName, videoOneId, videoTwoId, transitionId }<\/span>) <\/span>{\n  <span class=\"hljs-comment\">\/\/ set up a Cloudinary URL to use your cloud name and display video<\/span>\n  <span class=\"hljs-keyword\">let<\/span> videoSource = <span class=\"hljs-string\">`https:\/\/res.cloudinary.com\/<span class=\"hljs-subst\">${cloudName}<\/span>\/video\/upload`<\/span>;\n\n  <span class=\"hljs-comment\">\/\/ automatically adjust the quality, and set the video to 600px wide<\/span>\n  videoSource += <span class=\"hljs-string\">\"\/q_auto,w_600\"<\/span>;\n\n  <span class=\"hljs-comment\">\/\/ set the public ID to display the video as an MP4<\/span>\n  videoSource += <span class=\"hljs-string\">`\/<span class=\"hljs-subst\">${videoOneId}<\/span>.mp4`<\/span>;\n\n  <span class=\"hljs-comment\">\/\/ add the full URL to a standard HTML5 video element<\/span>\n  <span class=\"hljs-keyword\">return<\/span> (\n    <span class=\"xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">video<\/span> <span class=\"hljs-attr\">controls<\/span>&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">source<\/span> <span class=\"hljs-attr\">src<\/span>=<span class=\"hljs-string\">{videoSource}<\/span> <span class=\"hljs-attr\">type<\/span>=<span class=\"hljs-string\">\"video\/mp4\"<\/span> \/&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">video<\/span>&gt;<\/span><\/span>\n  );\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\">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 component, which we\u2019ve named <code>Video<\/code>, accepts three values as props: <code>cloudName<\/code>, <code>videoOneId<\/code>, <code>videoTwoId<\/code>,  and <code>transitionId<\/code>.<\/p>\n<p>The <code>cloudName<\/code> should contain our Cloudinary cloud name, which is displayed at the top-right of the console.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/res.cloudinary.com\/jlengstorf\/image\/upload\/q_auto,f_auto,w_600\/c_limit,w_2000\/f_auto\/q_auto\/v1617499746\/mediajams\/cloud-name.png\" alt=\"The Cloudinary console with an arrow pointing to the location of the cloud name.\" loading=\"lazy\" class=\"c-transformed-asset\"  width=\"600\" height=\"413\"\/><\/p>\n<p><code>videoOneId<\/code> will contain the public ID of the first video asset, which is the name of the file on Cloudinary, including any folders. Using our example video from above, the public ID is <code>mediajams\/disappointed-coffee<\/code>.<\/p>\n<p><code>videoTwoId<\/code> contains the public ID of the second video, which is <code>mediajams\/deploy-to-netlify<\/code>.<\/p>\n<p>Finally, the <code>transitionId<\/code> will contain the public ID of the luma matte: <code>mediajams\/transition<\/code>.<\/p>\n<p>To set up our video, we build a Cloudinary URL that contains:<\/p>\n<ol>\n<li>The public Cloudinary URL, <code>https:\/\/res.cloudinary.com\/<\/code>\n<\/li>\n<li>Our cloud name<\/li>\n<li>The asset type, <code>\/video\/upload\/<\/code>\n<\/li>\n<li>Transformations to adjust the quality automatically and resize to 600px wide: <code>q_auto,w_600<\/code>\n<\/li>\n<li>The public ID of our video<\/li>\n<li>A file type of MP4 using a file extension<\/li>\n<\/ol>\n<p>Once we have the URL, we can add that as the <code>src<\/code> value in a video element, and return that from our component.<\/p>\n<h2>Add a video overlay with a transition effect<\/h2>\n<p>Combining the videos with a transition requires two discrete steps to be added:<\/p>\n<ol>\n<li>The second video needs to be added as a <a href=\"https:\/\/cloudinary.com\/documentation\/transformation_reference?ap=lwj#l_video\">video overlay<\/a>, which requires replacing any slashes in the public ID with the colon (<code>:<\/code>) to avoid URL issues. Using the fill crop transformation, we set the video to be the same size as the first video.<\/li>\n<li>Next, we add an additional video overlay with the transition video, but we apply the <a href=\"https:\/\/cloudinary.com\/documentation\/transformation_reference?ap=lwj#e_transition\">transition effect<\/a> to let Cloudinary know that it\u2019s a luma matte. We also crop and resize this appropriately. Finally, we apply the layer to let Cloudinary know that it needs to apply the transition to the two videos.<\/li>\n<\/ol>\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-function\"><span class=\"hljs-keyword\">function<\/span> <span class=\"hljs-title\">Video<\/span>(<span class=\"hljs-params\">{ cloudName, videoOneId, videoTwoId, transitionId }<\/span>) <\/span>{\n    <span class=\"hljs-comment\">\/\/ set up a Cloudinary URL to use your cloud name and display video<\/span>\n    <span class=\"hljs-keyword\">let<\/span> videoSource = <span class=\"hljs-string\">`https:\/\/res.cloudinary.com\/<span class=\"hljs-subst\">${cloudName}<\/span>\/video\/upload`<\/span>;\n\n    <span class=\"hljs-comment\">\/\/ automatically adjust the quality and set the video to 600px wide<\/span>\n    videoSource += <span class=\"hljs-string\">\"\/q_auto,w_600\"<\/span>;\n\n+   <span class=\"hljs-comment\">\/\/ replace folder slashes with colons so the URL works<\/span>\n+   <span class=\"hljs-keyword\">const<\/span> videoTwo = videoTwoId.replace(<span class=\"hljs-string\">\"\/\"<\/span>, <span class=\"hljs-string\">\":\"<\/span>);\n+\n+   <span class=\"hljs-comment\">\/\/ splice in the bumper video at the beginning<\/span>\n+   <span class=\"hljs-comment\">\/\/ set it to the same width and make sure it fills the space<\/span>\n+   videoSource += <span class=\"hljs-string\">`\/l_video:<span class=\"hljs-subst\">${videoTwo}<\/span>,c_fill,w_600`<\/span>;\n+\n+   <span class=\"hljs-comment\">\/\/ replace folder slashes with colons so the URL works<\/span>\n+   <span class=\"hljs-keyword\">const<\/span> transition = transitionId.replace(<span class=\"hljs-string\">\"\/\"<\/span>, <span class=\"hljs-string\">\":\"<\/span>);\n+\n+   <span class=\"hljs-comment\">\/\/ add in the transition and apply it<\/span>\n+   videoSource += <span class=\"hljs-string\">`\/l_video:<span class=\"hljs-subst\">${transition}<\/span>,c_fill,w_600,e_transition\/fl_layer_apply`<\/span>;\n\n    <span class=\"hljs-comment\">\/\/ set the public ID to display the video as an MP4<\/span>\n    videoSource += <span class=\"hljs-string\">`\/<span class=\"hljs-subst\">${videoOneId}<\/span>.mp4`<\/span>;\n\n    <span class=\"hljs-comment\">\/\/ add the full URL to a standard HTML5 video element<\/span>\n    <span class=\"hljs-keyword\">return<\/span> (\n      <span class=\"xml\"><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">video<\/span> <span class=\"hljs-attr\">controls<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">source<\/span> <span class=\"hljs-attr\">src<\/span>=<span class=\"hljs-string\">{videoSource}<\/span> <span class=\"hljs-attr\">type<\/span>=<span class=\"hljs-string\">\"video\/mp4\"<\/span> \/&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">video<\/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>Adding these two pieces to the URL gives us a generated video from Cloudinary that shows the first video, and then transitions to the second video.<\/p>\n<h2>Display the combined video in a React component on screen<\/h2>\n<p>With our <code>Video<\/code> component configured to combine videos with a custom transition, we\u2019re ready to display it on screen!<\/p>\n<p>We can add the React component to our app like this:<\/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-function\"><span class=\"hljs-keyword\">function<\/span> <span class=\"hljs-title\">App<\/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\">main<\/span>&gt;<\/span>\n      <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">h1<\/span>&gt;<\/span>Video Transitions with React &amp; Cloudinary<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>\n        <span class=\"hljs-attr\">cloudName<\/span>=<span class=\"hljs-string\">\"jlengstorf\"<\/span>\n        <span class=\"hljs-attr\">videoOneId<\/span>=<span class=\"hljs-string\">\"mediajams\/disappointed-coffee\"<\/span>\n        <span class=\"hljs-attr\">videoTwoId<\/span>=<span class=\"hljs-string\">\"mediajams\/deploy-to-netlify\"<\/span>\n        <span class=\"hljs-attr\">transitionId<\/span>=<span class=\"hljs-string\">\"mediajams\/transition\"<\/span>\n      \/&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">main<\/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 app will now display a video that shows our first video, and then transitions into the second!<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"","protected":false},"author":41,"featured_media":27948,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_cloudinary_featured_overwrite":false,"footnotes":""},"categories":[1],"tags":[134,246,371,303],"class_list":["post-27947","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-guest-post","tag-react","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>Add Custom Video Transitions with React<\/title>\n<meta name=\"description\" content=\"For added cohesion and professionalism in videos, adding transitions goes a long way. In this tutorial, we\u2019ll first look at how Cloudinary allows us to concatenate two videos together with a custom transition between them. Then, we&#039;ll learn how to display it all together in a React component.\" \/>\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\/add-custom-video-transitions-with-react-and-cloudinary\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Add Custom Video Transitions with React\" \/>\n<meta property=\"og:description\" content=\"For added cohesion and professionalism in videos, adding transitions goes a long way. In this tutorial, we\u2019ll first look at how Cloudinary allows us to concatenate two videos together with a custom transition between them. Then, we&#039;ll learn how to display it all together in a React component.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cloudinary.com\/blog\/guest_post\/add-custom-video-transitions-with-react-and-cloudinary\" \/>\n<meta property=\"og:site_name\" content=\"Cloudinary Blog\" \/>\n<meta property=\"article:published_time\" content=\"2021-05-18T22:02:29+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-03-02T22:07:54+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681924079\/Web_Assets\/blog\/9c055cf00d873764782c5f3c92068adb5dd35fc9-2550x1700-1_2794810783\/9c055cf00d873764782c5f3c92068adb5dd35fc9-2550x1700-1_2794810783.png?_i=AA\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"NewsArticle\",\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/add-custom-video-transitions-with-react-and-cloudinary#article\",\"isPartOf\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/add-custom-video-transitions-with-react-and-cloudinary\/\"},\"author\":{\"name\":\"\",\"@id\":\"\"},\"headline\":\"Add Custom Video Transitions with React\",\"datePublished\":\"2021-05-18T22:02:29+00:00\",\"dateModified\":\"2025-03-02T22:07:54+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/add-custom-video-transitions-with-react-and-cloudinary\/\"},\"wordCount\":6,\"publisher\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/add-custom-video-transitions-with-react-and-cloudinary#primaryimage\"},\"thumbnailUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681924079\/Web_Assets\/blog\/9c055cf00d873764782c5f3c92068adb5dd35fc9-2550x1700-1_2794810783\/9c055cf00d873764782c5f3c92068adb5dd35fc9-2550x1700-1_2794810783.png?_i=AA\",\"keywords\":[\"Guest Post\",\"React\",\"Under Review\",\"Video\"],\"inLanguage\":\"en-US\",\"copyrightYear\":\"2021\",\"copyrightHolder\":{\"@id\":\"https:\/\/cloudinary.com\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/add-custom-video-transitions-with-react-and-cloudinary\/\",\"url\":\"https:\/\/cloudinary.com\/blog\/guest_post\/add-custom-video-transitions-with-react-and-cloudinary\",\"name\":\"Add Custom Video Transitions with React\",\"isPartOf\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/add-custom-video-transitions-with-react-and-cloudinary#primaryimage\"},\"image\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/add-custom-video-transitions-with-react-and-cloudinary#primaryimage\"},\"thumbnailUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681924079\/Web_Assets\/blog\/9c055cf00d873764782c5f3c92068adb5dd35fc9-2550x1700-1_2794810783\/9c055cf00d873764782c5f3c92068adb5dd35fc9-2550x1700-1_2794810783.png?_i=AA\",\"datePublished\":\"2021-05-18T22:02:29+00:00\",\"dateModified\":\"2025-03-02T22:07:54+00:00\",\"description\":\"For added cohesion and professionalism in videos, adding transitions goes a long way. In this tutorial, we\u2019ll first look at how Cloudinary allows us to concatenate two videos together with a custom transition between them. Then, we'll learn how to display it all together in a React component.\",\"breadcrumb\":{\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/add-custom-video-transitions-with-react-and-cloudinary#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cloudinary.com\/blog\/guest_post\/add-custom-video-transitions-with-react-and-cloudinary\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/add-custom-video-transitions-with-react-and-cloudinary#primaryimage\",\"url\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681924079\/Web_Assets\/blog\/9c055cf00d873764782c5f3c92068adb5dd35fc9-2550x1700-1_2794810783\/9c055cf00d873764782c5f3c92068adb5dd35fc9-2550x1700-1_2794810783.png?_i=AA\",\"contentUrl\":\"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681924079\/Web_Assets\/blog\/9c055cf00d873764782c5f3c92068adb5dd35fc9-2550x1700-1_2794810783\/9c055cf00d873764782c5f3c92068adb5dd35fc9-2550x1700-1_2794810783.png?_i=AA\",\"width\":2550,\"height\":1700},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cloudinary.com\/blog\/guest_post\/add-custom-video-transitions-with-react-and-cloudinary#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/cloudinary.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Add Custom Video Transitions with React\"}]},{\"@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":"Add Custom Video Transitions with React","description":"For added cohesion and professionalism in videos, adding transitions goes a long way. In this tutorial, we\u2019ll first look at how Cloudinary allows us to concatenate two videos together with a custom transition between them. Then, we'll learn how to display it all together in a React component.","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\/add-custom-video-transitions-with-react-and-cloudinary","og_locale":"en_US","og_type":"article","og_title":"Add Custom Video Transitions with React","og_description":"For added cohesion and professionalism in videos, adding transitions goes a long way. In this tutorial, we\u2019ll first look at how Cloudinary allows us to concatenate two videos together with a custom transition between them. Then, we'll learn how to display it all together in a React component.","og_url":"https:\/\/cloudinary.com\/blog\/guest_post\/add-custom-video-transitions-with-react-and-cloudinary","og_site_name":"Cloudinary Blog","article_published_time":"2021-05-18T22:02:29+00:00","article_modified_time":"2025-03-02T22:07:54+00:00","twitter_card":"summary_large_image","twitter_image":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681924079\/Web_Assets\/blog\/9c055cf00d873764782c5f3c92068adb5dd35fc9-2550x1700-1_2794810783\/9c055cf00d873764782c5f3c92068adb5dd35fc9-2550x1700-1_2794810783.png?_i=AA","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/cloudinary.com\/blog\/guest_post\/add-custom-video-transitions-with-react-and-cloudinary#article","isPartOf":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/add-custom-video-transitions-with-react-and-cloudinary\/"},"author":{"name":"","@id":""},"headline":"Add Custom Video Transitions with React","datePublished":"2021-05-18T22:02:29+00:00","dateModified":"2025-03-02T22:07:54+00:00","mainEntityOfPage":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/add-custom-video-transitions-with-react-and-cloudinary\/"},"wordCount":6,"publisher":{"@id":"https:\/\/cloudinary.com\/blog\/#organization"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/add-custom-video-transitions-with-react-and-cloudinary#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681924079\/Web_Assets\/blog\/9c055cf00d873764782c5f3c92068adb5dd35fc9-2550x1700-1_2794810783\/9c055cf00d873764782c5f3c92068adb5dd35fc9-2550x1700-1_2794810783.png?_i=AA","keywords":["Guest Post","React","Under Review","Video"],"inLanguage":"en-US","copyrightYear":"2021","copyrightHolder":{"@id":"https:\/\/cloudinary.com\/#organization"}},{"@type":"WebPage","@id":"https:\/\/cloudinary.com\/blog\/guest_post\/add-custom-video-transitions-with-react-and-cloudinary\/","url":"https:\/\/cloudinary.com\/blog\/guest_post\/add-custom-video-transitions-with-react-and-cloudinary","name":"Add Custom Video Transitions with React","isPartOf":{"@id":"https:\/\/cloudinary.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/add-custom-video-transitions-with-react-and-cloudinary#primaryimage"},"image":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/add-custom-video-transitions-with-react-and-cloudinary#primaryimage"},"thumbnailUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681924079\/Web_Assets\/blog\/9c055cf00d873764782c5f3c92068adb5dd35fc9-2550x1700-1_2794810783\/9c055cf00d873764782c5f3c92068adb5dd35fc9-2550x1700-1_2794810783.png?_i=AA","datePublished":"2021-05-18T22:02:29+00:00","dateModified":"2025-03-02T22:07:54+00:00","description":"For added cohesion and professionalism in videos, adding transitions goes a long way. In this tutorial, we\u2019ll first look at how Cloudinary allows us to concatenate two videos together with a custom transition between them. Then, we'll learn how to display it all together in a React component.","breadcrumb":{"@id":"https:\/\/cloudinary.com\/blog\/guest_post\/add-custom-video-transitions-with-react-and-cloudinary#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cloudinary.com\/blog\/guest_post\/add-custom-video-transitions-with-react-and-cloudinary"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudinary.com\/blog\/guest_post\/add-custom-video-transitions-with-react-and-cloudinary#primaryimage","url":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681924079\/Web_Assets\/blog\/9c055cf00d873764782c5f3c92068adb5dd35fc9-2550x1700-1_2794810783\/9c055cf00d873764782c5f3c92068adb5dd35fc9-2550x1700-1_2794810783.png?_i=AA","contentUrl":"https:\/\/res.cloudinary.com\/cloudinary-marketing\/images\/f_auto,q_auto\/v1681924079\/Web_Assets\/blog\/9c055cf00d873764782c5f3c92068adb5dd35fc9-2550x1700-1_2794810783\/9c055cf00d873764782c5f3c92068adb5dd35fc9-2550x1700-1_2794810783.png?_i=AA","width":2550,"height":1700},{"@type":"BreadcrumbList","@id":"https:\/\/cloudinary.com\/blog\/guest_post\/add-custom-video-transitions-with-react-and-cloudinary#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cloudinary.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Add Custom Video Transitions with React"}]},{"@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\/v1681924079\/Web_Assets\/blog\/9c055cf00d873764782c5f3c92068adb5dd35fc9-2550x1700-1_2794810783\/9c055cf00d873764782c5f3c92068adb5dd35fc9-2550x1700-1_2794810783.png?_i=AA","_links":{"self":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/27947","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=27947"}],"version-history":[{"count":3,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/27947\/revisions"}],"predecessor-version":[{"id":37089,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/posts\/27947\/revisions\/37089"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/media\/27948"}],"wp:attachment":[{"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/media?parent=27947"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/categories?post=27947"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudinary.com\/blog\/wp-json\/wp\/v2\/tags?post=27947"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}