Create USB apps? Release notes? Updates?

Firstly, you would have to set “navigation_type”:“1” in order to get spatial navigation, e.g. with a mouse.

Secondly, for an external web site, your content would have to be very simple, maybe a wrapper written in HTML5 for a snapshot or slideshow. You can’t just point to a website that uses flash and SWF files and expect it to work, as I found out with my earlier SBS Ondemand attempt. (which caused the WDTV to reboot)

According the the SDK documents the WDTV uses the QT Webkit browser for html and javascript, and the browser accepts html5 tags. Your best option would be to build a local web page on the USB that is a wrapper to the particular video files that you want to view using HTML5.

I couldn’t find the code for a lot of the apps, e.g. ABC iView or BBC player, in the GPL source, so they are obviously proprietary, built and compiled specially for the SigmaDesigns SMP8670 SOC media processor. At least you can download the toolchain from WD if you want to compile your own app.

Here is my local webcam site on the USB which works OK. manifest.json

{
"id":"E10002",
"type":"browser",
"title":"Bird Cam local",
"version":"1.00.00",
"author":"Paul",
"author_information":"",
"publish_date":"2014/08/13",
"description":[{
"LanguageCode":"en","Description":"Bird Cam 192.168.0.99 test app"
}],
"changelog":"",
"launch":"htdocs/index.html",
"launch_args":"",
"daemon":"",
"daemon_args":"",
"requirements":{"network":"1","cookie":"1","navigation_type":"1"
,"cehtml_key":"1","backdoor":"1","redirect_times":""},
"app_option_image":"",
"app_icon_image":"",
"region_limitation":[""],
"app_category":["",""],
"user_agent":"",
}

 The index.html that it refers to is pretty basic…

<html>
<head>
<meta http-equiv="Content-Type" content="text/html">
<title>Bird Feeders</title>
</head>
<body bgcolor="#4D6B7F">
<h1 align="center">Bird Feeders, front yard</h1>
<table border="0" cellpadding="10" cellspacing="0" width="100%">
<tr>
<td bgcolor="#4D6B7F" align="center" valign="middle">
<script language="JavaScript" type="text/javascript">
function reload() {setTimeout('reloadImg("refresh")',1000)};
function reloadImg(id)
{
var obj = document.getElementById(id);
var rand = Math.random();
obj.src="http://192.168.0.99:8081/snapshot.cgi?user=test&pwd=test&next_url=birds.jpg&t="+rand;
}
</script>
<img src="http://192.168.0.99:8081/snapshot.cgi?user=test&pwd=test&next_url=birds.jpg&t=" name="refresh" id="refresh" onload='reload()'></td>
</tr>
<tr>
	<iframe name="control1" border=0 width=0 height=0></iframe>
	<iframe name="control2" border=0 width=0 height=0></iframe>
	<iframe name="control3" border=0 width=0 height=0></iframe>
	<iframe name="control4" border=0 width=0 height=0></iframe>
	<iframe name="control5" border=0 width=0 height=0></iframe>
	<iframe name="control6" border=0 width=0 height=0></iframe>
	<iframe name="control7" border=0 width=0 height=0></iframe>
	<iframe name="control8" border=0 width=0 height=0></iframe>
<td colspan="4" align="center">
<a href="http://192.168.0.99:8081/decoder_control.cgi?command=31&user=test&pwd=test" TARGET="control1">Bird Feeders</a>|<a href="http://192.168.0.99:8081/decoder_control.cgi?command=33&user=test&pwd=test" TARGET="control2">Driveway</a>|
<a href="http://192.168.0.99:8081/decoder_control.cgi?command=35&user=test&pwd=test" TARGET="control3">Garden</a>|
<a href="http://192.168.0.99:8081/decoder_control.cgi?command=37&user=test&pwd=test" TARGET="control4">Left</a>
<a href="http://192.168.0.99:8081/decoder_control.cgi?command=39&user=test&pwd=test" TARGET="control5">Centre</a>|<a href="http://192.168.0.99:8081/decoder_control.cgi?command=41&user=test&pwd=test" TARGET="control6">Right</a>|
<a href="http://192.168.0.99:8081/decoder_control.cgi?command=43&user=test&pwd=test" TARGET="control7">Steps</a>|
<a href="http://192.168.0.99:8081/decoder_control.cgi?command=45&user=test&pwd=test" TARGET="control8">Porch</a>
</td>
</tr> </table>
</body>
</html>

 Of course I also have to used the SDK of the web cam…

Anyway, hope this helps. There is a lot of stuff out there, various forums, etc. which may be useful.

1 Like

I was also able to create a local web page on the USB with the content from 

https://developers.google.com/youtube/iframe_api_reference

and it played perfectly.

can you include 2 lauch in manifest.json?

can some post working example os USB apps?

please share?

Just to clarify for people…These are not actually applications in the typical sense. WD uses a web browser to display an html5 page. The manifest file is basically just a hyperlink to a webpage. That is what is meant by “App”. These are not native programs and are not SWF files.

For those who want examples, you are looking too hard. SDK_WDTVMediaPlayer_AppsOnUSB.pdf (in the SDK download) has everything you need (once you fix the typos listed in prev. posts).

