Fullscreen popup
#1
Just something i was experimenting with.

When watching video, in full screen. Showing a "now playing" or "up next" popup, with some nice graphics.
Preferably not with kai toast on a timer/percentage, but more pretty, like how networks do this sometimes.
Maybe on percentage played. I agree this is not always desirable when watching something, but a skin setting can deal with that.

I found that i can't get things to show very easily in fullscreen, unless a user has called an overlay window.
Now i could for example load a custom overlay at all time, but i'm not sure this is the best way to go.
With video playlists and "play from here" and PVR, i think we could do some cool things with this.

Don't take this too serious, i was just trying to do some fun things.
You know, inbetween the 50 windows that are almost the same, yet are different enough to waste a day on.
Image [RELEASE] Metroid
Image [RELEASE] IrcChat
Reply
#2
Stick it in VideoFullScreen.xml.
Reply
#3
Nothing in there shows up unless i press "o". That's what i meant with a user having to call a window.
Image [RELEASE] Metroid
Image [RELEASE] IrcChat
Reply
#4
i've tried a similar thing a few months ago and ran into the same problem with VideoFullScreen.xml.

what you can do instead is put your code in DialogSeekbar.xml
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#5
Yeah, DialogSeekbar.xml works, thnx.
But i can't seem to be able to grab the title or the episode number for the next item in a video playlist.
From what i could find there is no "offset" available and "VideoPlayer.NextTitle" i found only in PVR.
Then i thought maybe current episode +1, but not sure how smart that is. And i couldn't get <visible>!SubString(Playlist.Length,Playlist.Position)</visible> to work for if it would be the last item in the playlist. And then, Google refused to try harder...

Any Ideas / detours?
Image [RELEASE] Metroid
Image [RELEASE] IrcChat
Reply
#6
(2012-11-22, 09:34)MassIV Wrote: <visible>!SubString(Playlist.Length,Playlist.Position)</visible>

Did you try !Stringcompare(Playlist.Length, Playlist.Position)?

Reply
#7
PHP Code:
!Stringcompare(Playlist.Length,$INFO[Playlist.Position]) 
Reply
#8
(2012-11-22, 09:45)Sranshaft Wrote:
(2012-11-22, 09:34)MassIV Wrote: <visible>!SubString(Playlist.Length,Playlist.Position)</visible>

Did you try !Stringcompare(Playlist.Length, Playlist.Position)?
That did it Smile

Image [RELEASE] Metroid
Image [RELEASE] IrcChat
Reply
#9
Alright, so if anyone is interested. It works, as far as i can see. Maybe some exceptions i haven't tried yet (video files / youtube playlist).
But as concept pretty cool, looks stable. Though if you guys have ideas on how to do this better, it'd be interesting to hear.

What it does atm:
-TvShow now playing popup after 11 sec.
-Movie now playing popup after 1 min 11 sec
-TvShow playlist "up next", 5 min before finish.

DialogSeekBar.xml
Code:
<include>Now_Playing_Popup</include>

