在onPause時停止播放串流影像
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user