stari4ek / tvirl

Public resources for TVirl: IPTV for Android TV
29 stars 2 forks source link

Splash (loading) screen during channel tuning #37

Open lars18th opened 3 years ago

lars18th commented 3 years ago

Hi @stari4ek ,

I started to use TVIrl recently. I like this App, and I want to contribute with some suggestion.

The first one is related to the UI. And yes, I know it... you say you can't change it here https://github.com/stari4ek/tvirl/wiki/FAQ#q-please-change-element-x-epg-channel-info-top-bar--in-the-interface. But this is not entirely true! And for this reason I post here this issue.

To understand the suggestion, please install the PlutoTV App, and configure it to use with the "Live Channels" App. The enhancement is related to the channel change. When changing to a new channel, the PlutoTV is configured (or it display an image until the video stream arrives) a full length image with a poster of the channel, plus a big banner in the button with the name of the channel with a transparent overlay. Please, before comment anything more, try this 3rd-party TV Input for the Live Channels. The App supports it, as others are using it. And this contribute to a more pleasant channel transition when delays are between 200-1000 miliseconds (or more).

So, my suggestion is to support such type of transitions. To implement them you need first to get the background/poster/image of the channel. And my idea is to incorporate the #EXTINF tag called tvg-logo-small. If you search for it, some programs support this "new" tag. The idea is that the regular tvg-logo will contains the big image (in 16:9 with a FHD resolution ideally) and the tvg-logo-small the "regular" logo. So if you want to support this idea, it will be necessary in the configuration of the source to "interchange" the use of the tags: the logo-small will be the "regular" icon and the logo be the background. In fact, this will not change anything or disturbs, as without this option enabled the logo-small is not used. Then nothing changes if you don't update your source list.

What you think about this idea?

stari4ek commented 3 years ago

Hi,

Thank you for the reporting it.

Yes, TIF (TV Input Framework) has the only point of extending TV App's UI which is overlay, displayed on top of video. Which, btw, was broken quite a while (Android 9, https://issuetracker.google.com/issues/139429602) - so there were no any reasons to implement any stuff on top of it since it just did not work (overlay was displayed under a video).

Talking about your specific proposal and example, there is exact todo issue in the backlog to provide specialized "loading" screen with channel/program info. It just has lower priority comparing to some other fundamental things TVirl has to get first.

The first one is related to the UI. And yes, I know it... you say you can't change it here https://github.com/stari4ek/tvirl/wiki/FAQ#q-please-change-element-x-epg-channel-info-top-bar--in-the-interface. But this is not entirely true! And for this reason I post here this issue.

Once again, whole UI is provided by the system TV app (Google's Live Channels, or OEM's variants), and system/TIF does not provide any input back (buttons on remote and so on) - so there is no way to change current behavior or add any new UI with user's interaction. But the only thing possible is overlay, which currently is used for Debug View and subtitles and can be used to display some other context information as you proposed

lars18th commented 3 years ago

Hi @stari4ek ,

Glad to hear that you plan to add this in a future enhancement. It is just a suggestion for a low priority functionality. :+1:

I'll provide then other suggestions in different issues. Regards.

lars18th commented 3 years ago

Hi @stari4ek ,

Regarding this request, I feel you need to use these two vars to set the background image and the text:

Plese, see: https://developer.android.com/reference/android/media/tv/TvContract.Channels.html#COLUMN_APP_LINK_POSTER_ART_URI

Regards.

stari4ek commented 3 years ago

This one is for "App's link" feature: https://developer.android.com/training/tv/tif/channel#applink

lars18th commented 3 years ago

Hi @stari4ek ,

Right. Sorry!

As I see (reading the documentation) the trick can be done hooking the channel change and writing over the black surface while the video is off: https://developer.android.com/training/tv/tif/ui#unavailable

stari4ek commented 3 years ago

there is overlay over video surface which can be used to present some information. But video availability states flow should be altered, otherwise TV App hides surface and overlay.

lars18th commented 3 years ago

OK. But I'm sure you can receive the state change when the video starts to play, right?

lars18th commented 3 years ago

Hi @stari4ek ,

I want to comment that some tools use the tag "url-scrlogo" as the identifier of the splash logo. And even someone used it for a groups logo, it can be used for channels too. So, as example:

#EXTINF:0 tvg-id="493" tvg-logo="http://best-logo.net/images/euronews.png" url-scrlogo="http://best-logo.net/splash_1920/euronews.png" group-title="NEWS",Euronews
udp://@235.1.1.2:5678

I hope you want to implement it. Regards.

stari4ek commented 3 years ago

The only reference to url-scrlogo I found in IP-TV player docs (RU), which describes it as playlist-wide (comes with #EXTM3U header tag) and recommends 200-300px size.

lars18th commented 3 years ago

Hi @stari4ek ,

I feel some other clients use the same M3U tag too. However, you can implement it as you prefer. The idea is to provide the source of the image to show at full screen when changing to a new program... like the PlutoTV does.

Regards.