caph: tizen tv web ui framework

23
CAPH : Tizen TV Web UI Framework Yang Yang Samsung Electronics

Upload: trinhquynh

Post on 02-Jan-2017

343 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: CAPH: Tizen TV Web UI Framework

CAPH : Tizen TV

Web UI Framework Yang Yang

Samsung Electronics

Page 2: CAPH: Tizen TV Web UI Framework

2

Agenda

Overview Key Navigation

Scrollable Grid & List

Demo

Page 3: CAPH: Tizen TV Web UI Framework

3

What is CAPH ?

CAPH: a Web UI Framework Easy and quick development of web apps for Samsung Tizen TV

Custom made for TV

High performance

Rich UI components

Page 4: CAPH: Tizen TV Web UI Framework

4

Tizen TV SDK CAPH Web UI Framework

CAPH Modules

System Metaphor

Key Navigation

Scrollable Grid & List

UI Components (Button, Dialog, Checkbox,

Input, Dropdown Menu, …)

jQuery

AngularJS

Velocity.js (Fast Animation)

Lodash (Utility)

CAPH Package

Sample & Tutorial

API Documents

TC & Test suite

Web App

Scaffolding

Page 5: CAPH: Tizen TV Web UI Framework

5

With Open Source Frameworks

Based on popular frameworks (Presently jQuery and Angular JS)

Support more frameworks in the future

Angular JS

caph-angular.js

App Code

jQuery

caph-jquery.js

App Code

Page 6: CAPH: Tizen TV Web UI Framework

6

CAPH Modules

All modules support AngularJS and jQuery

All modules work with Key Navigation

All UI Components are customizable

Key Navigation

Scrollable Grid & List

UI Components

Button

Toggle

Button

Dialog

Radio

Button Check Box

Input

Context

Menu

Drop Down Menu

Page 7: CAPH: Tizen TV Web UI Framework

7

Overview

Key Navigation Scrollable Grid & List

Demo

Page 8: CAPH: Tizen TV Web UI Framework

8

Key Navigation

Handle the focus of UI elements easily by arrow keys of remote controller

An attribute ‘focusable’ which represents the focusable element

Support Mouse, Keyboard as well

Find the nearest

focusable element

automatically

1 2

4 5

3

6

7 8 9 10 11

Page 9: CAPH: Tizen TV Web UI Framework

9

Nearest Focusable Finder

Find the nearest focusable element automatically

3

2

4

1

Get

Direction

Calculate

Distance

Get

Nearest

3

2

4

1

Support custom distance calculation strategy

Page 10: CAPH: Tizen TV Web UI Framework

10

Properties

Properties : depth, group, name

By default, depth : 0 , group : ‘default’, name : ‘focusable-0’

Can be changed as below

or Focusable option object

Page 11: CAPH: Tizen TV Web UI Framework

11

Property - depth

1 2

4 5

3

6

7 8 9

10 11

12 13

12

15

Used when moving focus to another focusable element

Focus only changed between the same depth

depth : 1

depth : 2

Change the depth by calling focus controller's 'setDepth' API

Page 12: CAPH: Tizen TV Web UI Framework

12

Property - group

Group2

Group1

1 2

4 5

3

6

7 8 9

Separate focusable area semantically

Focus can be changed if each depth is same

You can manage each group's

previous focusable element

history by calling focus

controller's 'setGroup' API

Change the group easily by concatenating 'group:' prefix and option value

Page 13: CAPH: Tizen TV Web UI Framework

13

Property - name

1 2

4 5

3

6

Used when setting the next focus to the specific element

Each name should be an unique value

Page 14: CAPH: Tizen TV Web UI Framework

14

Event Handler

on-focused

on-blurred

on-selected

or

Page 15: CAPH: Tizen TV Web UI Framework

15

Focus Controller Provider

initial depth

initial group of each depth

key map reset

keydown handler (before/after)

disabled element focusing

Page 16: CAPH: Tizen TV Web UI Framework

16

Overview

Key Navigation

Scrollable Grid & List Demo

Page 17: CAPH: Tizen TV Web UI Framework

17

container wrapper

Scrollable Grid & List

Previous Page

Item

view

Item

view

Item

view

Item

view

Current Page

Item

view

Item

view

Item

view

Item

view

Next Page

Item

view

Item

view

Item

view

Item

view

template

items

High performance scrollable component.

Setting options & template view

Page 18: CAPH: Tizen TV Web UI Framework

18

Basic usage - AngularJS

items - variable in expression

variable: the user defined loop variable

expression: a scope expression giving the collection to enumerate

{{$index}}

$first $last $even $odd are also available

direction

By default, the scroll direction is 'horizontal'

Create by caphList directive, add list data on the scope

Template

Page 19: CAPH: Tizen TV Web UI Framework

19

Basic usage - jQuery

Define a template view to decorate the items in the list

Create a 'caphList' using the prepared resources

Page 20: CAPH: Tizen TV Web UI Framework

20

Event

Event Description

resize If you change the list size manually, you should send this event. The window's resize event is processed automatically.

reload Update the entire item views. By default, when appending new data to collection or removing the existing data from the tail of collection, the visible item views will be updated only if necessary. So if you change the all or some(excluding default case) data of collection, you should call this method to update item views.

moveup Move to the up item.

moveright Move to the right item.

moveleft Move to the left item.

movedown Move to the down item.

Page 21: CAPH: Tizen TV Web UI Framework

21

Properties

Object[] items

string direction

string container-class

string wrapper-class

string duration

string ease

number delay

boolean loop

number initial-item-index

number mouse-scroll-area-size

Function on-decorate-item-view

Function on-focus-item-view

Function on-reach-start

Function on-reach-end

Function on-scroll-start

Function on-scroll-finish

Page 22: CAPH: Tizen TV Web UI Framework

22

Overview

Key Navigation

Scrollable Grid & List

Demo

Page 23: CAPH: Tizen TV Web UI Framework

23

Demo