<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Lewis Hunt</title>
    <description>The latest articles on DEV Community by Lewis Hunt (@lewhunt).</description>
    <link>https://dev.to/lewhunt</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1166027%2Ff9153ad7-f6f3-4477-b19b-8c7379638eab.png</url>
      <title>DEV Community: Lewis Hunt</title>
      <link>https://dev.to/lewhunt</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/lewhunt"/>
    <language>en</language>
    <item>
      <title>Introducing DIVZ - a React component to scroll, swipe &amp; zoom through content on the 3D z-axis</title>
      <dc:creator>Lewis Hunt</dc:creator>
      <pubDate>Wed, 01 May 2024 11:41:07 +0000</pubDate>
      <link>https://dev.to/lewhunt/introducing-divz-a-react-component-to-scroll-swipe-zoom-through-html-on-the-3d-z-axis-el6</link>
      <guid>https://dev.to/lewhunt/introducing-divz-a-react-component-to-scroll-swipe-zoom-through-html-on-the-3d-z-axis-el6</guid>
      <description>&lt;p&gt;I'm excited to share DIVZ - a free open source React UI component that lets you scroll, swipe &amp;amp; zoom through HTML elements on the 3D z-axis. Think of it as a new, experimental way to navigate and present web content 🙌&lt;/p&gt;

&lt;p&gt;&lt;a href="https://lewhunt.github.io/divz/" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faw8de9zwczgpsox3bd9j.gif" alt="https://lewhunt.github.io/divz/"&gt;&lt;/a&gt;&lt;/p&gt;



&lt;h3&gt;
  
  
  &lt;a href="https://lewhunt.github.io/divz/" rel="noopener noreferrer"&gt;👉 Try out the demos here 👈&lt;/a&gt;
&lt;/h3&gt;
&lt;h3&gt;
  
  
  &lt;a href="https://github.com/lewhunt/divz" rel="noopener noreferrer"&gt;👉 Dive into the source code 👈&lt;/a&gt;
&lt;/h3&gt;



&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;

&lt;p&gt;Developers can install Divz as an open source component to use in React apps. Quickest install method is via the npm install command below:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

npm &lt;span class="nb"&gt;install &lt;/span&gt;divz


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Usage
&lt;/h2&gt;

&lt;p&gt;After install, import the component and render it in your app or page, wrapping it around your list of divs or other HTML elements:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Divz&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;divz&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;App&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Divz&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;1&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;2&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;3&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;4&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Divz&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The &lt;a href="https://github.com/lewhunt/divz/blob/main/src/App.tsx" rel="noopener noreferrer"&gt;demo source code&lt;/a&gt; illustrates how the component can be initialised with more props - along with images and videos inside the child divs - for a richer user experience.&lt;/p&gt;



&lt;h2&gt;
  
  
  Why Divz?
&lt;/h2&gt;

&lt;p&gt;Divz was initially created to showcase portfolio work within a pseudo-3D environment, loosely inspired by Apple's Time Machine interface which allows the user to zoom through historical Finder windows:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Time_Machine_%28macOS%29" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd6tkd5moxx9mex6jm5o0.jpg" alt="https://en.wikipedia.org/wiki/Time_Machine_%28macOS%29"&gt;&lt;/a&gt;&lt;/p&gt;



&lt;h2&gt;
  
  
  What Sets It Apart?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;b&gt;Simplified Integration:&lt;/b&gt; Divz is designed to be responsive and easy to use, acting as a straightforward wrapper around a list of divs or other HTML elements.&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;Diverse Applications:&lt;/b&gt; While the demos showcase its versatility as a carousel, slideshow, or gallery component, Divz opens the door to a range of other potential uses. Consider it an innovative, experimental method for navigating web content.&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;Broad Device Support:&lt;/b&gt; Divz accommodates various navigation modes, including touch for mobile devices, cursor/trackpad for desktop users, and arrow keys for TV devices.&lt;/li&gt;
&lt;/ul&gt;



&lt;h2&gt;
  
  
  How Does It Work?
&lt;/h2&gt;

&lt;p&gt;Under the hood, Divz performs CSS3 transforms on the core component and the child HTML elements, set dynamically with React TypeScript. The component is packaged using Vite to allow npm library integration.&lt;/p&gt;



