All Projects → raphamorim → React Tv

raphamorim / React Tv

Licence: mit
[ Unmaintained due to raphamorim/react-ape ] React Renderer for low memory applications

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to React Tv

react-tv-navigation
React Navigation for TVs
Stars: ✭ 64 (-96.7%)
Mutual labels:  tv, samsung, webos, react-tv
lrud
Left, Right, Up, Down. A spatial navigation library for devices with input via directional controls
Stars: ✭ 31 (-98.4%)
Mutual labels:  smarttv, tv, react-tv
qmlcore-tv
Smart TV PureQML plugin (LG, Samsung, OperaTV, AndroidTV, Hisense)
Stars: ✭ 23 (-98.82%)
Mutual labels:  tv, webos, orsay
homebridge-samsung-tizen-applications
Database of homebridge tizen-apps ids. All in one place!
Stars: ✭ 16 (-99.18%)
Mutual labels:  samsung, tizen-tv
Amazon-Alexa-As-LG-TV-Remote
Control your LG WebOS 3.0+ TV with Amazon Alexa
Stars: ✭ 22 (-98.87%)
Mutual labels:  tv, webos
homebridge-vieramatic
Homebridge plugin for Panasonic™ Viera™ TVs (includes support for 2018 and later models)
Stars: ✭ 39 (-97.99%)
Mutual labels:  tv, tvs
lgtv2mqtt
Interface between LG WebOS Smart TVs and MQTT 📺
Stars: ✭ 90 (-95.36%)
Mutual labels:  tv, webos
rtsp-samsung-tv
Display RTSP streams from IP Cameras on Samsung Smart TV (Tizen TV)
Stars: ✭ 40 (-97.94%)
Mutual labels:  samsung, tizen-tv
RootMyTV.github.io
RootMyTV is a user-friendly exploit for rooting/jailbreaking LG webOS smart TVs.
Stars: ✭ 745 (-61.62%)
Mutual labels:  tv, webos
com.samsung.smart
Samsung Smart TV app for Athom Homey
Stars: ✭ 17 (-99.12%)
Mutual labels:  smarttv, samsung
moonlight-tv
Lightweight NVIDIA GameStream Client, for LG webOS for Raspberry Pi
Stars: ✭ 292 (-84.96%)
Mutual labels:  webos, lg-webos
Piholeblocklist
PiHole and AGH Blocklists
Stars: ✭ 320 (-83.51%)
Mutual labels:  samsung, tv
Building Blocks
A voxel library for real-time applications.
Stars: ✭ 140 (-92.79%)
Mutual labels:  rendering
Iptv M3u Maker
IPTV 国内+国外 电视台直播源m3u文件, 收集&汇总&本地源脚本
Stars: ✭ 1,979 (+1.96%)
Mutual labels:  tv
Diligentsamples
Sample projects demonstrating the usage of Diligent Engine
Stars: ✭ 138 (-92.89%)
Mutual labels:  rendering
Diligentengine
A modern cross-platform low-level graphics library and rendering framework
Stars: ✭ 2,142 (+10.36%)
Mutual labels:  rendering
Sharpbgfx
C# bindings for the bgfx graphics library
Stars: ✭ 154 (-92.07%)
Mutual labels:  rendering
Gimage
A PHP library for easy image handling. 🖼
Stars: ✭ 148 (-92.38%)
Mutual labels:  rendering
Samsung Firmware Magic
Tool for decrypting the firmware files for Samsung SSDs
Stars: ✭ 138 (-92.89%)
Mutual labels:  samsung
Borealis
Hardware accelerated, controller and TV oriented UI library for PC and Nintendo Switch (libnx).
Stars: ✭ 135 (-93.04%)
Mutual labels:  tv

React-TV · license npm version circleci status Build status PRs Welcome

react-tv: React Renderer for low memory applications.

react-tv-cli: React Packager for TVs.

Currently under development.

React-TV Logo

import React from 'react'
import ReactTV, { Platform } from 'react-tv'

class Clock extends React.Component {
  state = { date: new Date() }

  componentDidMount() {
    setInterval(() => this.setState({date: new Date()}), 1000)
  }

  render() {
    if (Platform('webos')) {
      return (
        <h1>Time is {this.state.date.toLocaleTimeString()}</h1>
      )
    }

    return <h2>This App is available only at LG webOS</h2>
  }
}

ReactTV.render(<Clock/>, document.getElementById('root'))

Summary

About React-TV

React-TV is an ecosystem for TV based React applications (from the renderer to CLI for pack/build applications).
At the moment we're focusing on webOS and SmartTV.
React-TV's aims to be a better tool for building and developing fast for TVs.

Understanding the Problem

tl;dr: Crafting a high-performance TV user interface using React

Crafting a high-performance TV user interface using React is a real challenge, because of some reasons:

  • Limited graphics acceleration
  • Single core CPUs
  • High Memory Usage for a common TV App

These restrictions make super responsive 60fps experiences especially tricky. The strategy is step in the renderer: Applying reactive concepts to unblock the processing on the renderer layer, plug the TV's keyListener, avoid React.createElement.

In addition: Unify the build for multiple TV platforms.

