Youtube_player_flutter: [BUG] ํ•„์ˆ˜ ํด๋ผ์ด์–ธํŠธ ์ž๊ฒฉ์ด ๋ˆ„๋ฝ๋จ: MediaPlayback

์— ๋งŒ๋“  2021๋…„ 06์›” 30์ผ  ยท  4์ฝ”๋ฉ˜ํŠธ  ยท  ์ถœ์ฒ˜: sarbagyastha/youtube_player_flutter

๋ฒ„๊ทธ ์„ค๋ช…
ํ”Œ๋ ˆ์ด์–ด๋ฅผ ์—ด ๋•Œ๋งˆ๋‹ค ์ฝ˜์†”์— ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์˜ค๋ฅ˜๊ฐ€ ์ธ์‡„๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

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 ์—ด๊ธฐ

์˜ˆ์ƒ๋˜๋Š” ํ–‰๋™
์˜ค๋ฅ˜ ์—†์ด ํ”Œ๋ ˆ์ด์–ด๋ฅผ ์—ฝ๋‹ˆ๋‹ค.

์Šคํฌ๋ฆฐ์ƒท
ํ•ด๋‹นํ•˜๋Š” ๊ฒฝ์šฐ ๋ฌธ์ œ๋ฅผ ์„ค๋ช…ํ•˜๋Š” ๋ฐ ๋„์›€์ด ๋˜๋Š” ์Šคํฌ๋ฆฐ์ƒท์„ ์ถ”๊ฐ€ํ•˜์„ธ์š”.

๊ธฐ์ˆ ์  ์„ธ๋ถ€ ์‚ฌํ•ญ:

  • ์žฅ์น˜: ์•„์ดํฐ 10
  • ์šด์˜ ์ฒด์ œ: iOS 14.6
  • ๋ฒ„์ „ ํ”Œ๋Ÿฌํ„ฐ 2.2.2

์ถ”๊ฐ€ ์ปจํ…์ŠคํŠธ
๋‚ด 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,
            ),
          ),
        ],
      ),
    );

๋‚ด ํ”„๋กœ์ ํŠธ์— ๋ˆ„๋ฝ๋œ ๊ฒƒ์ด ์žˆ์Šต๋‹ˆ๊นŒ? ๋ฌธ์˜ํ•˜์‹œ๋ฉด ๋ฐ”๋กœ ๋‹ต๋ณ€๋“œ๋ฆฌ๊ฒ ์Šต๋‹ˆ๋‹ค.

๊ฐ€์žฅ ์œ ์šฉํ•œ ๋Œ“๊ธ€

๋‚˜๋Š” ๊ฐ™์€ ๋ฌธ์ œ๋ฅผ ๊ฐ€์ง€๊ณ ์žˆ๋‹ค

๋ชจ๋“  4 ๋Œ“๊ธ€

๋‚˜๋Š” ๊ฐ™์€ ๋ฌธ์ œ๋ฅผ ๊ฐ€์ง€๊ณ ์žˆ๋‹ค

์ด ๊ฒฝ๊ณ ๋Š” Info.plist๋ฅผ ์ฐธ์กฐํ•ฉ๋‹ˆ๊นŒ?

@PcolBP ํ•ด๊ฒฐ์ฑ…์„ ์ฐพ์•˜์Šต๋‹ˆ๊นŒ?

๋ถˆํ–‰ํžˆ๋„ YoutubePlayerFlutter์—๋Š” ์—†์Šต๋‹ˆ๋‹ค. ํ•ด๋‹น ํ”„๋กœ์ ํŠธ์˜ ๊ฒฝ์šฐ YoutubePlayerFlutter์— ๋น„ํ•ด ๋” ๋‚˜์€ ์„ฑ๋Šฅ์„ ์ œ๊ณตํ•˜๊ณ  ๊ทธ ์ดํ›„๋กœ ์˜ค๋ฅ˜๊ฐ€ ์ธ์‡„๋˜์ง€ ์•Š๊ธฐ ๋•Œ๋ฌธ์— YoutubePlayerIframe์œผ๋กœ ์ „ํ™˜ํ–ˆ์Šต๋‹ˆ๋‹ค.

์ด ํŽ˜์ด์ง€๊ฐ€ ๋„์›€์ด ๋˜์—ˆ๋‚˜์š”?
0 / 5 - 0 ๋“ฑ๊ธ‰