Includes.xml
Code:
    <include name="Now_Playing_Popup">
                        
        <control type="image" id="7657"><!--fake control for visible change animation of popup--->
        <!--Substring for tv shows / video under 1 hour-->
            <visible>VideoPlayer.Content(episodes) + [SubString(Player.Time,00:11) | SubString(Player.Time,00:12) | SubString(Player.Time,00:13) | SubString(Player.Time,00:14) | SubString(Player.Time,00:15)]</visible>
            <posx>10</posx>
            <posy>10</posy>
            <width>1</width>
            <height>1</height>
            <texture>blank.png</texture>
        </control>
        <control type="image" id="7658"><!--fake control for visible change animation of popup--->
        <!--Substring for movies / video over 1 hour-->
            <visible>VideoPlayer.Content(movies) + [SubString(Player.Time,00:01:11) | SubString(Player.Time,00:01:12) | SubString(Player.Time,00:01:13) | SubString(Player.Time,00:01:14) | SubString(Player.Time,00:01:15)]</visible>
            <posx>10</posx>
            <posy>10</posy>
            <width>1</width>
            <height>1</height>
            <texture>blank.png</texture>
        </control>
        <control type="image" id="7659"><!--fake control for visible change animation of popup--->
        <!--Substring for playlist up next-->
            <visible>!Stringcompare(Playlist.Length,Playlist.Position) + VideoPlayer.Content(episodes) + [SubString(Player.TimeRemaining,05:05) | SubString(Player.TimeRemaining,05:06) | SubString(Player.TimeRemaining,05:07) | SubString(Player.TimeRemaining,05:08) | SubString(Player.TimeRemaining,05:09) | SubString(Player.TimeRemaining,05:10)]</visible>
            <posx>10</posx>
            <posy>10</posy>
            <width>1</width>
            <height>1</height>
            <texture>blank.png</texture>
        </control>
        
        <!--POPUP-->
        <control type="group">
            <animation effect="fade" start="0" end="100" delay="0" time="300" condition="Control.IsVisible(7657) | Control.IsVisible(7658) | Control.IsVisible(7659)">Conditional</animation>
            <animation effect="fade" start="100" end="0" delay="0" time="300" condition="!Control.IsVisible(7657) + !Control.IsVisible(7658) + !Control.IsVisible(7659)">Conditional</animation>
            <posx>100</posx>
            <posy>0</posy>
            
            <control type="label">
                <posy>40</posy>
                <width>200</width>
                <label>[UPPERCASE]XBMC[/UPPERCASE]</label>
                <font>BOLD</font>
                <textcolor>white</textcolor>
                <align>left</align>
            </control>
            
            <control type="label">
                <posy>65</posy>
                <width>200</width>
                <label>[UPPERCASE]NOW WATCHING[/UPPERCASE]</label>
                <font>DemiBOLD</font>
                <textcolor>white</textcolor>
                <align>left</align>
                <visible>Control.IsVisible(7657) | Control.IsVisible(7658)</visible>
                <animation effect="zoom" start="100" end="0" delay="1200" time="300" condition="Control.IsVisible(7657) | Control.IsVisible(7658)">Conditional</animation>
                <animation effect="fade" start="100" end="0" delay="1300" time="300" condition="Control.IsVisible(7657) | Control.IsVisible(7658)">Conditional</animation>
            </control>
            <control type="label">
                <posy>65</posy>
                <width>200</width>
                <label>[UPPERCASE]UP NEXT[/UPPERCASE]</label>
                <font>DemiBOLD</font>
                <textcolor>white</textcolor>
                <align>left</align>
                <visible>Control.IsVisible(7659)</visible>
                <animation effect="zoom" start="100" end="0" delay="1200" time="300" condition="Control.IsVisible(7659)">Conditional</animation>
                <animation effect="fade" start="100" end="0" delay="1300" time="300" condition="Control.IsVisible(7659)">Conditional</animation>
            </control>
            
            <control type="grouplist">
                <orientation>horizontal</orientation>
                <usecontrolcoords>true</usecontrolcoords>
                <posx>0</posx>
                <posy>0</posy>
                <control type="label">
                    <posy>65</posy>
                    <width min="29" max="300">auto</width>
                    <label>[UPPERCASE]$VAR[Now_Playing_Popup_Text][/UPPERCASE]</label>
                    <font>DemiBOLD</font>
                    <textcolor>white</textcolor>
                    <align>left</align>
                    <visible>Control.IsVisible(7657) | Control.IsVisible(7658)</visible>
                    <animation effect="zoom" start="0" end="100" center="auto" delay="1600" time="300" condition="Control.IsVisible(7657) | Control.IsVisible(7658)">Conditional</animation>
                    <animation effect="fade" start="0" end="100" delay="1700" time="300" condition="Control.IsVisible(7657) | Control.IsVisible(7658)">Conditional</animation>
                </control>
                <control type="label">
                <!--UP NEXT + Episode nr +1--->
                    <posy>65</posy>
                    <width min="29" max="300">auto</width>
                    <label>[UPPERCASE]$VAR[Episode_Plus_One,Episode ,][/UPPERCASE]</label>
                    <font>DemiBOLD</font>
                    <textcolor>white</textcolor>
                    <align>left</align>
                    <visible>Control.IsVisible(7659)</visible>
                    <animation effect="zoom" start="0" end="100" center="auto" delay="1600" time="300" condition="Control.IsVisible(7659)">Conditional</animation>
                    <animation effect="fade" start="0" end="100" delay="1700" time="300" condition="Control.IsVisible(7659)">Conditional</animation>
                </control>
                <control type="image">
                    <posx>0</posx>
                    <posy>20</posy>
                    <width>320</width>
                    <height>80</height>
                    <texture>$VAR[Now_Playing_Popup_Logo]</texture>
                    <aspectratio aligny="top" scalediffuse="false">keep</aspectratio>
                    <animation effect="fade" start="0" end="100" delay="1700" time="300" condition="Control.IsVisible(7657) | Control.IsVisible(7658)">Conditional</animation>
                </control>
                
            </control>
            
        </control>
    </include>

