在SwiftUI中实现YouTube播放器

Backstory here! Skip through next paragraph to get to View implementation.

这里的背景! 跳过下一段,以View实现。

Last week I have finished Waracle’s Digital Academy — quick SwiftUI course run by Laurie Aviel Gray (Code Disciple). The technology is great for use in personal projects and I can’t wait until it will be more commonly adapted, because the ease of use and uniformity of projects is just amazing. During the course I was working on using it for my own project — an app companion for Chrome Extension: Watch Next: YouTube, which work with user created playlists. For it to work I needed a SwiftUI version of the YouTube player, but none was ready yet: YouTube’s own implementation is written in Objective-C and the implementation which allows the use of native iOS media player was no longer maintained (plus is breaking YouTube’s licensing), so I have decided to use the very recent (updated this month for WKWebView) implementation YouTube Player from Giles Van Gruisen and wrap it as a UIViewRepresentable myself.

上周,我完成了Waracle的数字学院-由Laurie Aviel Gray ( Code Disciple )开设的快速SwiftUI课程。 该技术非常适合在个人项目中使用,我迫不及待要对其进行更广泛的修改,因为项目的易用性和统一性令人惊叹。 在课程中,我一直在为自己的项目使用它-Chrome扩展程序的应用程序伴侣: 观看下一个:YouTube ,它可以与用户创建的播放列表一起使用。 为了使其正常工作,我需要一个SwiftUI版本的YouTube播放器,但尚未准备好: YouTube自己的实现是用Objective-C编写的,不再允许使用本机iOS媒体播放器的实现(而且破坏了YouTube的实现)许可),因此我决定使用Giles Van Gruisen的最新实现(本月为WKWebView更新), WKWebView YouTube Player 自身包装为UIViewRepresentable

With the way SwiftUI works, this task will require a wrapper

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值