CallController.java 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. * Nextcloud Talk application
  3. *
  4. * @author Mario Danic
  5. * Copyright (C) 2017 Mario Danic <mario@lovelyhq.com>
  6. *
  7. * This program is free software: you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation, either version 3 of the License, or
  10. * at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  19. */
  20. package com.nextcloud.talk.controllers;
  21. import android.os.Bundle;
  22. import android.support.annotation.NonNull;
  23. import android.view.LayoutInflater;
  24. import android.view.View;
  25. import android.view.ViewGroup;
  26. import com.nextcloud.talk.R;
  27. import com.nextcloud.talk.application.NextcloudTalkApplication;
  28. import com.nextcloud.talk.controllers.base.RefWatchingController;
  29. import org.webrtc.SurfaceViewRenderer;
  30. import autodagger.AutoInjector;
  31. import butterknife.BindView;
  32. @AutoInjector(NextcloudTalkApplication.class)
  33. public class CallController extends RefWatchingController {
  34. private static final String TAG = "CallController";
  35. @BindView(R.id.fullscreen_video_view)
  36. SurfaceViewRenderer fullScreenVideo;
  37. @BindView(R.id.pip_video_view)
  38. SurfaceViewRenderer pipVideoView;
  39. private String roomToken;
  40. private String userDisplayName;
  41. public CallController(Bundle args) {
  42. super(args);
  43. this.roomToken = args.getString("roomToken", "");
  44. this.userDisplayName = args.getString("userDisplayName");
  45. }
  46. @Override
  47. protected View inflateView(@NonNull LayoutInflater inflater, @NonNull ViewGroup container) {
  48. return inflater.inflate(R.layout.controller_call, container, false);
  49. }
  50. @Override
  51. protected void onViewBound(@NonNull View view) {
  52. super.onViewBound(view);
  53. NextcloudTalkApplication.getSharedApplication().getComponentApplication().inject(this);
  54. }
  55. }