/* NewPlayer * * @author Christian Schabesberger * * Copyright (C) NewPipe e.V. 2024 * * NewPlayer is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * NewPlayer is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with NewPlayer. If not, see . */ package net.newpipe.newplayer.testapp import android.os.Bundle import android.view.View import android.webkit.RenderProcessGoneDetail import android.widget.Button import androidx.activity.enableEdgeToEdge import androidx.activity.viewModels import androidx.appcompat.app.AppCompatActivity import androidx.core.view.ViewCompat import androidx.core.view.WindowCompat import androidx.core.view.WindowInsetsCompat import androidx.core.view.WindowInsetsControllerCompat import dagger.hilt.android.AndroidEntryPoint import net.newpipe.newplayer.NewPlayer import net.newpipe.newplayer.VideoPlayerView import net.newpipe.newplayer.model.VideoPlayerViewModel import net.newpipe.newplayer.model.VideoPlayerViewModelImpl import net.newpipe.newplayer.ui.ContentScale import javax.inject.Inject @AndroidEntryPoint class MainActivity : AppCompatActivity() { val videoPlayerViewModel: VideoPlayerViewModel by viewModels() @Inject lateinit var newPlayer: NewPlayer override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) enableEdgeToEdge() setContentView(R.layout.activity_main) val video_view = findViewById(R.id.new_player_video_view) val start_stream_button = findViewById