【问题标题】:Multiple and frequent playback notifications from Exoplayer PlayerNotificationManager for live-stream video played using exoplayer2来自 Exoplayer PlayerNotificationManager 的多个频繁播放通知,用于使用 exoplayer2 播放的直播视频
【发布时间】:2020-02-04 06:05:39
【问题描述】:

我正在使用 Explayer PlayerNotificationManger 来显示使用 Exoplayer2 播放的直播视频的播放通知。

我已关注this medium blog 并实施了相同的操作。

但是,当代码在设备上运行时,它会每 3-4 秒显示一次直播视频通知。当一个通知对用户可见时,请提出一些我可能不会收到多个和频繁通知的内容。

【问题讨论】:

  • 我相信我也面临同样的问题。我也关注了上面提到的文章,并且确实出现了带有播放控件的通知,但是,当通知初始化或视频暂停/恢复时,它也会多次发出烦人的通知声音。有人对此有解决方案吗?

标签: android android-notifications exoplayer exoplayer2.x


【解决方案1】:

如果您的通知或通知渠道被标记为高重要性,则每次更新状态都会导致通知提醒用户。

请参阅 GitHub 上 ExoPlayer 贡献者的 this comment

【讨论】:

  • 为我工作(用低代替高)。我确实设置了高度重要性,因为我想在其他人之上显示通知(就像音乐应用程序一样),但我们可以实现相同的会话令牌设置。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2015-03-20
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多