YouTubeStandalonePlayer 第二次无法正常工作

时间:2021-07-22 04:15:26

标签: android kotlin android-youtube-api

我使用下面的 YouTubeStandalonePlayer 代码片段来播放 YouTube 视频:

val intent = YouTubeStandalonePlayer.createVideoIntent(
                        activityContext() as Activity?,
                        "API_KEY",
                        "VIDEO_ID",
                        0,
                        true,
                        false)
context.startActivity(intent)

如果我清除缓存和数据并运行它,它就可以完美运行。但是当我第二次调用它时,视频播放了 1 秒并暂停。

0 个答案:

没有答案