-
Notifications
You must be signed in to change notification settings - Fork 111
[MBL-19498][Student] Remove non-functional fullscreen button from video player #3456
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,6 +21,7 @@ import android.content.Intent | |
| import android.net.Uri | ||
| import android.os.Bundle | ||
| import android.os.Handler | ||
| import android.widget.ImageButton | ||
| import androidx.annotation.OptIn | ||
| import androidx.media3.common.C | ||
| import androidx.media3.common.MediaItem | ||
|
|
@@ -50,6 +51,8 @@ import com.instructure.pandautils.base.BaseCanvasActivity | |
| import com.instructure.pandautils.binding.viewBinding | ||
| import com.instructure.pandautils.utils.ThemePrefs | ||
| import com.instructure.pandautils.utils.ViewStyler | ||
| import com.instructure.pandautils.utils.setGone | ||
| import com.instructure.student.R | ||
| import com.instructure.student.databinding.ActivityVideoViewBinding | ||
| import com.instructure.student.util.Const | ||
|
|
||
|
|
@@ -72,6 +75,7 @@ class VideoViewActivity : BaseCanvasActivity() { | |
| mainHandler = Handler() | ||
| val videoTrackSelectionFactory: ExoTrackSelection.Factory = AdaptiveTrackSelection.Factory() | ||
| trackSelector = DefaultTrackSelector(applicationContext, videoTrackSelectionFactory) | ||
| binding.playerView.findViewById<ImageButton>(R.id.fullscreenButton).setGone() | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Potential NullPointerException: The Consider using a safe call or null check: binding.playerView.findViewById<ImageButton>(R.id.fullscreenButton)?.setGone()Or verify the button exists and handle the null case: binding.playerView.findViewById<ImageButton>(R.id.fullscreenButton)?.let { button ->
button.setGone()
} ?: run {
// Log warning or handle missing button case
}There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Timing concern: This code runs in Consider moving this after the player is fully set up, or using a post handler: binding.playerView.post {
binding.playerView.findViewById<ImageButton>(R.id.fullscreenButton)?.setGone()
} |
||
| fetchMediaUri(Uri.parse(intent?.extras?.getString(Const.URL))) | ||
| ViewStyler.setStatusBarDark(this, ThemePrefs.primaryColor) | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import ordering: The
ImageButtonimport appears to be placed between OS imports and Media3 imports. Consider organizing imports by grouping (Android framework, third-party libraries, app-specific) for better readability.