【问题标题】:YouTube videos to play through JSON通过 JSON 播放的 YouTube 视频
【发布时间】:2017-11-23 08:19:49
【问题描述】:

我目前正在为一位音乐制作人开发 iOS 应用程序,但他希望他的所有音乐视频都在 YouTube 上的不同频道上,例如 SBTV、GRM Daily、RinseFM、Boiler Room 等。但唯一的我能想到的方法是通过 JSON 有没有办法在 JSON 文件中放置链接,或者必须通过 Xcode/Swift 完成。

我愿意接受建议并非常感谢您的回复!

谢谢

【问题讨论】:

    标签: ios json


    【解决方案1】:

    是的,您可以这样做,JSON 可能看起来像这样(此摘录来自 Node.js 服务器),然后您可以使用 WKWebView 播放视频。这是苹果官方文档,https://developer.apple.com/documentation/webkit/wkwebview

    var videos = [
    
    {
        name: "Video One", 
        videoURLString: "Youtube.com/whatever",
    }, 
    
    {
        name: "Video Two", 
        videoURLString: "Youtube.com/whatever", 
    }
    ]; 
    

    【讨论】:

    猜你喜欢
    • 2012-03-17
    • 1970-01-01
    • 2013-08-23
    • 1970-01-01
    • 1970-01-01
    • 2012-11-11
    • 2017-05-19
    • 2023-03-07
    • 2021-11-03
    相关资源
    最近更新 更多