<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Flashlight on Dev notes</title>
    <link>https://blog.michal.pawlik.dev/tags/flashlight/</link>
    <description>Recent content in Flashlight on Dev notes</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Wed, 08 Feb 2023 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://blog.michal.pawlik.dev/tags/flashlight/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>TIL: Launching flashlight with Typescript is insane</title>
      <link>https://blog.michal.pawlik.dev/posts/til/flashlight-using-typescript/</link>
      <pubDate>Wed, 08 Feb 2023 00:00:00 +0000</pubDate>
      <guid>https://blog.michal.pawlik.dev/posts/til/flashlight-using-typescript/</guid>
      <description>&lt;p&gt;&lt;strong&gt;TL;DR&lt;/strong&gt; I wanted to launch a flashlight on Android device using Typescript and the experience was &lt;em&gt;far from ideal&lt;/em&gt;.&lt;/p&gt;&#xA;&lt;h1 id=&#34;the-task&#34;&gt;The task&lt;/h1&gt;&#xA;&lt;p&gt;Background: there&amp;rsquo;s a web application that runs a camera to scan for QR codes. Sometimes the light conditions are poor and scanning is difficult.&lt;/p&gt;&#xA;&lt;p&gt;The task: Launch the flashlight to improve the scanning experience.&lt;/p&gt;&#xA;&lt;p&gt;Doesn&amp;rsquo;t sound that difficult, does it?&lt;/p&gt;&#xA;&lt;h1 id=&#34;meet-the-camera-api&#34;&gt;Meet the camera API&lt;/h1&gt;&#xA;&lt;p&gt;So we want to obtain the camera stream, how do we do that? It seems the answer is simple. Meet the &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia&#34;&gt;MediaDevices.getUserMedia()&lt;/a&gt;&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
