Use cobalt to run url other than youtube.com/tv

378 views
Skip to first unread message

kanetka...@gmail.com

unread,
Jan 18, 2019, 6:04:50 PM1/18/19
to cobalt-dev
Hello,

I am trying to look for documentation to use a url other than default.

Lam Bui

unread,
Jan 18, 2019, 8:55:57 PM1/18/19
to cobalt-dev
Hi shruti kanetkar,
Yes, this is possible. You can do this with the "--url" command-line parameter specified here:

--url                                                                                                                                                                                 
  Setting this switch defines the startup URL that Cobalt will use.  If no value is set, a default URL will be used.

So you can do:

./cobalt --url=<YOUR_URL>

To learn more about what command-line options are available for Cobalt, you can use "--help":

./cobalt --help

Hope that helps!

shruti kanetkar

unread,
Jan 18, 2019, 9:14:13 PM1/18/19
to Lam Bui, cobalt-dev
I am trying to look for documentation to do it from code. Just changing default url in application.cc does not help. Can you please point me to some sample code?

You received this message because you are subscribed to a topic in the Google Groups "cobalt-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cobalt-dev/e_gu6qwS_-4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cobalt-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Regards,
Shruti

Lam Bui

unread,
Jan 18, 2019, 9:41:54 PM1/18/19
to cobalt-dev
Ah, sorry for the misunderstanding here. If you'd like to do this in the code, you can change the default value for 'kDefaultURL' at the following code location:


After you rebuild, Cobalt will default to whatever URL you specify here.

Let us know if you have further questions.

Thanks!

shruti kanetkar

unread,
Jan 18, 2019, 9:51:48 PM1/18/19
to Lam Bui, cobalt-dev
I had tried that. None of the keyboard callbacks work in that case. Is that the only change I need to make?

You received this message because you are subscribed to the Google Groups "cobalt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cobalt-dev+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
Regards,
Shruti

Lam Bui

unread,
Jan 18, 2019, 10:03:06 PM1/18/19
to cobalt-dev
Got it. Can you tell me what platform you are working with here?

shruti kanetkar

unread,
Jan 18, 2019, 10:28:38 PM1/18/19
to Lam Bui, cobalt-dev
I am working on raspberry pi.

On Fri, Jan 18, 2019 at 7:03 PM 'Lam Bui' via cobalt-dev <cobal...@googlegroups.com> wrote:
Got it. Can you tell me what platform you are working with here?

You received this message because you are subscribed to a topic in the Google Groups "cobalt-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cobalt-dev/e_gu6qwS_-4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cobalt-dev+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
Regards,
Shruti

Tom Bridgwater

unread,
Jan 21, 2019, 12:51:17 AM1/21/19
to shruti kanetkar, Lam Bui, cobalt-dev
I'd like to correct Lam's suggestion - We don't recommend modifying Cobalt internals such as the constant in browser/application.cc as he mentioned.

Instead, your main() function can synthesize command-line args as appropriate to your application (i.e. either copy and modify the argv passed in, or completely ignore it and pass only synthetic args) and pass what you need to the Application.Run() method. Note that there are four overloaded versions of Run(), so you may choose to instantiate your own CommandLine object and use its AppendArg() function to add a synthetic "--url" argument.

/TomB

You received this message because you are subscribed to the Google Groups "cobalt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cobalt-dev+...@googlegroups.com.

Tom Bridgwater

unread,
Jan 24, 2019, 9:08:42 PM1/24/19
to shruti kanetkar, Lam Bui, cobalt-dev

On Thu, Jan 24, 2019 at 5:20 PM shruti kanetkar <kanetka...@gmail.com> wrote:
I tried this approach. But it still does not accept keyboard inputs for url that is not youtube.com/tv. I am using raspberry pi 3 and trying to run netflix.
--
Regards,
Shruti

shruti kanetkar

unread,
Jan 24, 2019, 9:25:09 PM1/24/19
to Tom Bridgwater, Lam Bui, cobalt-dev
Hello Tom,

The original problem was I was unable to take input events from different url.
For running netflix or some other website, I would need to know their website's mapping if I am going by javascript approach.
If I dont have website's mapping, then how do I make changes in source code to load different urls and also take key events?
 
--
Regards,
Shruti
Reply all
Reply to author
Forward
0 new messages