2017-09-18 74 views
2

在我的項目中使用MobileVLCKit 3.0.0播放媒體。MobileVLCKit播放器顯示iOS上的黑屏11

在iOS9上成功播放的所有類型的視頻& 10但在iOS 11視頻音頻能夠聽,但圖片不顯示並顯示黑屏

,給出以下日誌:

2017-09-18 18:26:17.640065+0800 DemoPlayer[39923:369260] creating player instance using shared library 
================================================================= 
Main Thread Checker: UI API called on a background thread: -[UIView bounds] 
PID: 39923, TID: 369593, Thread name: (none), Queue name: com.apple.root.default-qos.overcommit, QoS: 21 
Backtrace: 
4 DemoPlayer       0x0000000108349895 Open + 405 
2017-09-18 18:26:23.490963+0800 DemoPlayer[39923:369593] [reports] Main Thread Checker: UI API called on a background thread: -[UIView bounds] 
PID: 39923, TID: 369593, Thread name: (none), Queue name: com.apple.root.default-qos.overcommit, QoS: 21 
Backtrace: 
4 DemoPlayer       0x0000000108349895 Open + 405 
================================================================= 
Main Thread Checker: UI API called on a background thread: -[UIView initWithFrame:] 
PID: 39923, TID: 369593, Thread name: (none), Queue name: com.apple.root.default-qos.overcommit, QoS: 21 
Backtrace: 
4 DemoPlayer       0x0000000108349f3b -[VLCOpenGLES2VideoView initWithFrame:zeroCopy:voutDisplay:] + 91 
2017-09-18 18:26:23.875359+0800 DemoPlayer[39923:369593] [reports] Main Thread Checker: UI API called on a background thread: -[UIView initWithFrame:] 
PID: 39923, TID: 369593, Thread name: (none), Queue name: com.apple.root.default-qos.overcommit, QoS: 21 
Backtrace: 
4 DemoPlayer       0x0000000108349f3b -[VLCOpenGLES2VideoView initWithFrame:zeroCopy:voutDisplay:] + 91 
2017-09-18 18:26:23.959355+0800 DemoPlayer[39923:369593] CoreAnimation: [EAGLContext renderbufferStorage:fromDrawable:] was called from a non-main thread in an implicit transaction! Note that this may be unsafe without an explicit CATransaction or a call to [CATransaction flush]. 
shader program 1: WARNING: Output of vertex shader 'TexCoord1' not read by fragment shader 
WARNING: Output of vertex shader 'TexCoord2' not read by fragment shader 

在此先感謝。

回答

6

最後得到了解決......

現在「MobileVLCKit不穩定」的版本更新到主於09月20日從後臺線程的UIKit(iOS版11視頻播放)的問題。

解決方法1:

添加pod 'MobileVLCKit-unstable', '3.0.0a38'到podfile和運行pod install

解決方案2:

  1. 克隆從以下URL回購:http://code.videolan.org/videolan/VLCKit.git

  2. 打開終端,導航到根目錄並執行./buildMobileVLCKit.sh -f(注意:可能需要1-2小時才能將c完成)

  3. 成功完成後,將在VLCKit/build /文件夾位置生成MobileVLCKit.framework
  4. 只需將其拖動到您的項目。
0

您需要將MobileVLCKit更新到版本爲「3.0.0a38」或更高版本的Pod'MobileVLCKit-unstable'。此問題已解決。無法以任何方式使舊版本的庫發揮作用,因爲它從後臺線程調用UIKit。

+0

嗨Feepk,我想安裝提到的吊艙,但無法安裝。嘗試使用Pod'MobileVLCKit-unstable''3.0.0a38',pod嘗試MobileVLCKit-unstable。能否請你幫忙?謝謝 –

+0

也創建了新項目,只是嘗試使用這些命令a)pod嘗試'MobileVLCKit-unstable''3.0.0a38'b)pod嘗試'MobileVLCKit-unstable' 輸出: 更新規範庫 。 。 嘗試MobileVLCKit-unstable [!]/usr/bin/curl -f -L -o /private/var/folders/p3/jzgk4rcj1s15r_w9d2j9cqn40000gn/T/CocoaPods/Try/MobileVLCKit-unstable/file.zip https:// download .videolan.org/pub/cocoapods/unstable/MobileVLCKit-unstable-3.0.0a38-4d3db120.zip --create-dirs --netrc-optional –