在onPause時停止播放串流影像
This commit is contained in:
parent
28d152e98d
commit
735958bdb0
@ -36,6 +36,15 @@ public class MainActivity extends AppCompatActivity implements GstCallback {
|
||||
binding.buttonStop.setOnClickListener(view -> gstLibrary.stop());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause() {
|
||||
super.onPause();
|
||||
|
||||
if (gstLibrary != null) {
|
||||
gstLibrary.stop();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user