同时串流 2 个视频 Swift [英] Stream 2 videos simultaneously Swift

查看:38
本文介绍了同时串流 2 个视频 Swift的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 iphone 上使用 swift 同时流式传输两个视频.我已经知道 AV 播放器一次只能流式传输一个视频,但是通过谷歌搜索我发现仍然可以同时流式传输不同的曲目.我也看到了画中画的实现.真正的问题是全部在objective-c 中并且代码很旧.我试图理解它按原样运行代码,但存在错误并且不推荐使用某些功能.有人知道如何快速做到这一点吗?此外,我正在从互联网流式传输视频,因此在播放之前合并它们不是一种选择.谢谢!

I'm trying to stream two videos at the same time with swift on iphone. I already know that the AV Player can only stream one video at a time, but googling it I saw that it's still possible to stream different tracks at the same time. I also saw the picture in picture implementation. The real problem is that is all in objective-c and the code is quite old. I tried to understand it running the code as it is, but there are errors and some of the functions are deprecated. Does someone know how to do that in swift? Also, I'm streaming video from the internet so merging them before playing is not an option. Thank you!

推荐答案

看起来像 http://iosguy.com/2012/01/11/multiple-video-playback-on-ios/ 是目前最好的解决方案.还没有人尝试快速转换它.

It looks like http://iosguy.com/2012/01/11/multiple-video-playback-on-ios/ is the best solution at the moment. Nobody tried to convert it in swift yet.

这篇关于同时串流 2 个视频 Swift的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