Video Auto-Play

159 views
Skip to first unread message

Jürgen Sandersfeld

unread,
Jan 21, 2015, 7:22:42 AM1/21/15
to tas...@googlegroups.com
Hi everybody.

I would like to install an android-tablet in a media-container. And when the door is opened it should automatically play a video. When the door will be closed it should stop playing and when the door is open again it should start playing the video from the beginning again and again and again...
Is this possible with tasker?
Thanks for Your help.

Mad Mooney

unread,
Jan 21, 2015, 7:48:33 PM1/21/15
to tas...@googlegroups.com
Oh this was fun trying :-)
I Imagined a tablet installed in some box, where the closed door is pretty near the Proximity Sensor.
Since my tablet has one, I tried.
Task VidStart: A1) File / Open File / somePathToSomeFile. Kim Dotcom's Mr. President was just fine for testing.
First time it triggered, I set MX Player Pro as default for Android. This one has a setting, that basically says "On a previously opened and interupted video, start from the beginning, and don't ask again".
Task VidStop: A1) App / Kill App / MX Player Pro, Use ROOT
trying without root didn't work.

Profile: State, Proximity Sensor
In: VidStop
Out: VidStart

oh my... nearly 2am
self.sleep(now)....

Jürgen Sandersfeld

unread,
Jan 22, 2015, 7:41:46 AM1/22/15
to tas...@googlegroups.com
Hi Mad Mooney,

thank You very very much fo Your help. As far as I understood it is only working if I have a root access. So it is not the best solution for a public media-container in an exhibition.
The idea was, that when visitors open the door of the container the video automatically starts.

Best Regards. Juergen

Mad Mooney

unread,
Jan 22, 2015, 8:34:01 AM1/22/15
to tas...@googlegroups.com
Starting the video isn't the problem, stopping is - killing the videoplayer needs root.
I haven't found a different way to tell the videoplayer to go away when the door closes and the sensor triggers. Might start a different app, hoping that the videoplayer realizes that it's not visible anymore, and stops the video. I guess it'll go into pause mode, though, which wouldn't help.
Root or no root, what physical methods do you plan to use to protect the tablet from people trying to tamper with it? Root access can be passcode protected, using the proper SU app :-)

Jürgen Sandersfeld

unread,
Jan 23, 2015, 2:30:06 AM1/23/15
to tas...@googlegroups.com
One idea is to install the pad directly behind a glas panel to protect it.
Would this cause a problem for the Proximity Sensor to start the video?

Mad Mooney

unread,
Jan 23, 2015, 6:29:23 AM1/23/15
to tas...@googlegroups.com
Depends on the sensor. You might have to drill a hole for it. I'd try 3mm of Acrylic, and check if the sensor registers it or works through it.

Richard Blackmore

unread,
Jan 24, 2015, 3:41:43 AM1/24/15
to tas...@googlegroups.com
Maybe a bit of a long winded way but you could use the webview to play a html5 video in a scene then distroy the scene on close.

Make sure you enable the 3D acceleration in the developer options tho or html5 video won't work in the webview.

Reply all
Reply to author
Forward
0 new messages