Open itzamit28 opened 9 years ago
I have the same problem. When I try to use a YouTube embed link, the console throws a warning; 'failed to retreive duration data, reason: No longer available'
It looks like YouTube player API is changed and Popcorn is unable to see the duration time of the video.
Here a proof of concept with the same video, one embedded with iframe, other with Popcorn.
<html>
<head>
<script src="http://popcornjs.org/code/dist/popcorn-complete.min.js"></script>
</head>
<body>
<iframe width="560" height="315" src="https://www.youtube.com/embed/r5QsG_5uwvM" frameborder="0" allowfullscreen></iframe>
<div id="video" style="width: 360px; height: 300px;" ></div>
<script>
// ensure the web page (DOM) has loaded
document.addEventListener("DOMContentLoaded", function () {
// Create a popcorn instance by calling the Youtube player plugin
var example = Popcorn.smart(
'#video',
'https://www.youtube.com/embed/r5QsG_5uwvM' );
// play the video right away
example.play();
}, false);
</script>
</body>
</html>
I'm hoping to create a Youtube/Wikipedia site over the next few weekends. Any assist with this issue would be awesome.
Please let me know how should I embed Youtube Videos with Popcorn.js. I found some of links where both Youtube and vimeo integrations are given but on those links only Vimeo videos are being integrated Properly is there any way where I can integrate my Youtube Videos with Popcorn.js