To run usb apps, go to the ‘All Apps’ tab under Services on your WDTV and click ‘Apps on USB’.

Just wanted to add a couple bits I found while looking at local storage. 

To run any of the functions listed in the API Summary document I had to prefix with deviceInfo

<script>
function foo() {
    	deviceInfo.configWrite( "thisisthekey", "thisisthevalue");
	var value = deviceInfo.configRead("thisisthekey");

}
</script>

 These key/value pairs are then stored in the file: 

/usrdata/app/3rdparty/apps/common/config

Using html5 localStorage also works and saves key/value pairs in the file:

/tmp/qt-data/data/Qt/WDSimpleBrowser/http_www.websitename.com_0.localstorage

Unfortunately neither store the data on the USB drive itself, so space is limited.

1 Like

So, are you saying there is no way to play videos from the “apps” and no API to control playback?

So, as i understand we can have something like html5 apps like games?

I was trying put web page in launch option with flash player with rtsp sources - won’t play video on that page.

We should be able to load  any file off USB including videos for playback.  I was previously just looking at saving files. As far as an API for playback you will need to use HTML5 and javascript I assume.  I don’t think Flash is going to work.

I was looking at the AOL HD app, as an example, and they have streaming video playback. I’m sure you could make it use local files with a bit of work.

Anton wrote:

So, as i understand we can have something like html5 apps like games?

I was trying put web page in launch option with flash player with rtsp sources - won’t play video on that page.

I don’t mean to be off topic, but if you need rtsp streams you might want to look here

http://forum.wdlxtv.com/viewtopic.php?f=23&t=8707  custom firmware

and more specifically look into UMSP

http://wiki.wdlxtv.com/UMSP_plugin_development

http://rkpisanu.altervista.org/doku.php?id=wdtv:wdtv_umsp_crash_course_v2

plugins are written in php

and if you need examples, there’s lots

https://svn.wdlxtv.com/listing.php?repname=UMSP&path=%2Fplugins%2F&#a521bc28705aa16ab81bd4936c90be4a4

1 Like

Loud2004 wrote:

We should be able to load  any file off USB including videos for playback.  I was previously just looking at saving files. As far as an API for playback you will need to use HTML5 and javascript I assume.  I don’t think Flash is going to work.

 

I was looking at the AOL HD app, as an example, and they have streaming video playback. I’m sure you could make it use local files with a bit of work.

 

So, it seems there should be a javascript API with functions to load a file and play, stop, seek, etc.,  I don’t see any mention of these functions in the SDK docs and that’s why I started another thread about the code sample that is mentioned but can’t be found anywhere in the SDK download.

Does the AOL HD app demonstrate this and where can it be found?  Thanks.

Is there a way to show up a side bar to scroll down web pages in spatial navigation of QT/Webkit browser ?

Something to add to the manifest.json ?

Thanks for help

BTW for anyone having issues getting their apps recognized, I just tried and realized that while you can use NTFS drives for videos, you cannot use them for Apps on USB.

gottahavit wrote:

BTW for anyone having issues getting their apps recognized, I just tried and realized that while you can use NTFS drives for videos, you cannot use them for Apps on USB.

if anybody wants to know this is caused by the default fmask used to mount the ntfs format drives

to prevents any files for have executable permissions

if you manually remount the drive from command line with different fmask then x permissions are allowed

gottahavit wrote:

BTW for anyone having issues getting their apps recognized, I just tried and realized that while you can use NTFS drives for videos, you cannot use them for Apps on USB.

My apps, or to better call them, “web links”, are stored on NTFS drive (USB connected) with videos, MP3 and photos and work fine.

My only draw back is that i cannot scroll down web pages because the lack of a side bar in the mini browser :cry:

Guess it depends on the drive.

anyone get mkv video playback to work.  I can playback mp4, but can’t get mp4 to play.  I have tried several Mimetype in the video tag with now luck.

gottahavit wrote:

Guess it depends on the drive.

 

anyone get mkv video playback to work.  I can playback mp4, but can’t get mp4 to play.  I have tried several Mimetype in the video tag with now luck.

Just tested all my mkv and mp4 (~ 20) and they works fine with the new firmware. It maybe you have to try with another hd or usb pen. Check before your videos on pc to avoid corrupted files :wink: Did you get a side bar to scroll down web pages on apps? This stupid thing seems a big secret here.

can you give me a sample Video tag to use in html 5 for the mkv files you have working?  My mkv’s play fine in the stock app, I’m talking about my own html 5 app on USB.

Thanks

gottahavit wrote:

can you give me a sample Video tag to use in html 5 for the mkv files you have working?  My mkv’s play fine in the stock app, I’m talking about my own html 5 app on USB.

 

Thanks

Sorry for misunderstanding. My bad English didn’t help.

I run apps only to browse web pages. Never tryed to play my own mkv or mp4 via an app.

Where is the usefulness of this way to play videos stored on hd?

I want to write an app with better playlist support as well as other features the stock player doesn’t support.

Hmm… “new SDK”? WDBetaTools.exe etc.

And what to do with this stuff? )
Looks like WD more interesting to collect all info about developers (via WDBetaTools) and not interesting more plugins…