Articles

Friendly list of tutorials and articles:

react-tv-cli

To install react-tv-cli (CLI Packager):

$ yarn global add react-tv-cli
Support for React-TV-CLI
Target Platform Status Available Version
LG webOS stable 0.3.1
Samsung Tizen ongoing x
Samsung Orsay not started yet x
Sony PS4 not started yet x
Nintendo Switch not started yet x

Developing for webOS

Short Description: webOS, also known as Open webOS or LG webOS, (previously known as HP webOS and Palm webOS, stylized as webOS) is a Linux kernel-based multitasking operating system for smart devices such as Smart TVs and it has been used as a mobile operating system.


First of all, setup your webOS Environment:

Setup webOS Enviroment

Then, init your react-tv project:

$ react-tv-cli init <my-app-name>

From the project directory, install the dependencies to enable building:

$ yarn install

You will need to keep the list of files related to your app on the React-TV entry up to date in package.json. The init command will already add index.html, bundle.js and style.css to the package.

{
  "name": "my-app-name",
  "react-tv": {
    "files": [
      "index.html",
      "bundle.js",
      "style.css"
    ]
  }
}

To build your project:

$ yarn build

Once the project is built, you can run it on a specific device or emulator:

$ react-tv-cli run-webos <device>
  • When you not specify the device, it runs on VirtualBox webOS Simulator

react-tv

To install react-tv (React Renderer):

$ yarn add react-tv

Platform

When building a cross-platform TV app, you'll want to re-use as much code as possible. You'll probably have different scenarios where different code might be necessary.
For instance, you may want to implement separated visual components for LG-webOS and Samsung-Tizen.

React-TV provides the Platform module to easily organize your code and separate it by platform:

import { Platform } from 'react-tv'

console.log(Platform('webos')) // true
console.log(Platform('tizen')) // false
console.log(Platform('orsay')) // false

renderOnAppLoaded

Takes a component and returns a higher-order component version of that component, which renders only after application was launched, allows to not write diffent logics for many devices.

import { renderOnAppLoaded } from 'react-tv'

const Component = () => (<div></div>)
const App = renderOnAppLoaded(Component)

findDOMNode

Similar to react-dom findDOMNode

Navigation

If you want to start with Navigation for TVs. React-TV provides a package for spatial navigation with declarative support based on Netflix navigation system.

React-TV Navigation exports withFocusable and withNavigation which act as helpers for Navigation.

import React from 'react'
import ReactTV from 'react-tv'
import { withFocusable, withNavigation } from 'react-tv-navigation'

const Item = ({focused, setFocus, focusPath}) => {
  focused = (focused) ? 'focused' : 'unfocused'
  return (
    <div onClick={() => { setFocus() }} >
      It's {focused} Item
    </div>
  )
}

const Button = ({setFocus}) => {
  return (
    <div onClick={() => { setFocus('item-1') }}>
      Back To First Item!
    </div>
  )
}

const FocusableItem = withFocusable(Item)
const FocusableButton = withFocusable(Button)

function App({currentFocusPath}) {
  return (
    <div>
      <h1>Current FocusPath: '{currentFocusPath}'</h1>,
      <FocusableItem focusPath='item-1'/>
      <FocusableItem focusPath='item-2'/>
      <FocusableButton
        focusPath='button'
        onEnterPress={() => console.log('Pressed enter on Button!')}/>
    </div>
  )
}

const NavigableApp = withNavigation(App)

ReactTV.render(<NavigableApp/>, document.querySelector('#app'))

See examples/navigation for more details about usage.

Examples

Clock App

Clock App Example

Youtube App

Youtube App Example

References:

webOS

Videos

Windows
OSX

Essentials to beginner

Developing for SmartTV Guidelines

React Basics and Renderer Architecture

Roadmap

Stage 1

Initial proof-of-concept. [DONE]

  • CLI Build Abstraction of LG webOS (run-webos, run-webos-dev)
  • Create a guide or script to Install all LG webOS environment
  • Renderer ReactElements to simple DOM
    • Support HOF and HOC
    • Support State and Lifecycle
    • Keyboard Navigation
  • Check webos Platform
  • Migrate to React-Reconciler

Stage 2 [IN PROGRESS]

Implement essential functionality needed for daily use by early adopters.

  • Support render to Canvas instead DOM using React.CanvasComponent
  • run-webos support TV device as param
  • Optmizate DOMRenderer for TV
  • Start CLI for Tizen
  • Develop helpers for webOS debbug (e.g: Log System).
  • Support Cross Platform
    • Check executable bin path for Windows, OSX and Linux
  • Bind all TV key listeners on React.Element
  • Improve documentation
  • Benchmark it

Stage 3

Add additional features users expect from a Renderer. Then fix bugs and stabilize through continuous daily use. At this point we can start to experiment with innovative ideas and paradigms.

  • Start CLI for Orsay
  • Update Benchmarks
  • Handle common errors
  • Reactive Renderer
  • Testing and stability

See ReactTV's Changelog.

Currently ReactTV is licensed by MIT License

Credits

Thanks react-dom for be example and a inspiration code :)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].