forked from recloudstream/cloudstream
minor fix + filler
This commit is contained in:
parent
e1c4ab355c
commit
5da73f4d7b
4 changed files with 29 additions and 2 deletions
|
@ -563,6 +563,13 @@ class CS3IPlayer() : IPlayer {
|
||||||
super.onPlayerError(error)
|
super.onPlayerError(error)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//override fun onCues(cues: MutableList<Cue>) {
|
||||||
|
// cues.firstOrNull()?.text?.let {
|
||||||
|
// println("CUE: $it")
|
||||||
|
// }
|
||||||
|
// super.onCues(cues)
|
||||||
|
//}
|
||||||
|
|
||||||
override fun onRenderedFirstFrame() {
|
override fun onRenderedFirstFrame() {
|
||||||
updatedTime()
|
updatedTime()
|
||||||
if (!hasUsedFirstRender) { // this insures that we only call this once per player load
|
if (!hasUsedFirstRender) { // this insures that we only call this once per player load
|
||||||
|
|
|
@ -42,7 +42,6 @@ import com.lagradost.cloudstream3.utils.UIHelper.popCurrentPage
|
||||||
import com.lagradost.cloudstream3.utils.UIHelper.showSystemUI
|
import com.lagradost.cloudstream3.utils.UIHelper.showSystemUI
|
||||||
import com.lagradost.cloudstream3.utils.UIHelper.toPx
|
import com.lagradost.cloudstream3.utils.UIHelper.toPx
|
||||||
import com.lagradost.cloudstream3.utils.Vector2
|
import com.lagradost.cloudstream3.utils.Vector2
|
||||||
import kotlinx.android.synthetic.main.fragment_player.*
|
|
||||||
import kotlinx.android.synthetic.main.player_custom_layout.*
|
import kotlinx.android.synthetic.main.player_custom_layout.*
|
||||||
import kotlin.math.*
|
import kotlin.math.*
|
||||||
|
|
||||||
|
@ -387,6 +386,7 @@ open class FullScreenPlayer : AbstractPlayerFragment() {
|
||||||
|
|
||||||
//TITLE
|
//TITLE
|
||||||
player_video_title_rez?.startAnimation(fadeAnimation)
|
player_video_title_rez?.startAnimation(fadeAnimation)
|
||||||
|
player_episode_filler?.startAnimation(fadeAnimation)
|
||||||
player_video_title?.startAnimation(fadeAnimation)
|
player_video_title?.startAnimation(fadeAnimation)
|
||||||
player_top_holder?.startAnimation(fadeAnimation)
|
player_top_holder?.startAnimation(fadeAnimation)
|
||||||
// BOTTOM
|
// BOTTOM
|
||||||
|
@ -408,6 +408,7 @@ open class FullScreenPlayer : AbstractPlayerFragment() {
|
||||||
player_top_holder?.isGone = isGone
|
player_top_holder?.isGone = isGone
|
||||||
player_video_title?.isGone = isGone
|
player_video_title?.isGone = isGone
|
||||||
player_video_title_rez?.isGone = isGone
|
player_video_title_rez?.isGone = isGone
|
||||||
|
player_episode_filler?.isGone = isGone
|
||||||
player_center_menu?.isGone = isGone
|
player_center_menu?.isGone = isGone
|
||||||
player_lock?.isGone = !isShowing
|
player_lock?.isGone = !isShowing
|
||||||
//player_media_route_button?.isClickable = !isGone
|
//player_media_route_button?.isClickable = !isGone
|
||||||
|
|
|
@ -282,7 +282,6 @@ class GeneratorPlayer : FullScreenPlayer() {
|
||||||
} else {
|
} else {
|
||||||
currentSubtitles.getOrNull(subtitleIndex - 1)?.let {
|
currentSubtitles.getOrNull(subtitleIndex - 1)?.let {
|
||||||
setSubtitles(it)
|
setSubtitles(it)
|
||||||
true
|
|
||||||
} ?: false
|
} ?: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -458,8 +457,10 @@ class GeneratorPlayer : FullScreenPlayer() {
|
||||||
var season: Int? = null
|
var season: Int? = null
|
||||||
var tvType: TvType? = null
|
var tvType: TvType? = null
|
||||||
|
|
||||||
|
var isFiller : Boolean? = null
|
||||||
when (val meta = currentMeta) {
|
when (val meta = currentMeta) {
|
||||||
is ResultEpisode -> {
|
is ResultEpisode -> {
|
||||||
|
isFiller = meta.isFiller
|
||||||
headerName = meta.headerName
|
headerName = meta.headerName
|
||||||
episode = meta.episode
|
episode = meta.episode
|
||||||
season = meta.season
|
season = meta.season
|
||||||
|
@ -473,6 +474,8 @@ class GeneratorPlayer : FullScreenPlayer() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
player_episode_filler_holder?.isVisible = isFiller ?: false
|
||||||
|
|
||||||
player_video_title?.text = if (headerName != null) {
|
player_video_title?.text = if (headerName != null) {
|
||||||
headerName +
|
headerName +
|
||||||
if (tvType.isEpisodeBased() && episode != null)
|
if (tvType.isEpisodeBased() && episode != null)
|
||||||
|
|
|
@ -100,6 +100,19 @@
|
||||||
android:textSize="40sp" />
|
android:textSize="40sp" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@+id/player_episode_filler_holder"
|
||||||
|
android:layout_margin="20dp"
|
||||||
|
android:layout_gravity="end"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
style="@style/SmallBlackButton"
|
||||||
|
android:text="@string/filler"
|
||||||
|
android:id="@+id/player_episode_filler" />
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/player_video_holder"
|
android:id="@+id/player_video_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -137,6 +150,7 @@
|
||||||
app:layout_constraintTop_toBottomOf="@+id/player_video_title"
|
app:layout_constraintTop_toBottomOf="@+id/player_video_title"
|
||||||
tools:text="1920x1080" />
|
tools:text="1920x1080" />
|
||||||
|
|
||||||
|
|
||||||
<!-- Removed as it has no use anymore-->
|
<!-- Removed as it has no use anymore-->
|
||||||
<!--<androidx.mediarouter.app.MediaRouteButton
|
<!--<androidx.mediarouter.app.MediaRouteButton
|
||||||
android:id="@+id/player_media_route_button"
|
android:id="@+id/player_media_route_button"
|
||||||
|
@ -175,6 +189,8 @@
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:contentDescription="@string/go_back_img_des" />
|
android:contentDescription="@string/go_back_img_des" />
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
<!--use for thinner app:trackThickness="3dp" com.google.android.material.progressindicator.CircularProgressIndicator-->
|
<!--use for thinner app:trackThickness="3dp" com.google.android.material.progressindicator.CircularProgressIndicator-->
|
||||||
|
|
Loading…
Reference in a new issue