gpt4 book ai didi

youtube - 没有iframe,Three.js,A帧的YouTube视频

转载 作者:行者123 更新时间:2023-12-03 05:24:31 24 4
gpt4 key购买 nike

是否可以在没有IFRAME和播放器的情况下播放youtube视频?

我希望能够在视频纹理上播放视频。

您可以看到我已经在这里完成了:

http://dev3.garyconstable.co.uk/

这是将播放我自己的mp4的代码
<a-scene>
<a-assets>
<video id="video" autobuffer height="240" width="360" autoplay loop="true" crossorigin="anonymous" webkit-playsinline>
<source src="media/videos_s_7.mp4">
</video>
</a-assets>
<a-videosphere id="vid-sphere" autopla="true"></a-videosphere>
</a-scene>

我希望能够播放来自youtube的视频。

JW播放器似乎可以播放youtube视频的
https://support.jwplayer.com/customer/portal/articles/1406725-youtube-video-embed

有可能吗,我有什么选择? YouTube是否提供任何形式的付费服务来提供其他功能?

最佳答案

最好忘记任何一位球员从事这项工作。
注意:

JW Player uses the official iFrame player API from YouTube to play a video inside of JW Player. 
原因:
  • youtube.com不会在该服务器上接受跨域。

  • 您将需要为Web应用程序添加服务器部分。我使用nodejs。
    这是过程:

    ----> Use classic google , youtube APi login/search
    ----> Make search and collect search result data (Most important is `videoId` )
    ----> Save to your own server
    ----> Call from web app your new route.

    现在,您可以做任何您想做的事情。
    直接演示链接:
    https://maximumroulette.com:3000
    完整解决方案,网址:
    https://github.com/zlatnaspirala/vue-typescript-starter

    关于youtube - 没有iframe,Three.js,A帧的YouTube视频,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39447076/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com