how can we play youtube videos in dailymotion player new beta version

跟風遠走 提交于 2019-12-10 12:26:31

问题


So far this is what I have:

adding player js

<script src="http://api.dmcdn.net/all.js"></script>

<script>
    DM.init({
          apiKey: 'my app key',
          status: true, // check login status
          cookie: true // enable cookies to allow the server to   access the session
    });


    // Append a div in the DOM, you may use a real <div> tag
    var div = document.createElement('div');
    document.body.appendChild(div);


    var videos = 'xdn8vw'; // this is the video id from dailymotions site now i want to play the any youtube video
    var player = DM.player(div, {video: videos });


</script>

so i need the player to play this video 'https://youtu.be/hXI8RQYC36Q?list=PLFgquLnL59akA2PflFpeQG9L01VFg90wS'


回答1:


You can't. The dailymotion player can only read dailymotion videos just as the youtube player only allows you to play youtube videos.



来源:https://stackoverflow.com/questions/29433079/how-can-we-play-youtube-videos-in-dailymotion-player-new-beta-version

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!