&lt;h2&gt;
  
  
  Support
&lt;/h2&gt;

&lt;p&gt;I hope this has given a good intro to the component and you get some use out of it for your own projects!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/lewhunt/divz/issues" rel="noopener noreferrer"&gt; 💬 Fire over a comment&lt;/a&gt; if you have any feedback, requests or issues 🐛&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/lewhunt/divz" rel="noopener noreferrer"&gt;⭐ Give it a Github star&lt;/a&gt; if you like the component or want to bookmark it 🙏&lt;/p&gt;

</description>
      <category>react</category>
      <category>showdev</category>
      <category>webdev</category>
      <category>css</category>
    </item>
    <item>
      <title>Introducing Mixmotion - an Open Source Music Player with Fullscreen Visual Effects</title>
      <dc:creator>Lewis Hunt</dc:creator>
      <pubDate>Fri, 15 Mar 2024 13:19:41 +0000</pubDate>
      <link>https://dev.to/lewhunt/introducing-mixmotion-an-open-source-music-player-with-fullscreen-visual-effects-5a16</link>
      <guid>https://dev.to/lewhunt/introducing-mixmotion-an-open-source-music-player-with-fullscreen-visual-effects-5a16</guid>
      <description>&lt;p&gt;I'm excited to share &lt;strong&gt;Mixmotion Player&lt;/strong&gt; - a free open source React music player with Mixcloud integration and dynamic fullscreen visual effects 💥&lt;/p&gt;

&lt;p&gt;On playback, you'll enter an immersive lean-back mode, with the ability to toggle on/off a vast selection of dynamic background visuals.&lt;/p&gt;

&lt;p&gt;To quickly see it in action click on the video above, you can also check out the app or source code via the links below:&lt;/p&gt;



&lt;h3&gt;
  
  
  &lt;a href="https://lewhunt.github.io/mixmotion/" rel="noopener noreferrer"&gt;👉 Try out the free app here 👈&lt;/a&gt;
&lt;/h3&gt;
&lt;h3&gt;
  
  
  &lt;a href="https://github.com/lewhunt/mixmotion" rel="noopener noreferrer"&gt;👉 Dive into the source code 👈&lt;/a&gt;
&lt;/h3&gt;



&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;

&lt;p&gt;Developers can install Mixmotion Player as an open source component to use in React apps. Quickest install method is via the npm i command below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;mixmotion-player
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;h2&gt;
  
  
  Usage
&lt;/h2&gt;

&lt;p&gt;After install, import the player and render MixmotionPlayer in your own app with a Mixcloud URL. It will use default settings for the other non declared props.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;useState&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;MixmotionPlayer&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;mixmotion-player&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Demo&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setUrl&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="nf"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;setUrl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://www.mixcloud.com/discover/trance/?order=latest&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;[]);&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;MixmotionPlayer&lt;/span&gt; &lt;span class="na"&gt;url&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;Demo&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;The &lt;a href="https://github.com/lewhunt/mixmotion/blob/main/src/DemoAdvanced.tsx" rel="noopener noreferrer"&gt;advanced demo&lt;/a&gt; and &lt;a href="https://lewhunt.github.io/mixmotion/" rel="noopener noreferrer"&gt;official web app&lt;/a&gt; illustrate how the component can be customised further. Props are specified for custom buttons, video backgrounds and local data (saved items). A complete list of props are detailed further down this page.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;MixmotionPlayer&lt;/span&gt;
  &lt;span class="na"&gt;url&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
  &lt;span class="na"&gt;showsData&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;getSavedData&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
  &lt;span class="na"&gt;customButtons&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;customButtons&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
  &lt;span class="na"&gt;backdropVideoList&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;backdropVideoList&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
  &lt;span class="na"&gt;enableBackdropVideo&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;MixmotionPlayer&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;a href="https://github.com/lewhunt/mixmotion" rel="noopener noreferrer"&gt;Github readme&lt;/a&gt; details the props available plus the more advanced methods and hooks available to you.&lt;/p&gt;



&lt;h2&gt;
  
  
  Why Another Player?
&lt;/h2&gt;

&lt;p&gt;There are plenty of web players and widgets already available from the likes of Soundcloud and Mixcloud that you can integrate into your app.&lt;/p&gt;

