Having a video preview play whilst moving to a new item is not, technically, possible. In theory, however, there may be a, albeit less than desirable and definitely to a non-panel type of view, solution.
The main problem that xbmc has with playing videos (continuously) is that xbmc loads libraries (which take ram) from the start; therefore, you will ALWAYS experience lag; this is specially true with xmv and mpeg4 (mostly dependent of the bitrate, but the lag remains irregardless).
Yeah, yeah, yeah... you're probably thinking, well some emulators such as "x, y, z" don't have an issue with xmv... well ( i encourage you to use those emulators if they do such a great job) they use a different codec that xbmc cannot use because of it's legality in terms of source code and licensing, which by the way,
isn't up for discussion, and they also do not load libraries for many other codecs required to play lots of other videos;
REMEMBER, xbmc was build a media player, first and foremost, the original devs did not really care about gaming since the xbox was doing that well enough.
Having said that... in any particular view, that does not use a panel type of container, you could set hidden button with a unique id (where foo=id#), and on the
onright or
onleft you can then set something like the following:
Code: Select all
<control type="button" id="99"> <!-- dummy (used to accept container focus)-->
<posy>280</posy>
<posx>200</posx>
<width>160</width>
<height>160</height>
<texturefocus>-</texturefocus>
<texturenofocus>-</texturenofocus>
<label>-</label>
<onright>Control.Move(foo,1)</onright>
<onright>PlayMedia($INFO[ListItem.Path,,preview.xmv])</onright>
<onleft>Control.Move(foo,-1)</onleft>
<onclick>SendClick(foo)</onclick>
<visible allowhiddenfocus="true">false</visible>
</control>
if you have have more than one view, then you would have to supply a conditional statement:
Code: Select all
<control type="button" id="99"> <!-- dummy (used to accept container focus)-->
<posy>280</posy>
<posx>200</posx>
<width>160</width>
<height>160</height>
<texturefocus>-</texturefocus>
<texturenofocus>-</texturenofocus>
<label>-</label>
<onright condition="Control.IsVisible(foo)">Control.Move(foo,1)</onright>
<onright condition="Control.IsVisible(foo2)">Control.Move(foo2,1)</onright>
<onright condition="Control.IsVisible(foo3)">Control.Move(foo3,1)</onright>
<onright>PlayMedia($INFO[ListItem.Path,,preview.xmv])</onright>
<onleft condition="Control.IsVisible(foo)">Control.Move(foo,-1)</onleft>
<onleft condition="Control.IsVisible(foo2)">Control.Move(foo2,-1)</onleft>
<onleft condition="Control.IsVisible(foo3)">Control.Move(foo3,-1)</onleft>
<onleft >PlayMedia($INFO[ListItem.Path,,preview.xmv])</onleft >
<onclick condition="Control.IsVisible(foo)">SendClick(foo)</onclick>
<onclick condition="Control.IsVisible(foo2)">SendClick(foo2)</onclick>
<onclick condition="Control.IsVisible(foo3)">SendClick(foo3)</onclick>
<visible allowhiddenfocus="true">false</visible>
</control>
Now that the above has been accomplished... in the
MyPrograms.xml, you would set the following:
Code: Select all
<window id="1">
<defaultcontrol always="true">99</defaultcontrol>
Now, moving on... some possible requirements and issues:
- a) the files that you wish you play MUST always be name the same (ie, preview.*, trailer.*, foo.*)
- b) the video must also be of the same type for all previews (ie, *.xmv, *.avi, *.mp4, etc.)
- c) if choosing to use *.xmv, you must enable full codec, which will take up more ram (at least last time i checked)
anyway, i have tested only half of the code above, since i have no desire on implementing this, i have not tested further... however, feel free to try it out and see what happens; these are just my two cents; take it or leave it