I am able to access media in the ~/content/Video folder from the app using
a url of file:///home/app/content/Video/...mp4 but when I use the content
API to get directories I get none. I'm using the sample code and this has
worked for me. I find I have to create the content folder and Videos
folder then add videos.
*var TheConentManager = tizen.content;*
*function onContentItemArraySuccess(contents){ for (var i=0; i <
contents.length; i++) { console.log(i + ":" + contents[i].type + ":"
+ contents[i].title + ":" + contents[i].mimeType);
console.log("content:",contents[i]); var src =
document.createElement("source")
src.setAttribute("src",contents[i].contentURI);
src.setAttribute("type",content[i].mimeType); var vid =
document.createElement("video"); vid.appendChild(src);
vid.setAttribute("width",contents[i].width.toString());
vid.setAttribute("height",contents[i].height.toString()); vid.autoplay
= true; vid.controls = true; vid.load(); var text =
document.createTextNode(contents[i].title); var listelement =
document.createElement("li"); listelement.appendChild(vid);
listelement.appendChild(text);
document.querySelector("#itemlist").appendChild(listelement); }}*
*function onDirectoryArraySuccess(directories)*
*{*
* console.log("onDirectoryArraySucces Count="+directories.length);*
* for (var i = 0; i < directories.length; i++)*
* {*
* /* Retrieve folder-specific information */*
* console.log("DIR:",directories[i]);*
* }*
*}*
*var contentType = "VIDEO";*
*var filter = new tizen.AttributeFilter("type", "EXACTLY", contentType);*
*TheConentManager.find(onContentItemArraySuccess, onError, null, filter);*
*TheConentManager.getDirectories(onDirectoryArraySuccess, onError);*
--
*Art McGee*
Infotainment Engineer
Jaguar Land Rover North America, LLC
1419 NW 14th Ave, Portland, Oregon, 97209
JaguarUSA.com <http://www.jaguarusa.com/index.html> | LandRoverUSA.com
<http://www.landrover.com/us/en/lr/>
_______________________________________________
Dev mailing list
[email protected]
https://lists.tizen.org/listinfo/dev