Questions tagged [cobalt]

Cobalt is a lightweight HTML5/CSS/JS application container that is designed to provide a rich application development environment with minimal resource consumption (deployment size, RAM, CPU, GPU). At the same time, Cobalt enables a rich, low-latency user experience across a wide variety of platforms and devices.

Target audiences

Cobalt's documentation is written with two audiences in mind:

Porters enable Cobalt to work on other platforms by using Starboard, Cobalt's porting layer and OS abstraction, to implement the platform-specific functionality that Cobalt uses. Each Starboard module (memory, socket, thread, etc.) defines functions that must be implemented for the porter's platform.

Developers want to build applications in familiar environments with advanced debugging tools without having to worry about compatibility with a highly fragmented set of browsers. At the same time, they want to have full control over their codebase so that they can ship features for constrained platforms, like TVs, on time and without technical risk.

Benefits of Cobalt

Cobalt significantly reduces the cost of supporting a browser on non-standard and resource-constrained platforms. In addition, since Cobalt operates at a consolidated, versioned platform abstraction layer, its porting effort is man-weeks, and subsequent rebases are near-free.

These are some other benefits that Cobalt provides:

More platforms

Cobalt does not require platforms to support JIT compilation and can run on platforms that disallow execution of dynamically generated code. Cobalt is a single-process application and does not rely on the ability to spawn multiple processes. Cobalt precompiles a set of shaders that are sufficient to express all graphical effects, thereby accommodating platforms that cannot compile shaders at runtime. Cobalt requires a compliant C++03 compiler, allowing it to reach platforms with legacy toolchains. Small footprint

Cobalt is optimized for memory. Its surface cache never exceeds a predefined budget, and it never creates duplicate layers, reducing the likelihood of out-of-memory crashes. Cobalt's small binary is designed to take up as little space as possible. By supporting a subset of HTML5/CSS/JS, Cobalt's reduced package size even allows bundling of CJK fonts on low-end devices. Reduced input latency

Cobalt produces consistent 60FPS animations by only supporting animation of properties that don't affect layout, like transform, and always running animations on a separate thread. Cobalt is optimized to run on single-core CPUs, resulting in better input latency since the renderer and resource loader do not compete with layout operations. On platforms that support GLES2, Cobalt avoids CPU painting by performing almost all rendering operations on the GPU.

References:

1.1 Overview & Source http://youtube.github.io/cobalt/overview.html

1.2 Porting http://youtube.github.io/cobalt/starboard/porting.html

1.3 Develop http://youtube.github.io/cobalt/development/setup-linux.html

1.4 Supporting Features http://youtube.github.io/cobalt/development/reference/supported-features.html

1.5 Testing http://youtube.github.io/cobalt/starboard/testing.html

1.6 Source Code https://cobalt.googlesource.com/cobalt/

1.7 h5vcc https://github.com/youtube/h5vcc

1.8 Build in linux https://cobalt.googlesource.com/cobalt/+/e9b4b99dab6e774b8b6e63add74c352cc5dd395a/src/README.md#Building-and-Running-the-Code

215 questions
0
votes
0 answers

cobalt miss HTMLMediaElement::Load() after play any title randomly?

we got a strange issue that when cobalt play any title, it do not apply HTMLMediaElement::Load(). but it is random, no rule to describe it. could someone guide us to debug it? or is possible to debug JS? we reproduce it on linux-x64x11_gold also,…
0
votes
0 answers

Cobalt crash on MIPS platform when javascript JIT is enabled

When javascript JIT is enabled on MIPS platform with 'cobalt_enable_jit': 1,, I get the following error: [ERROR:mozjs_global_environment.cc(471)] JS Error: https://www.youtube.com/s/tv/html5/55391e4a/app-prod.js:919:0: Error: Error, injector cannot…
0
votes
1 answer

NPLB crash in SbBlitterDestroySwapChain with cobalt

