Using iframe didn't work for me.
I had two videos on a page. I used setTimeout function to initialize the second video with a delay which solved the problem
var video1 = {
video1_options:'',
video1_player:'',
init: function() {
video1.video1_options = {
autoplay: false,
controls: true,
width: "100%",
height: "auto",
poster: "/assets/img/video/video-thumb-1.png"
};
video1.video1_player = amp("video-1", video1.video1_options);
video1.video1_player.src([{ src: "VIDEO_URL", type: "application/vnd.ms-sstr+xml" }, ]);
},
};
var video2 = {
video2_options:'',
video2_player:'',
init: function() {
video2.video2_options = {
autoplay: false,
controls: true,
width: "100%",
height: "auto",
poster: "/assets/img/video/video-thumb-2.png"
};
video2.video2_player = amp("video-2", video2.video2_options);
video2.video2_player.src([{ src: "VIDEO_URL", type: "application/vnd.ms-sstr+xml" }, ]);
},
};
on document ready function =>
video1.init();
setTimeout(function (){
video2.init();
},500)