MacOSでAVPlayerView/AVPlayerを使用してリモートURLから小さなmp4を再生しようとしている非常に単純なMacOSアプリがあります。
サービス com.apple.rtcreportingd への接続に関するエラーが常に発生します。ここに私が得るエラーの完全なログがあります:
2019-05-19 12:06:47.286932-0700 MyApp[5849:39995] startConfigurationWithCompletionHandler: Failed to get remote object proxy: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named com.apple.rtcreportingd" UserInfo={NSDebugDescription=connection to service named com.apple.rtcreportingd}
2019-05-19 12:06:47.287081-0700 MyApp[5849:39995] startConfigurationWithCompletionHandler: Failed to get remote object proxy: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named com.apple.rtcreportingd" UserInfo={NSDebugDescription=connection to service named com.apple.rtcreportingd}
2019-05-19 12:06:47.392044-0700 MyApp[5849:40033] [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C2.1:2][0x10141c0a0] get output frames failed, state 8196
2019-05-19 12:06:47.392105-0700 MyApp[5849:40033] [BoringSSL] nw_protocol_boringssl_get_output_frames(1301) [C2.1:2][0x10141c0a0] get output frames failed, state 8196
2019-05-19 12:06:47.392269-0700 MyApp[5849:40033] TIC Read Status [2:0x0]: 1:57
2019-05-19 12:06:47.392285-0700 MyApp[5849:40033] TIC Read Status [2:0x0]: 1:57
2019-05-19 12:06:47.622099-0700 MyApp[5849:39997] sendMessageWithDictionary: Failed to get remote object proxy: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named com.apple.rtcreportingd" UserInfo={NSDebugDescription=connection to service named com.apple.rtcreportingd}
2019-05-19 12:06:47.639382-0700 MyApp[5849:39997] sendMessageWithDictionary: Failed to get remote object proxy: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named com.apple.rtcreportingd" UserInfo={NSDebugDescription=connection to service named com.apple.rtcreportingd}
2019-05-19 12:06:48.123992-0700 MyApp[5849:40031] sendMessageWithDictionary: Failed to get remote object proxy: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named com.apple.rtcreportingd" UserInfo={NSDebugDescription=connection to service named com.apple.rtcreportingd}
2019-05-19 12:06:48.129544-0700 MyApp[5849:40029] sendMessageWithDictionary: Failed to get remote object proxy: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named com.apple.rtcreportingd" UserInfo={NSDebugDescription=connection to service named com.apple.rtcreportingd}
再生は正常に動作しているようですが、それでも停止する方法を知りたいです。私が出力している他のデバッグメッセージを隠しています。
AVPlayer をセットアップするコードは非常に簡単です。内部に AVPlayerView を持つ NSCollectionViewItem があります。次に、次の.player
ようなものを使用してビューにプロパティを設定します。
if let previewUrl = URL(string: "https://url-to-an-mp4") {
playerView?.player = AVPlayer(url: previewUrl)
}
私は広範囲にグーグルで検索しましたが、rtcreportingd に関する情報はあまりありません。