&lt;p&gt;Mixmotion offers something different; an immersive, full-screen playback experience with unique visual effects, while still providing free access to Mixcloud's vast music catalogue.&lt;/p&gt;
&lt;h2&gt;
  
  
  What Sets It Apart?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;b&gt;Mixcloud Integration:&lt;/b&gt; Simple yet versatile access to Mixcloud content that goes beyond their official widget. Access playlists, user sets, genres, tags and individual shows, with the ability to privately save favourites via local storage and share mixes.&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;Dynamic Visuals:&lt;/b&gt;  Artwork combined with canvas effects and video motion backgrounds generate a captivating blend of imagery within a rich, immersive music player.&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;Broad Device Support:&lt;/b&gt;  Designed for mobile, desktop and TV devices. Touch, cursor and arrow-key navigation help make the user experience smooth across platforms.&lt;/li&gt;
&lt;li&gt;
&lt;b&gt;Future Considerations:&lt;/b&gt;  Integration with local file paths, audio streams and other music services like Soundcloud. Real-time audio visualizations and beat detection are also being considered.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  How Does It Work?
&lt;/h2&gt;

&lt;p&gt;Under the hood, the component is built on top of the official Mixcloud API and Mixcloud Widget. It also utilises another custom component of mine - Dynamic Backdrop - to create a blend of videos layered with css and canvas animation effects. Videos are given random 'blend modes' so they merge with the canvas background to give various colour effects.&lt;/p&gt;



&lt;h2&gt;
  
  
  Support
&lt;/h2&gt;

&lt;p&gt;I hope this post has given you a good intro to the web app &amp;amp; component and you get some enjoyment out of the music and visuals!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/lewhunt/mixmotion/issues" rel="noopener noreferrer"&gt; 💬 Fire over a comment&lt;/a&gt; if you have any feedback, requests or issues 🐛&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/lewhunt/mixmotion" rel="noopener noreferrer"&gt;⭐ Smash us a Github star&lt;/a&gt; if you like the app or component 🙏&lt;/p&gt;

&lt;p&gt;&lt;a href="https://lewhunt.github.io/mixmotion/" rel="noopener noreferrer"&gt;🔗 Share your favourite sets&lt;/a&gt; in the app to support the talented DJs 🙌&lt;/p&gt;




&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/_oPRTqFwmRs"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>react</category>
      <category>music</category>
      <category>showdev</category>
      <category>typescript</category>
    </item>
    <item>
      <title>Introducing ReactTVPlayer: An Open Source Media Player for TV Apps on Devices 📺 🖥️</title>
      <dc:creator>Lewis Hunt</dc:creator>
      <pubDate>Wed, 20 Sep 2023 18:28:33 +0000</pubDate>
      <link>https://dev.to/lewhunt/introducing-reacttvplayer-open-source-player-for-tv-experiences-on-devices-ba</link>
      <guid>https://dev.to/lewhunt/introducing-reacttvplayer-open-source-player-for-tv-experiences-on-devices-ba</guid>
      <description>&lt;p&gt;I'm excited to share &lt;strong&gt;React TV Player&lt;/strong&gt; - a free to use open source React media player component designed for TV, aiming to lower the barrier to entry and simplify playback in big-screen web apps! 🙌&lt;/p&gt;

&lt;p&gt;With a customizable UI and easy arrow-key navigation, it can play a variety of urls like Dash/HLS streams and it &lt;strong&gt;even supports YouTube, Twitch &amp;amp; Vimeo videos&lt;/strong&gt; - saving the cost and hassle of additional media encoding 🎉&lt;/p&gt;



&lt;h3&gt;
  
  
  &lt;a href="https://lewhunt.github.io/react-tv-player/" rel="noopener noreferrer"&gt;Live demo&lt;/a&gt; (for desktop browsers)
&lt;/h3&gt;
&lt;h3&gt;
  
  
  &lt;a href="https://github.com/lewhunt/react-tv-player" rel="noopener noreferrer"&gt;Github repo&lt;/a&gt; (full readme info and source code)
&lt;/h3&gt;



&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;

&lt;p&gt;It has been built as an npm package for easy install:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

npm &lt;span class="nb"&gt;install &lt;/span&gt;react-tv-player


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Usage
&lt;/h2&gt;

