Open-source News

Build an interactive timeline in React with this open source tool

opensource.com - Wed, 11/23/2022 - 16:00
Build an interactive timeline in React with this open source tool Karol Kozer Wed, 11/23/2022 - 03:00

For several years, I worked in the TV online and video-on-demand (VOD) industry. While working on a scheduler web application, I realized that there were no good solutions for electronic program guides (EPG) and scheduling. Admittedly, this is a niche feature for most web developers, but it's a common requirement for TV applications. I've seen and analyzed a number of websites that have implemented their own EPG or timeline, and I often wondered why everyone seemed to be inventing their own solutions instead of working on a shared solution everyone could use. And that's when I started developing Planby.

Planby is a React (JavaScript) component to help you create schedules, timelines, and electronic program guides (EPG) for online TV and video-on-demand (VOD) services, music and sporting events, and more. Planby uses a custom virtual view, allowing you to operate on a lot of data, and present it to your viewers in a friendly and useful way.

Planby has a simple API that you can integrate with third party UI libraries. The component theme is customised to the needs of the application design.

Timeline performance

The most significant thing when implementing a timeline feature is performance. You're potentially handling basically an endless stream of data across many many different channels. Applications can struggle with refreshing, moving, and scrolling. You want the user's interactions with the content to be fluid.

There's also the potential for poor design. Sometimes, an app implements an EPG timeline in the form of a list that you must scroll vertically, meaning you must click on buttons to move left and right through time, which quickly becomes tiring. What's more, sometimes customization for interacting with an EPG (such as rating, choosing your favorite channels, reading right-to-left (RTL), and so on) aren't available at all, or when they are, they cause performance issues.

Another problem I often face is that an app is too verbose in its data transfer. When an app requests data while you scroll through the EPG, the timeline feels slow and can even crash.

Programming and development Red Hat Developers Blog Programming cheat sheets Try for free: Red Hat Learning Subscription eBook: An introduction to programming with Bash Bash shell scripting cheat sheet eBook: Modernizing Enterprise Java An open source developer's guide to building applications What is Planby?

This is where Planby comes in. Planby is built from scratch, using React and Typescript and a minimal amount of resources. It uses a custom virtual view, allowing you to operate on vast amounts of data. It displays programs and channels to the user, and automatically positions all elements according to hours and assigned channels. When a resource contains no content, Planby calculates the positioning so the time slots are properly aligned.

Planby has a simple interface and includes all necessary features, such as a sidebar, the timeline itself, a pleasant layout, and live program refreshing. In addition, there's an optional feature allowing you to hide any element you don't want to include in the layout.

Planby has a simple API that allows you as the developer to implement your own items along with your user preferences. You can use Planby's theme to develop new features, or you can make custom styles to fit in with your chosen design. You can easily integrate with other features, like a calendar, rating options, a list of user favorites, scroll, "now" buttons, a recording schedule, catch-up content, and much more. What's more, you can add custom global styles, including register-transfer level (RTL) functionality.

And best of all, it uses the open source MIT licensed.

Try Planby

If you would like to try Planby, or just to learn more about it, visit the Git repository. There, I've got some examples of what's possible and you can read the documentation for the details. The package is also available with npm.

Planby is a JavaScript component to help create schedules, timelines, and electronic program guides (EPG) for streaming services, music and sporting events, and more.

Image by:

Opensource.com

JavaScript What to read next This work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License. Register or Login to post a comment.

Microsoft Promotes Windows Subsystem For Linux "WSL" To GA Status

Phoronix - Wed, 11/23/2022 - 07:13
While the Windows Subsystem for Linux (WSL) has been around for six years now and with WSL2 is on to running graphical Linux apps with GPU acceleration and a wide array of capabilities, including the ability to run systemd and the like, only today has Microsoft promoted WSL to "general availability" status on Windows 10 and Windows 11...

Alpine Linux 3.17 Released With OpenSSL 3.0, Better Rust Support

Phoronix - Wed, 11/23/2022 - 03:09
Alpine Linux as the distro that is focused on being lightweight, simple, and secure with its use of OpenRC, BusyBox, musl libc, and other components is out with a big update...

Asahi Linux Project Makes Progress On USB3, Toward Speaker Support, Keyboard Backlight

Phoronix - Wed, 11/23/2022 - 02:10
The Asahi Linux crew has published their November 2022 status report highlighting recent open-source progress on supporting Apple Silicon M1/M2 devices under Linux...

Pages