Sign up here and you can log into the forum!

*Updated 4/27/12* Plugin: VideoScreensaver

The WDTVExt plugin depot. Plugins/libraries/code only

Re: *Updated 4/24/12* Plugin: VideoScreensaver   

Postby KAD » Wed Apr 25, 2012 8:22 am

mad_ady wrote:Sorry, I forgot this was for the wdtvext version. :)

I suspect the way to prevent the video from starting on paused content is by modifying the script, right?


yep,

the quick way is to edit 2 files VideoScreensaver.plugin.js & VideoLoop (found in /bin)

find this in the .js
Code: Select all
if (this.State === "PAUSED_PLAYBACK" ) {

delete these 4 lines directly below it
Code: Select all
res = executeCmd("upnp-cmd Stop", this.debug.Lib);
res = executeCmd("upnp-cmd Stop", this.debug.Lib);
res = executeCmd("play \"" + MyScreensaver + "\"", 3);
res = executeCmd("upnp-cmd SetPlayMode REPEAT_ONE", this.debug.Lib);


you'll also need to make similar edits to VideoLoop

find
Code: Select all
if [[ "$STATE" != "PLAYING" && "$STATE" == "PAUSED_PLAYBACK" ]] ; then
      upnp-cmd Stop
      upnp-cmd Stop
      play $VIDEO
      config_tool -c CONTINOUS_PLAY=true
elif [[ "$STATE" != "PLAYING" && "$STATE" != "PAUSED_PLAYBACK" ]] ; then


delete the first 5 lines above
change line 6 from elif to if

btw, if anybody needs to see loggin from VideoLoop it's found at /tmp/VideoLoop.log

and a question for all of you. I thought about this VideoLoop script I did
with some edits it could be provided as a standalone script for sequencing or randomizing playback of any file type

but the only other use case I can think of is music playback, WD does not correctly randomize music playback,

KAD
If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
User avatar
KAD
Global Moderator
 
Posts: 4015
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA

Re: *Updated 4/24/12* Plugin: VideoScreensaver   

Postby mad_ady » Wed Apr 25, 2012 9:23 am

It's better than just music.
Somebody was asking a few weeks ago about the possibility of playing mixed content in a playlist - e.g. music, folowed by a video, followed by some image(s).

Your approach could do it. Coupled with a simple WEC for loading m3u files, it should be a great standalone solution.

P.S. I'm still using slimvideoscreensaver and I made the changes there.
User avatar
mad_ady
Developer
 
Posts: 3002
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: *Updated 4/24/12* Plugin: VideoScreensaver   

Postby KAD » Wed Apr 25, 2012 9:58 am

ok, I'll work on a stand alone version

my current thoughts on a stand alone version
I still haven't worked out image sequencing, .jpg .png etc, - device state stays in "PLAYING"
so the current version pulls the first image only because Loop criteria for starting next image is never met
settings can be WEC configurable
start could be done from WEC or with wdtvext (I'm thinking the next version of wdtvext, we can place start up option in the options menu on screen)
there's 2 ways to stop the loop, both require sending system cmds 1. killall VideoLoop 2. config_tool -c CONTINOUS_PLAY=false
also I have little to no experience working with m3u, but would guess we just need to read then parse the file contents to build the array

KAD
If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
User avatar
KAD
Global Moderator
 
Posts: 4015
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA

Re: *Updated 4/24/12* Plugin: VideoScreensaver   

Postby mad_ady » Wed Apr 25, 2012 10:28 am

Yup, m3u is a simple text file holding the path to the media you want to play:
http://en.wikipedia.org/wiki/M3U

I did a simple m3u parser as part of the cantio UMSP plugin if you're looking for inspiration :)

Regarding looping images - I suspect it will be more tricky. There must be a conf variable that says what is the image slideshow interval. You could display an image and irinject a BACK event when that timer expires. This would mean your script can move to the next item because the medialogic_pic will exit.
User avatar
mad_ady
Developer
 
Posts: 3002
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: *Updated 4/24/12* Plugin: VideoScreensaver   

Postby KAD » Sat Apr 28, 2012 12:24 am

version 1.3 is available
If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
User avatar
KAD
Global Moderator
 
Posts: 4015
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA

Previous

Return to WDTVExt plugins

Who is online

Users browsing this forum: No registered users and 1 guest