×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jun 2009
    Posts
    7

    Question Embedding Camera feed into application ?

    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:

    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());
        }
    }
    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 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;
    }
    So, is it that Camera Feed is not a StreamingURL. If so, would anyone have some suggestions and corrections ?

    Thanks

  2. #2
    Registered User
    Join Date
    Jan 2009
    Posts
    1

    Re: Embedding Camera feed into application ?

    Did you find any solution?

  3. #3
    Registered User
    Join Date
    Jun 2009
    Posts
    7

    Re: Embedding Camera feed into application ?

    No solution :/ How about you ?

Similar Threads

  1. iPhone Blogger Blog Creation Application
    By semaphore10 in forum News and Announcements
    Replies: 4
    Last Post: 2009-10-06, 08:49
  2. Disable Autostart of the Camera Application ?!?!
    By planet_benny in forum Symbian Media (Closed)
    Replies: 3
    Last Post: 2009-06-04, 15:18
  3. automate camera application and mms with voice command
    By diam0ndtears in forum Mobile Java Networking & Messaging & Security
    Replies: 2
    Last Post: 2009-06-02, 03:41
  4. Replies: 1
    Last Post: 2008-05-08, 12:32
  5. Avoid system camera application interrupt
    By mopa in forum Symbian Media (Closed)
    Replies: 4
    Last Post: 2007-09-04, 09:42

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×