Skip to content

[video_player_videohole] Add suspend and restore api for handing onPause and onResume lifecyle event #858

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

gin7773
Copy link
Contributor

@gin7773 gin7773 commented May 19, 2025

Add suspend and restore interface:

  • Plugin native side need to re-create player when power instant off/on.
  • If plugin plays a live stream, plugin native side need to re-create player when receiving lifecycle onPause and onResume.
  • If plugin plays a vod stream, plugin native side need to call suspend and restore when receiving lifecycle onPause and onResume.

Test scenario:

Scenario 1: When the video sample in the example is playing/pause, if you turn off the TV power and turn it back on within 5 seconds.

  • If the video type is LIVE, the video should start playing/pause from the LIVE point. (Live)
  • If you change the video's URL and resume time, the video should playing from the resume time. (ChangeURLTest)
  • Else, the video should start playing/pause from the point you were watching. (MP4, HLS, DASH, and others)

Scenario 2: When the video sample in the example is playing/pause, if the player preempted by other apps and then returns.

  • Same with 'Scenario 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant