Hi,
I am trying to embed the camera feed on my N97 into an WRT application. i have followed the "Chained Mode" method described in the Web Library. However the effect is not the desired one. I was hoping that the camera feed would be really embedded as one would expect with the <EMBED> of html. In fact, the camera opens as if one would have launched it separately from the Widget.
Here is the code i am using:
I have also installed the plaformservices 2.0 but cannot manage to get the right effect. Next thing i tried was to try to access the URL of the camera feed as a StreamingURL using the MMS API and tried to embed that using the <EMBED> tag but here again no success. Here is that code which i have been using to get he URL. This code works fine with other media types (e.g. below "Video") but not, StreamingURL:Code:function startCamera() { try { var serviceObject = device.getServiceObject("Service.AppManager", "IAppManager"); var criteria = new Object(); criteria.ApplicationID = "s60uid://0x101f857a"; criteria.Option = new Object(); criteria.Option.Mode = "Chained"; serviceObject.IAppManager.LaunchApp(criteria); } catch (error) { alert(error.toString()); } }
So, is it that Camera Feed is not a StreamingURL. If so, would anyone have some suggestions and corrections ?Code:function getListOfStreamingMedia() { print("Getting List of Streaming Media ...<br>"); try { var serviceObject = device.getServiceObject("Service.MediaManagement", "IDataSource"); var criteria = new Object(); criteria.Type = "FileInfo"; criteria.Filter = new Object(); criteria.Filter.FileType = "Video"; var result = serviceObject.IDataSource.GetList(criteria, printResult); } catch(error) { print(error); } } function printResult(transId, eventCode, result) { var resultAsAString = generateReturnedValuesAsString(result.ReturnValue); print(resultAsAString); } function generateReturnedValuesAsString(listOfValues) { var value; var str = ""; try { listOfValues.reset(); while ((value = listOfValues.getNext()) != undefined) { str += convertValueToString(value); str += "<hr>"; } } catch(error) { alert("generateReturnedValuesAsString: " + error); } return str; } function convertValueToString(value) { var str = ""; try { if (typeof value != "object") { return "" + value; } else { for(var key in value) { str += key + " - "; str += convertValueToString(value[key]); str += "<br>"; } } } catch (error) { alert("convertValueToString: " + error); } return str; }
Thanks

Reply With Quote


