We are trying to implement headless playback, and have it loading and playing fine, but when we go to back out of our player into the menu we cannot figure out how to destroy/remove/stop the playback. We keep hearing the playback playing in the background even after we have backed out of the video player. - even after we call playerClient.destroy();
We have combed through the sample app provided here - but don’t see the video player being destroyed, only backgrounded, and when the video stream changes - repurposed.
Also, we never see onSurfaceViewDestroyed being called from the KeplerVideoSurfaceView when we dismount the video player component.
Are we supposed to be destroying the headless client and/or server or storing them globally to reuse?
I feel we have a fundamental disconnect/misunderstanding of how the headless media playback lifecycle is supposed to work. Can someone be so kind as to explain how we are supposed to be using it, and point to any documentation that we may have missed?
Please fill out the fields related to your bug below:
SDK Version:Output of kepler --version
App State:[Foreground/Background]
OS Information
Please ssh into the device via kepler exec vda shelland copy the output from cat /etc/os-releaseinto the answer section below. Note, if you don’t have a simulator running or device attached kepler exec vda shell will respond with vda: no devices/emulators found
I understand how to background the service when the app gets backgrounded, but what about the lifecycle when leaving the video player but remaining in the app?
as in Video Player > menu > select new video > Video Player
Do I unloadSync in that scenario?
Video Player > {unloadSync?} menu > select new video > {?} Video Player
How does the headless playback lifecycle work in that situation?
I’m also facing a similar issue. When backing out of the player screen, we are calling `playerClient.destroy()` but that results in the app getting back to the device’s Home screen, which I guess it’s a crash but no logs are shown.