[{"data":1,"prerenderedAt":511},["ShallowReactive",2],{"support-article-/support/embedding-multiple-videos-on-a-webpage-without-overlapping-playback":3,"support-nav-articles":76,"support-search-articles":408},{"id":4,"title":5,"author":6,"authorRole":7,"body":8,"category":63,"date":64,"description":14,"extension":65,"featured":66,"image":7,"meta":67,"navigation":69,"path":70,"readTime":7,"seo":71,"sitemap":72,"stem":73,"subcategory":74,"tag":7,"__hash__":75},"content/support/embedding-multiple-videos-on-a-webpage-without-overlapping-playback.md","Embedding multiple videos on a webpage without overlapping playback","MediaLab Team",null,{"type":9,"value":10,"toc":60},"minimark",[11,15,18,24,35,38,43,49],[12,13,14],"p",{},"When embedding multiple videos on a single webpage, you may encounter a problem where one video continues playing after starting another. The same can happen when using modals — if you click “next” or “previous,” the previous video may continue to play in the background.",[12,16,17],{},"You can prevent this by adding a script to stop all embedded videos when switching content.",[12,19,20],{},[21,22,23],"strong",{},"Example Script",[25,26,31],"pre",{"className":27,"code":29,"language":30},[28],"language-text","function stopPlayingEmbedVideo() {\n      // Set the scope to a region where to look for iframes\n      // otherwise set scope as the entire document\n      // var myScope = document;\n      // if there is an iframe inside maybe embedded multimedia video/audio, we should reload so it stops playing\n\n      /*\n      * var videoContainer = a div with id #container.\n      * You can rename container id name to any other wrapper div\n      * This is the region where the script looks for all the iframes\n      */\n      var videoContainer = document.getElementById('container');\n      var iframes = videoContainer.getElementsByTagName(\"iframe\");\n\n      if (iframes != null) {\n          for (var i = 0; i \u003C iframes.length; i++) {\n              iframes[i].src = iframes[i].src;\n          }\n      }\n    }\n\n     /*\n      * var button = a button with id #stop-playing-btn.\n      * You can rename stop-playing-btn to any other id name\n      * This is the button that fires the event to stop playing video\n      * You can assign this event to modal closing, next prev for example\n      */\n    var button = document.getElementById('stop-playing-btn');\n    button.addEventListener(\"click\", stopPlayingEmbedVideo);\n","text",[32,33,29],"code",{"__ignoreMap":34},"",[36,37],"br",{},[12,39,40],{},[21,41,42],{},"Example HTML Structure",[25,44,47],{"className":45,"code":46,"language":30},[28],"\u003Cdiv id=\"container\">\n    \u003Ciframe scrolling=\"no\" frameborder=\"0\" src=\"example/iframe\" width=\"600\" height=\"400\" allowFullScreen=\"true\">\u003C/iframe>\n    \u003Ciframe scrolling=\"no\" frameborder=\"0\" src=\"example/iframe\" width=\"600\" height=\"400\" allowFullScreen=\"true\">\u003C/iframe>\n  \u003C/div>\n  \u003Cbutton id=\"stop-playing-btn\">Stop playing\u003C/button>\n",[32,48,46],{"__ignoreMap":34},[12,50,51,52,55,56,59],{},"You can assign the ",[32,53,54],{},"stopPlayingEmbedVideo()"," function to any event — for example, clicking a ",[21,57,58],{},"prev/next"," button in a modal, or when the modal closes.",{"title":34,"searchDepth":61,"depth":61,"links":62},2,[],"core","10-11-2025","md",false,{"socialmedia":68},{"title":5,"description":34,"image":34,"url":34},true,"/support/embedding-multiple-videos-on-a-webpage-without-overlapping-playback",{"title":5,"description":14},{"loc":70},"support/embedding-multiple-videos-on-a-webpage-without-overlapping-playback","integrations","fXxwsBkyMXYO7-O68NG8GVNxPJA87gpyFBVgac2cfig",[77,82,85,89,92,97,101,104,108,111,115,118,121,124,128,133,137,140,143,146,149,152,156,160,164,167,170,171,174,178,181,185,188,192,196,199,203,206,210,213,216,219,222,225,228,231,234,237,240,243,247,251,255,258,261,265,269,272,276,279,282,285,288,291,294,297,300,303,306,309,312,315,318,321,324,327,330,333,336,339,342,345,348,351,354,357,360,363,366,369,372,375,378,381,384,387,390,393,396,399,402,405],{"path":78,"title":79,"category":80,"subcategory":81},"/support/adding-a-personal-signature","Adding a personal signature","account","branding",{"path":83,"title":84,"category":80,"subcategory":81},"/support/adding-a-watermark","Adding a watermark",{"path":86,"title":87,"category":63,"subcategory":88},"/support/adding-custom-metadata-to-files","Adding custom metadata to files","metadata",{"path":90,"title":91,"category":63,"subcategory":74},"/support/adding-extra-file-formats-to-an-existing-file","Adding extra file formats to an existing file",{"path":93,"title":94,"category":95,"subcategory":96},"/support/adobe-premiere-pro-and-avid-integration-issues","Adobe Premiere Pro & AVID integration issues","troubleshooting","integration",{"path":98,"title":99,"category":80,"subcategory":100},"/support/automatic-login-for-users","Automatic login for users","user-management",{"path":102,"title":103,"category":63,"subcategory":88},"/support/automatic-metadata-from-exif-data","Automatic metadata from Exif data",{"path":105,"title":106,"category":63,"subcategory":107},"/support/captions","Captions & Transcriptions","review-and-approve",{"path":109,"title":110,"category":80,"subcategory":81},"/support/changing-the-look-of-the-share-page","Changing the look of the share page",{"path":112,"title":113,"category":63,"subcategory":114},"/support/changing-the-thumbnail-or-preview-image-of-a-video","Changing the thumbnail or preview image of a video","organizing-media",{"path":116,"title":117,"category":63,"subcategory":107},"/support/choosing-the-right-bitrate-for-your-video","Choosing the right bitrate for your video",{"path":119,"title":120,"category":95,"subcategory":96},"/support/cloud-storage-s3-and-azure-issues","Cloud storage (S3 & Azure) issues",{"path":122,"title":123,"category":63,"subcategory":74},"/support/cloud-storage-support-s3-and-azure","Cloud storage support (S3 and Azure)",{"path":125,"title":126,"category":63,"subcategory":127},"/support/collecting-media-with-upload-link","Collecting media with Upload Link","uploading",{"path":129,"title":130,"category":131,"subcategory":132},"/support/comments-collaboration-tools","Comments and collaboration tools","onboarding","user-guide",{"path":134,"title":135,"category":80,"subcategory":136},"/support/connecting-an-existing-media-lab-account-to-single-sign-on-sso","Connecting an existing MediaLab account to single sign-on (SSO)","account-settings",{"path":138,"title":139,"category":63,"subcategory":74},"/support/connecting-media-lab-to-adobe-premiere-pro-via-ftp","Connecting MediaLab to Adobe Premiere Pro via FTP",{"path":141,"title":142,"category":63,"subcategory":74},"/support/cors-configuration-for-s3-and-azure","CORS configuration for S3 and Azure",{"path":144,"title":145,"category":80,"subcategory":81},"/support/customize-outgoing-emails","Customize outgoing emails",{"path":147,"title":148,"category":80,"subcategory":81},"/support/dark-mode","Dark Mode",{"path":150,"title":151,"category":131,"subcategory":132},"/support/downloading-files","Downloading files",{"path":153,"title":154,"category":131,"subcategory":155},"/support/downloading-ml-connect","Downloading files with MediaLab Connect","desktop-app",{"path":157,"title":158,"category":95,"subcategory":159},"/support/downloading-shared-files-without-browser-prompts","Downloading shared files without browser prompts","general-faqs",{"path":161,"title":162,"category":63,"subcategory":163},"/support/dynamic-watermarking","Secure your media with dynamic watermarking","sharing",{"path":165,"title":166,"category":63,"subcategory":114},"/support/editing-thumbnails","Editing thumbnails",{"path":168,"title":169,"category":63,"subcategory":163},"/support/embedding-a-video-on-your-website","Embedding a video on your website",{"path":70,"title":5,"category":63,"subcategory":74},{"path":172,"title":173,"category":63,"subcategory":163},"/support/enabling-public-access-to-media-lab","Enabling public access to MediaLab",{"path":175,"title":176,"category":95,"subcategory":177},"/support/error-oops-something-went-wrong","Error: “Oops! Something went wrong.”","error",{"path":179,"title":180,"category":63,"subcategory":74},"/support/file-catalyst-support","FileCatalyst support",{"path":182,"title":183,"category":131,"subcategory":184},"/support/find-login-page","Finding your MediaLab login page","login",{"path":186,"title":187,"category":131,"subcategory":184},"/support/first-time-sso-login","First-Time login using single sign-on (SSO)",{"path":189,"title":190,"category":80,"subcategory":191},"/support/folder-deletion-is-limited-to-administrators","Folder deletion is limited to administrators","roles-permissions",{"path":193,"title":194,"category":95,"subcategory":195},"/support/ftp-could-not-write-to-transfer-socket","FTP Error: “Could Not Write to Transfer Socket: EPIPE”","upload-processing",{"path":197,"title":198,"category":95,"subcategory":195},"/support/image-colors-look-different-after-upload","Image colors look different after upload",{"path":200,"title":201,"category":95,"subcategory":202},"/support/increasing-video-playback-quality-in-media-lab","Increasing video playback quality in MediaLab","playback",{"path":204,"title":205,"category":131,"subcategory":155},"/support/installing-logging-ml-connect","Installing and logging in to MediaLab Connect",{"path":207,"title":208,"category":131,"subcategory":209},"/support/introduction-to-medialab","Introduction to MediaLab","intro",{"path":211,"title":212,"category":95,"subcategory":195},"/support/inverted-colors-in-uploaded-images","Inverted colors in uploaded images",{"path":214,"title":215,"category":95,"subcategory":195},"/support/large-image-uploaded-without-preview","Large image uploaded without preview",{"path":217,"title":218,"category":131,"subcategory":132},"/support/loggin-in-as-user","Logging in as user",{"path":220,"title":221,"category":131,"subcategory":132},"/support/managing-notifications","Managing notifications",{"path":223,"title":224,"category":63,"subcategory":127},"/support/maximum-file-size","Maximum file size",{"path":226,"title":227,"category":63,"subcategory":163},"/support/maximum-views-setting-for-shared-media","Maximum views setting for shared media",{"path":229,"title":230,"category":131,"subcategory":155},"/support/medialab-connect","MediaLab Connect",{"path":232,"title":233,"category":95,"subcategory":96},"/support/metadata-and-workflow-integration-issues","Metadata & workflow integration issues",{"path":235,"title":236,"category":131,"subcategory":155},"/support/ml-connect-file-integrity","Verifying the integrity of MediaLab Connect installation files",{"path":238,"title":239,"category":95,"subcategory":96},"/support/ml-connect-integration-issues","ML Connect integration issues",{"path":241,"title":242,"category":131,"subcategory":155},"/support/ml-connect-release-notes","ML Connect - release notes",{"path":244,"title":245,"category":131,"subcategory":246},"/support/mobile-access","Accessing MediaLab on a mobile device","mobile-access",{"path":248,"title":249,"category":80,"subcategory":250},"/support/object-storage-billing","Object storage billing","billing",{"path":252,"title":253,"category":131,"subcategory":254},"/support/organizing-files-and-folders","Organizing files and folders","getting-started",{"path":256,"title":257,"category":63,"subcategory":74},"/support/pull-add-on","Pull add-on",{"path":259,"title":260,"category":63,"subcategory":74},"/support/push-add-on","Push add-on",{"path":262,"title":263,"category":95,"subcategory":264},"/support/recovering-a-forgotten-username","Recovering a forgotten username","login-issues",{"path":266,"title":267,"category":63,"subcategory":268},"/support/recreate-feature","Recreate feature","downloading",{"path":270,"title":271,"category":63,"subcategory":74},"/support/remote-destinations","Cloud connections",{"path":273,"title":274,"category":80,"subcategory":275},"/support/reporting-a-security-issue","Reporting a security issue","security",{"path":277,"title":278,"category":95,"subcategory":264},"/support/resetting-a-forgotten-password","Resetting a forgotten password",{"path":280,"title":281,"category":63,"subcategory":163},"/support/restricting-access-to-the-source-file","Restricting access to the source file",{"path":283,"title":284,"category":63,"subcategory":163},"/support/restricting-download-access","Restricting download access",{"path":286,"title":287,"category":63,"subcategory":163},"/support/restricting-download-access-to-previews","Restricting download access to previews",{"path":289,"title":290,"category":63,"subcategory":107},"/support/reviewing-approving","Review & Approve",{"path":292,"title":293,"category":63,"subcategory":163},"/support/revoking-sent-emails-or-share-links","Revoking sent emails or share links",{"path":295,"title":296,"category":63,"subcategory":163},"/support/rss-feed-support","RSS feed support",{"path":298,"title":299,"category":63,"subcategory":127},"/support/setting-the-target-folder-for-pull-uploads","Setting the target folder for pull uploads",{"path":301,"title":302,"category":63,"subcategory":74},"/support/setting-up-a-watch-folder","Setting up a watch folder",{"path":304,"title":305,"category":80,"subcategory":100},"/support/shared-accounts","Shared accounts",{"path":307,"title":308,"category":63,"subcategory":163},"/support/sharing-a-file-on-facebook-or-twitter","Sharing a file on Facebook or Twitter",{"path":310,"title":311,"category":63,"subcategory":163},"/support/sharing-files-in-media-lab","Sharing files in MediaLab",{"path":313,"title":314,"category":131,"subcategory":132},"/support/sharing-files-links","Sharing files and links",{"path":316,"title":317,"category":63,"subcategory":163},"/support/sharing-folders-in-media-lab","Sharing folders in MediaLab",{"path":319,"title":320,"category":131,"subcategory":254},"/support/sharing-media","Sharing your media",{"path":322,"title":323,"category":131,"subcategory":184},"/support/sso-setup-for-owners","Single sign-on (SSO) setup for owners",{"path":325,"title":326,"category":63,"subcategory":268},"/support/support-for-multiple-audio-streams","Support for multiple audio streams",{"path":328,"title":329,"category":63,"subcategory":127},"/support/supported-file-types","Supported file types",{"path":331,"title":332,"category":63,"subcategory":268},"/support/supported-video-formats-for-transcoding","Supported video formats for transcoding",{"path":334,"title":335,"category":63,"subcategory":114},"/support/tracking-activity-in-medialab","Tracking Activity in MediaLab",{"path":337,"title":338,"category":95,"subcategory":195},"/support/troubleshooting-file-upload-failures","Troubleshooting file upload failures",{"path":340,"title":341,"category":95,"subcategory":96},"/support/troubleshooting-ftp-udp-uploads","Troubleshooting FTP/UDP uploads",{"path":343,"title":344,"category":95,"subcategory":264},"/support/troubleshooting-single-sign-on-sso-login-issues","Troubleshooting single sign-on (SSO) login issues",{"path":346,"title":347,"category":131,"subcategory":254},"/support/upload-first-file","Uploading your first file",{"path":349,"title":350,"category":95,"subcategory":195},"/support/upload-speed-and-estimated-upload-times","Upload speed and estimated upload times",{"path":352,"title":353,"category":63,"subcategory":127},"/support/upload-times-for-videos","Upload times for videos",{"path":355,"title":356,"category":63,"subcategory":127},"/support/uploading-a-video-without-transcoding","Uploading a video without transcoding",{"path":358,"title":359,"category":131,"subcategory":132},"/support/uploading-files","Uploading files",{"path":361,"title":362,"category":63,"subcategory":127},"/support/uploading-files-via-ftp","Uploading files via FTP",{"path":364,"title":365,"category":80,"subcategory":191},"/support/user-access-to-folders","User access to folders",{"path":367,"title":368,"category":80,"subcategory":191},"/support/user-flags","User flags",{"path":370,"title":371,"category":80,"subcategory":191},"/support/user-levels-in-media-lab","User levels in MediaLab",{"path":373,"title":374,"category":80,"subcategory":191},"/support/user-roles","User roles",{"path":376,"title":377,"category":63,"subcategory":127},"/support/using-ftp-to-upload-or-download-files","Using FTP to upload or download files",{"path":379,"title":380,"category":63,"subcategory":114},"/support/using-the-context-menu","Using the context menu",{"path":382,"title":383,"category":63,"subcategory":74},"/support/video-embed-options","Video embed options",{"path":385,"title":386,"category":63,"subcategory":88},"/support/viewing-exif-metadata","Viewing Exif metadata",{"path":388,"title":389,"category":131,"subcategory":254},"/support/viewing-media","Viewing media in MediaLab",{"path":391,"title":392,"category":131,"subcategory":132},"/support/viewing-previewing-media","Viewing and previewing media",{"path":394,"title":395,"category":63,"subcategory":107},"/support/viewing-timecodes-in-video","Viewing timecodes in video",{"path":397,"title":398,"category":95,"subcategory":195},"/support/why-audio-files-appear-in-the-audio-queue","Why audio files appear in the audio queue",{"path":400,"title":401,"category":95,"subcategory":195},"/support/why-free-space-doesnt-increase-after-deleting-files","Why free space doesn’t increase after deleting files",{"path":403,"title":404,"category":95,"subcategory":195},"/support/why-videos-appear-in-the-video-queue","Why videos appear in the video queue",{"path":406,"title":407,"category":131,"subcategory":254},"/support/working-with-metadata","Working with metadata",[409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,486,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510],{"path":78,"title":79,"category":80,"subcategory":81},{"path":83,"title":84,"category":80,"subcategory":81},{"path":86,"title":87,"category":63,"subcategory":88},{"path":90,"title":91,"category":63,"subcategory":74},{"path":93,"title":94,"category":95,"subcategory":96},{"path":98,"title":99,"category":80,"subcategory":100},{"path":102,"title":103,"category":63,"subcategory":88},{"path":105,"title":106,"category":63,"subcategory":107},{"path":109,"title":110,"category":80,"subcategory":81},{"path":112,"title":113,"category":63,"subcategory":114},{"path":116,"title":117,"category":63,"subcategory":107},{"path":119,"title":120,"category":95,"subcategory":96},{"path":122,"title":123,"category":63,"subcategory":74},{"path":125,"title":126,"category":63,"subcategory":127},{"path":129,"title":130,"category":131,"subcategory":132},{"path":134,"title":135,"category":80,"subcategory":136},{"path":138,"title":139,"category":63,"subcategory":74},{"path":141,"title":142,"category":63,"subcategory":74},{"path":144,"title":145,"category":80,"subcategory":81},{"path":147,"title":148,"category":80,"subcategory":81},{"path":150,"title":151,"category":131,"subcategory":132},{"path":153,"title":154,"category":131,"subcategory":155},{"path":157,"title":158,"category":95,"subcategory":159},{"path":161,"title":162,"category":63,"subcategory":163},{"path":165,"title":166,"category":63,"subcategory":114},{"path":168,"title":169,"category":63,"subcategory":163},{"path":70,"title":5,"category":63,"subcategory":74},{"path":172,"title":173,"category":63,"subcategory":163},{"path":175,"title":176,"category":95,"subcategory":177},{"path":179,"title":180,"category":63,"subcategory":74},{"path":182,"title":183,"category":131,"subcategory":184},{"path":186,"title":187,"category":131,"subcategory":184},{"path":189,"title":190,"category":80,"subcategory":191},{"path":193,"title":194,"category":95,"subcategory":195},{"path":197,"title":198,"category":95,"subcategory":195},{"path":200,"title":201,"category":95,"subcategory":202},{"path":204,"title":205,"category":131,"subcategory":155},{"path":207,"title":208,"category":131,"subcategory":209},{"path":211,"title":212,"category":95,"subcategory":195},{"path":214,"title":215,"category":95,"subcategory":195},{"path":217,"title":218,"category":131,"subcategory":132},{"path":220,"title":221,"category":131,"subcategory":132},{"path":223,"title":224,"category":63,"subcategory":127},{"path":226,"title":227,"category":63,"subcategory":163},{"path":229,"title":230,"category":131,"subcategory":155},{"path":232,"title":233,"category":95,"subcategory":96},{"path":235,"title":236,"category":131,"subcategory":155},{"path":238,"title":239,"category":95,"subcategory":96},{"path":241,"title":242,"category":131,"subcategory":155},{"path":244,"title":245,"category":131,"subcategory":246},{"path":248,"title":249,"category":80,"subcategory":250},{"path":252,"title":253,"category":131,"subcategory":254},{"path":256,"title":257,"category":63,"subcategory":74},{"path":259,"title":260,"category":63,"subcategory":74},{"path":262,"title":263,"category":95,"subcategory":264},{"path":266,"title":267,"category":63,"subcategory":268},{"path":270,"title":271,"category":63,"subcategory":74},{"path":273,"title":274,"category":80,"subcategory":275},{"path":277,"title":278,"category":95,"subcategory":264},{"path":280,"title":281,"category":63,"subcategory":163},{"path":283,"title":284,"category":63,"subcategory":163},{"path":286,"title":287,"category":63,"subcategory":163},{"path":289,"title":290,"category":63,"subcategory":107},{"path":292,"title":293,"category":63,"subcategory":163},{"path":295,"title":296,"category":63,"subcategory":163},{"path":298,"title":299,"category":63,"subcategory":127},{"path":301,"title":302,"category":63,"subcategory":74},{"path":304,"title":305,"category":80,"subcategory":100},{"path":307,"title":308,"category":63,"subcategory":163},{"path":310,"title":311,"category":63,"subcategory":163},{"path":313,"title":314,"category":131,"subcategory":132},{"path":316,"title":317,"category":63,"subcategory":163},{"path":319,"title":320,"category":131,"subcategory":254},{"path":322,"title":323,"category":131,"subcategory":184},{"path":325,"title":326,"category":63,"subcategory":268},{"path":328,"title":329,"category":63,"subcategory":127},{"path":331,"title":332,"category":63,"subcategory":268},{"path":334,"title":335,"category":63,"subcategory":114},{"path":337,"title":338,"category":95,"subcategory":195},{"path":340,"title":341,"category":95,"subcategory":96},{"path":343,"title":344,"category":95,"subcategory":264},{"path":346,"title":347,"category":131,"subcategory":254},{"path":349,"title":350,"category":95,"subcategory":195},{"path":352,"title":353,"category":63,"subcategory":127},{"path":355,"title":356,"category":63,"subcategory":127},{"path":358,"title":359,"category":131,"subcategory":132},{"path":361,"title":362,"category":63,"subcategory":127},{"path":364,"title":365,"category":80,"subcategory":191},{"path":367,"title":368,"category":80,"subcategory":191},{"path":370,"title":371,"category":80,"subcategory":191},{"path":373,"title":374,"category":80,"subcategory":191},{"path":376,"title":377,"category":63,"subcategory":127},{"path":379,"title":380,"category":63,"subcategory":114},{"path":382,"title":383,"category":63,"subcategory":74},{"path":385,"title":386,"category":63,"subcategory":88},{"path":388,"title":389,"category":131,"subcategory":254},{"path":391,"title":392,"category":131,"subcategory":132},{"path":394,"title":395,"category":63,"subcategory":107},{"path":397,"title":398,"category":95,"subcategory":195},{"path":400,"title":401,"category":95,"subcategory":195},{"path":403,"title":404,"category":95,"subcategory":195},{"path":406,"title":407,"category":131,"subcategory":254},1777549729869]