バグを説明する
プレーヤーを開くたびに、コンソールに次のようなエラーが表示されます。
2021-06-30 09:24:44.141532+0200 Media Creations[39379:12785401] [ProcessSuspension] 0x10c4dd0b0 - ProcessAssertion: Failed to acquire RBS MediaPlayback assertion 'WebKit Media Playback' for process with PID 39379, error: Error Domain=RBSAssertionErrorDomain Code=3 "Required client entitlement is missing" UserInfo={RBSAssertionAttribute=<RBSDomainAttribute| domain:"com.apple.webkit" name:"MediaPlayback" sourceEnvironment:"(null)">, NSLocalizedFailureReason=Required client entitlement is missing}
私のYoutubePlayerControllerは以下のようになります:
final YoutubePlayerController _controller = YoutubePlayerController(
initialVideoId: videoId,
flags: YoutubePlayerFlags(
enableCaption: false,
hideThumbnail: true,
forceHD: true,
autoPlay: false,
startAt: startAt,
),
);
再現するには
IOSでYoutubePlayerFlutterを開く
予想される行動
エラーなしでプレーヤーを開きます
スクリーンショット
該当する場合は、問題を説明するのに役立つスクリーンショットを追加してください。
技術的な詳細:
追加のコンテキスト
これがYoutubePlayerの私のコードです:
return OrientationBuilder(
builder: (_, __) => YoutubePlayer(
key: UniqueKey(),
showVideoProgressIndicator: true,
onReady: _controller.play,
controller: _controller,
controlsTimeOut: const Duration(seconds: 2),
actionsPadding: const EdgeInsets.only(bottom: 10),
progressIndicatorColor: _theme.primaryColor,
onEnded: (_) => _controller.pause(),
bottomActions: [
Padding(
padding: const EdgeInsets.only(
left: VideoFullScreenButton.paddingSize +
VideoFullScreenButton.size * 2,
right: VideoFullScreenButton.paddingSize,
),
child: CurrentPosition(),
),
ProgressBar(
colors: ProgressBarColors(
playedColor: _theme.primaryColor,
handleColor: _theme.primaryColor,
),
isExpanded: true,
),
GestureDetector(
onTap: () => launch(
Strings.youtubeUrlFromId(
videoId,
seconds: _controller.value.position.inSeconds,
),
),
child: const Padding(
padding: EdgeInsets.only(
left: VideoFullScreenButton.paddingSize,
right: VideoFullScreenButton.paddingSize,
),
child: FaIcon(
FontAwesomeIcons.externalLinkAlt,
color: Colors.white,
size: VideoFullScreenButton.size,
),
),
),
VideoFullScreenButton(
preloadedFullScreen: isFullScreen,
key: UniqueKey(),
onTap: (isFullScreen) => _onVideoFullScreenTap(
isFullScreen,
context,
_controller,
),
),
],
),
);
私のプロジェクトに何か足りないものがありますか? 質問があればすぐに返答します。
私も同じ問題を抱えてる
この警告はInfo.plistを参照していますか?
@PcolBP何か解決策を見つけましたか?
残念ながら、YoutubePlayerFlutterではありません。 そのプロジェクトでは、YoutubePlayerFlutterと比較してパフォーマンスが向上し、それ以降エラーが印刷されないため、YoutubePlayerIframeに切り替えました。
最も参考になるコメント
私も同じ問題を抱えてる