When run NPLB test, it will crash as follows in starboard/shared/directfb/blitter_destroy_swap_chain.cc because of the directfb surface is not created when it used openGL(not directfb) to draw the UI, so this directfb test case may need to be skiped…
bitchainer
  • 535
  • 2
  • 19
0
votes
1 answer

Do Cobalt support “qual-e”(YouTube Qualification Engine) page?

During the Youtube 2017 certification test (https://qual-e.appspot.com/) on the Cobalt(version_9.28152.) ported to my platform, I encountered the following symptoms. Qual-E test : ./cobalt --allow_http --csp_mode=disable…
joshua787
  • 11
  • 6
0
votes
1 answer

Cobalt for Amazon Prime

We are planning to use a Cobalt port on our embedded platform to run applications like Amazon Prime along with YouTube. Is it possible to use it for applications other than YouTube? If so, what is the expected run-time footprint of Cobalt? Also, is…
Nami
  • 1
0
votes
0 answers

mozjs_global_environment.cc(465)] JS Error

log is as below: JS:11125:app-prod.js(582,1): Error: Error, injector cannot find declaration for "window" while attempting to create "temp". ERROR:mozjs_global_environment.cc(465)] JS Error:…
0
votes
1 answer

Does cobalt support YouTube 360 Video(Spherical Video)

Dose cobalt support youtube 360 video(Spherical Video)? If yes, how it's been implemented, is there any document for it? Does it need the platform to do extra things to support it?
bitchainer
  • 535
  • 2
  • 19
0
votes
1 answer

Is websocket feature supported in Cobalt?

It seems cobalt has implemented websocket in src/cobalt/websocket, however the test code below can't work properly (The onopen/onmessage callbacks aren't called). var wsUri = "ws://echo.websocket.org/"; function testWebSocket() { websocket = new…
0
votes
1 answer

The memory is high when cobalt run in background

When cobalt run into background mode by suspend, it will still cost about 80M memory(about 130M memory at foreground), it used too much memory in background mode, so where does it cost so much memory in background mode, in which part does it cost?…
bitchainer
  • 535
  • 2
  • 19
0
votes
1 answer

Icons in setting menu may have unexpected vertical lines

We are running cobalt with openGL enabled, and the graphics appear to display correctly under 1920x1080 resolution. But once in a while, some icons in the "Settings" menu may have unexpected vertical lines on top (as shown in the picture). We are…
Charlie
  • 53
  • 4
0
votes
2 answers

Stop Cobalt will hang(block) indefinitely

Cobalt will hang(block) indefinitely after calling the ApplicationDirectFB::Get()->Stop() function, and can not exit, and the backtrace when hung is as follows, could anyone help to have a look? [0xb5d988f4] …
bitchainer
  • 535
  • 2
  • 19
0
votes
1 answer

Cobalt UI dispaly Blue color with egl

After enable egl in Cobalt, it can display the Youtube page, but the UI display in Blue color, could any one help to point out which caused it?
bitchainer
  • 535
  • 2
  • 19
0
votes
1 answer

Cobalt crash at start up when use system_gles2

After setting gl_type as system_gles2 to use the Mali implement of the egl, it will crash in display.cc(55) at starting up, and the error msg seemed so be EGL_BAD_NATIVE_WINDOW, from the guideline in cobalt guideline, there need to set gl_typeto…
bitchainer
  • 535
  • 2
  • 19
0
votes
1 answer

could cobalt playback 4k content?

we built cobalt( fd76734 - Import Cobalt 8.21796) by "linux-x64x11" successfully and we can playback Youtube content fine. then we try to playback 4K content, it can work fine also. next, we enable "env_isVideoInfoVisible=1", cobalt will show video…
0
votes
1 answer

could cobalt load qual-e page "http://2016.qual-e.appspot.com/"?

We checkout latest cobalt source code, version "Import Cobalt 8.21796", and it built successfully. cobalt can load Youtube TV page "www.youtube.com/tv?launch=menu" and works fine. Currently, we want to load "http://qual-e.appspot.com/?enableLogs=1"…