&lt;p&gt;Then just import the player and render it in your App/Page&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;TVPlayer&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react-tv-player&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;App&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;TVPlayer&lt;/span&gt; &lt;span class="na"&gt;url&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"https://www.youtube.com/watch?v=SkVqJ1SGeL0"&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;




&lt;p&gt;The demo's source code &lt;a href="https://github.com/lewhunt/react-tv-player/blob/main/src/App.tsx" rel="noopener noreferrer"&gt;App.tsx&lt;/a&gt; illustrates how the component can be initialised with more props such as metadata, custom buttons, preview images and multiple media...&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;

&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;TVPlayer&lt;/span&gt;
  &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;mediaList&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;mediaIndex&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
  &lt;span class="na"&gt;subTitle&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;mediaList&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;mediaIndex&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;subTitle&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
  &lt;span class="na"&gt;url&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;mediaList&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;mediaIndex&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
  &lt;span class="na"&gt;light&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;mediaList&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;mediaIndex&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nx"&gt;preview&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
  &lt;span class="na"&gt;customButtons&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;customButtons&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
  &lt;span class="na"&gt;mediaCount&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;mediaList&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
  &lt;span class="na"&gt;onLikePress&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;handleLike&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The &lt;a href="https://github.com/lewhunt/react-tv-player#props" rel="noopener noreferrer"&gt;Github readme&lt;/a&gt; details the props available plus the more advanced methods and hooks available to you.&lt;/p&gt;



&lt;h2&gt;
  
  
  Why Another Player?
&lt;/h2&gt;

&lt;p&gt;In the dynamic landscape of the OTT TV industry, I've dedicated years working with various players. During this journey, two persistent challenges surfaced time and again: performant UI and compatible media encodings. These hurdles often forced us to heavily customise players and tackle streaming difficulties, leading to added costs and frustrating delays. 😫&lt;/p&gt;

&lt;p&gt;Enter ReactTVPlayer, an open-source component that seamlessly integrates with your React applications...&lt;/p&gt;

&lt;h2&gt;
  
  
  What Sets It Apart?
&lt;/h2&gt;

&lt;p&gt;It's designed for TV experiences out of the box, complete with customisable UI buttons and intuitive arrow key plus cursor navigation. 🎮 In addition to handling HLS and Dash streams effortlessly, it tackles the formidable challenge of playing YouTube and Vimeo urls directly on TV. Supporting YouTube/Vimeo eliminates the need for custom media encoding when it's not always necessary or even affordable. 🎉&lt;/p&gt;

&lt;h2&gt;
  
  
  How Does It Work?
&lt;/h2&gt;

&lt;p&gt;Under the hood, this component harnesses the power of open-source libraries like Norigin Media's spatial navigation hook. It builds upon the excellence of React Player, which utilises hls.js and dash.js. Powered by React TypeScript (although you don't need to use TypeScript to make the most of it), this library is packaged efficiently using Vite, making integration a breeze. 💪&lt;/p&gt;

&lt;p&gt;From Amazon FireTV sticks and Samsung Tizen Smart TVs to Xbox, LG webOS and even desktop-based web apps, ReactTVPlayer aims to cover a vast landscape of devices, especially those post-2018 with modern Chromium browsers. 📺 🖥️ 💻&lt;/p&gt;




&lt;p&gt;I hope this post has given you a good intro to the component and how it can help simplify and enhance the playback experiences in your next big-screen web apps! 🙌&lt;/p&gt;



&lt;h3&gt;
  
  
  &lt;a href="https://lewhunt.github.io/react-tv-player/" rel="noopener noreferrer"&gt;Live demo&lt;/a&gt; (for desktop browsers)
&lt;/h3&gt;
&lt;h3&gt;
  
  
  &lt;a href="https://github.com/lewhunt/react-tv-player" rel="noopener noreferrer"&gt;Github repo&lt;/a&gt; (full readme info and source code)
&lt;/h3&gt;




&lt;p&gt;&lt;a href="https://github.com/lewhunt/react-tv-player" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Frepository-images.githubusercontent.com%2F688997852%2Fcc39ebd0-f663-4715-b502-eccb06cc4e57" alt="https://github.com/lewhunt/react-tv-player"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ott</category>
      <category>react</category>
      <category>tv</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