Variables.xml
Code:
    <variable name="Now_Playing_Popup_Text">
        <value condition="VideoPlayer.Content(movies)">$INFO[VideoPlayer.Title]</value>
        <value condition="VideoPlayer.Content(episodes)">$INFO[VideoPlayer.Episode,Episode ,]</value>
    </variable>
    <variable name="Now_Playing_Popup_Logo">
        <value condition="VideoPlayer.Content(movies)">$INFO[Player.Art(clearlogo)]</value>
        <value condition="VideoPlayer.Content(episodes)">$INFO[Player.Art(tvshow.clearlogo)]</value>
    </variable>
    
    <variable name="Episode_Plus_One">
        <value condition="StringCompare(VideoPlayer.Episode,0)">1</value>
        <value condition="StringCompare(VideoPlayer.Episode,1)">2</value>
        <value condition="StringCompare(VideoPlayer.Episode,2)">3</value>
        <value condition="StringCompare(VideoPlayer.Episode,3)">4</value>
        <value condition="StringCompare(VideoPlayer.Episode,4)">5</value>
        <value condition="StringCompare(VideoPlayer.Episode,5)">6</value>
        <value condition="StringCompare(VideoPlayer.Episode,6)">7</value>
        <value condition="StringCompare(VideoPlayer.Episode,7)">8</value>
        <value condition="StringCompare(VideoPlayer.Episode,8)">9</value>
        <value condition="StringCompare(VideoPlayer.Episode,9)">10</value>
        
        <value condition="StringCompare(VideoPlayer.Episode,10)">11</value>
        <value condition="StringCompare(VideoPlayer.Episode,11)">12</value>
        <value condition="StringCompare(VideoPlayer.Episode,12)">13</value>
        <value condition="StringCompare(VideoPlayer.Episode,13)">14</value>
        <value condition="StringCompare(VideoPlayer.Episode,14)">15</value>
        <value condition="StringCompare(VideoPlayer.Episode,15)">16</value>
        <value condition="StringCompare(VideoPlayer.Episode,16)">17</value>
        <value condition="StringCompare(VideoPlayer.Episode,17)">18</value>
        <value condition="StringCompare(VideoPlayer.Episode,18)">19</value>
        <value condition="StringCompare(VideoPlayer.Episode,19)">20</value>
        
        <value condition="StringCompare(VideoPlayer.Episode,20)">21</value>
        <value condition="StringCompare(VideoPlayer.Episode,21)">22</value>
        <value condition="StringCompare(VideoPlayer.Episode,22)">23</value>
        <value condition="StringCompare(VideoPlayer.Episode,23)">24</value>
        <value condition="StringCompare(VideoPlayer.Episode,24)">25</value>
        <value condition="StringCompare(VideoPlayer.Episode,25)">26</value>
        <value condition="StringCompare(VideoPlayer.Episode,26)">27</value>
        <value condition="StringCompare(VideoPlayer.Episode,27)">28</value>
        <value condition="StringCompare(VideoPlayer.Episode,28)">29</value>
        <value condition="StringCompare(VideoPlayer.Episode,29)">30</value>
    </variable>

Remember to change the fonts.
And that DialogSeekBar.xml visible conditions might need to be done a little different:
Code:
<window id="115">
    <defaultcontrol always="true">901</defaultcontrol>
    <allowoverlay>yes</allowoverlay>
    <visible>Window.IsActive(2005)</visible>
    <controls>
        
        
        
        <include>Now_Playing_Popup</include>
        
        

        <control type="group">
            <visible>![Window.IsActive(142) | Window.IsActive(10140) | Window.IsActive(2901)] + [Player.Seeking | Player.DisplayAfterSeek | Player.Paused | Player.Forwarding | Player.Rewinding]</visible>
Image [RELEASE] Metroid
Image [RELEASE] IrcChat
Reply
#10
That Episode_Plus_One variable is just silly looking. Undecided Maybe a nice dev can get us a little feature parity with the musicplayer - Player.NextTitle, Player.PreviousTitle, Player[offset].Title have particularly nice ring to them. Wink

Thanks for the code, mate.
Reply
#11
but how do you recognize if you are watching a season final and therefor the next Episode would be "season +1 | Episode 1" ?
Reply
#12
Or if you watch episode 3 from tv show 1 and then episode 10 from tv show 2. Too many cases where it's not working, VideoPlayer.Offset(...) would be really necessary for this.
Image
Reply
#13
I am aware of the short comings of the "next episode" part.
But maybe you guys had some ideas. Could the magic of scripts read this next number in the playlist?
I am not even sure you guys wanted to do more with video playlists, or if functions like "play from here" were already the furthest reach into this.
Because i believe this was added just as single feature due to user demand.
I really started with this idea for youtube music video playlists, wanting to make my own Mtv basically (that actually plays music).
Thinking i'd better start off experimenting in the normal library with a small "now playing" popup. Finding the right window, making something time-able that still works well with animations (e.g. no stutter between seconds visible) ect.
Image [RELEASE] Metroid
Image [RELEASE] IrcChat
Reply

Logout Mark Read Team Forum Stats Members Help
Fullscreen popup0