简体   繁体   English

播放 Dash 或 .mpd 视频 react-native(IOS)

[英]Play Dash or .mpd videos react-native(IOS)

I am working on an app which has a media server and this media server provide me the URL's of different video files and these videos are in dash format or .mpd format.我正在开发一个具有媒体服务器的应用程序,该媒体服务器为我提供了不同视频文件的 URL,这些视频采用dash格式或.mpd格式。 I go through react-native-video and it has exo-player on android which already have the support of dash , I have tested exo-player on andriod and it works but on the other hand, it uses AVPlayer for IOS which don't have any support of dash.我浏览了 react-native-video 并且它在android上有exo-player已经支持dash ,我已经在andriod上测试了exo-player并且它可以工作,但另一方面,它使用AVPlayer for IOS而没有有任何破折号的支持。 I spent some time finding some solution on the IOS side which could also support React-Native android and IOS but didn't find a proper way, Found two solutions but not works for both.我花了一些时间在 IOS 端找到了一些也可以支持 React-Native androidIOS解决方案,但没有找到合适的方法,找到了两个解决方案,但不适用于两者。

dash.js - https://github.com/Dash-Industry-Forum/dash.js/wiki dash.js - https://github.com/Dash-Industry-Forum/dash.js/wiki

Google Shaka Player - https://github.com/google/shaka-player谷歌沙卡播放器 - https://github.com/google/shaka-player

dash.js have only support for web and shaka-player have some embedded solution available on IOS and which I have to bridge and then I can use. dash.js只支持webshaka-player有一些嵌入式解决方案在IOS可用,我必须桥接然后我才能使用。

I am looking for some quick workaround on react-native, Is there any player available that can play dash on both platforms or any other workaround that can work for me.我正在寻找一些关于 react-native 的快速解决方法,是否有任何可用的播放器可以在两个平台上播放dash或任何其他适合我的解决方法。

A key reason you may not see as much attention for DASH players in iOS as you expect is that current apple iOS rules require you to use HLS on iOS devices for any video over 10 minutes, assuming your app is available on mobile networks which is nearly always the case:您可能没有像预期的那样在 iOS 中看到 DASH 播放器受到如此多的关注的一个关键原因是,当前的 Apple iOS 规则要求您在 iOS 设备上对超过 10 分钟的任何视频使用 HLS,假设您的应用程序可在移动网络上使用,这几乎是总是这样:

2.5.7 Video streaming content over a cellular network longer than 10 minutes must use HTTP Live Streaming and include a baseline 192 kbps HTTP Live stream. 2.5.7 蜂窝网络上超过 10 分钟的视频流内容必须使用 HTTP Live Streaming 并包括基线 192 kbps HTTP Live 流。

( https://developer.apple.com/app-store/review/guidelines/ ) ( https://developer.apple.com/app-store/review/guidelines/ )

This is a key reason most video streams at this time are available in both HLS and DASH streams.这是目前大多数视频流在 HLS 和 DASH 流中都可用的一个关键原因。

Note that the CMAF format promises to eventually allow you only store and server single copy of your content by effectively having the segmented video streams be the same with different HLS and DASH 'index' or 'manifest' files to refer to them.请注意,CMAF 格式有望通过有效地使分段视频流与不同的 HLS 和 DASH“索引”或“清单”文件相同来引用它们,最终只允许您存储和提供内容的单个副本。 Because of some differences in the way encryption has been done in the past, and the time it will take for all devices and players to support the new format and new agreed encryption support, in practice nearly all encrypted streams will be both HLS and DASH for some time.由于过去加密方式的一些差异,以及所有设备和播放器支持新格式和新同意的加密支持所需的时间,实际上几乎所有加密流都将同时是 HLS 和 DASH一段时间。

( https://developer.apple.com/documentation/http_live_streaming/about_the_common_media_application_format_with_http_live_streaming ) https://developer.apple.com/documentation/http_live_streaming/about_the_common_media_application_format_with_http_live_streaming

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM