<?xml version="1.0" encoding="utf-8" standalone="yes"?><feed xmlns="http://www.w3.org/2005/Atom">
  <title></title>
  <subtitle></subtitle>
  <id>https://www.endpointdev.com/blog/tags/video/</id>
  <link href="https://www.endpointdev.com/blog/tags/video/"/>
  <link href="https://www.endpointdev.com/blog/tags/video/" rel="self"/>
  <updated>2026-10-05T00:00:00+00:00</updated>
  <author>
    <name>End Point Dev</name>
  </author>
  
    <entry>
      <title>Announcing Youth Town Hall — a new civic platform</title>
      <link rel="alternate" href="https://www.endpointdev.com/blog/2026/10/announcing-youth-town-hall/"/>
      <id>https://www.endpointdev.com/blog/2026/10/announcing-youth-town-hall/</id>
      <published>2026-10-05T00:00:00+00:00</published>
      <author>
        <name>Ben Ironside Goldstein</name>
      </author>
      <content type="html">
        &lt;p&gt;&lt;img src=&#34;/blog/2026/10/announcing-youth-town-hall/cover.webp&#34; alt=&#34;Youth Town Hall&amp;rsquo;s homepage&#34;&gt;&lt;/p&gt;
&lt;p&gt;We’re proud to announce &lt;a href=&#34;https://youthtownhall.org/&#34;&gt;Youth Town Hall&lt;/a&gt;, a nonpartisan platform where political candidates can connect with constituents ages 18–35. Each town hall gives young adults a focused place to submit questions and watch candidates’ video responses—without ads, algorithmic feeds, or vitriolic commentary.&lt;/p&gt;
&lt;p&gt;We developed Youth Town Hall with the people behind the &lt;a href=&#34;https://youthtownhall.org/archives/presidential-youth-townhall_archives.html&#34;&gt;Presidential Youth Debates&lt;/a&gt;, which organized debates among U.S. presidential candidates—including Bill Clinton, Bob Dole, George W. Bush, John Kerry, Ralph Nader, Barack Obama, and John McCain—from 1996 to 2012.&lt;/p&gt;
&lt;p&gt;Those events invited young people to help shape the conversation rather than simply watch it: youth-submitted questions, informed by a broad network of civic, educational, and media partners, were put directly to presidential contenders. Youth Town Hall carries that basic idea forward in a format built for participation across distance and schedules.&lt;/p&gt;
&lt;p&gt;Connecting young voters with candidates remains important, but today’s media environment often works against sustained attention. Much political outreach happens by text, email, and social media. These channels can reach many people, but their messages arrive amid countless other demands for attention. Abuse on the same platforms can also make political participation feel hostile or exhausting. Many young people have &lt;a href=&#34;https://theharrispoll.com/articles/gen-z-social-media-smart-phones/&#34;&gt;begun to turn away&lt;/a&gt; from social media.&lt;/p&gt;
&lt;p&gt;Youth Town Hall offers another approach. Campaigns can direct young constituents to a simple, focused town hall page, where visitors submit questions and candidates upload video answers to those they select. Each response includes captions and a transcript and can be shared.&lt;/p&gt;
&lt;p&gt;For people submitting questions, the process is intentionally straightforward. After submitting a question, they can manage it and choose whether their name appears. The campaign reviews the submissions and selects the questions the candidate will answer, but cannot edit the wording. When a response is published, the submitter can be notified. The finished page keeps the original question beside the video, captions, and transcript.&lt;/p&gt;
&lt;p&gt;The asynchronous format gives both sides more room than a live event. Young people do not need to be in the same room — or free at the same moment — to participate, and candidates can answer with enough time and context to be useful. Because the responses remain available and shareable, the exchange can reach people well beyond the original submitter.&lt;/p&gt;
&lt;p&gt;We believe that technology can help young Americans raise their voices, but it should be the right technology. Youth Town Hall combines the positive aspects of the internet with old-school, local-politics ethos.&lt;/p&gt;
&lt;p&gt;We designed the service to collect little data about participants. Email addresses are used only to verify submissions, let people manage their questions — including making them anonymous later — and notify them when an answer is published. Campaigns do not receive those addresses, and they are not used for marketing or political outreach. Campaigns decide which questions to answer, so trolls have no impact.&lt;/p&gt;
&lt;p&gt;Because Youth Town Hall was developed as a partnership, End Point helped shape the product as well as build it. Eleven End Pointers collaborated over this past summer, drawing on more than 30 years of experience building secure, scalable systems.&lt;/p&gt;
&lt;p&gt;That meant solving more than video recording and playback. We brought question submission and campaign review, email verification and notifications, captions and transcripts, privacy controls, and long-term hosting into one coherent workflow. Each town hall runs on its own server, and considerable effort went into making the platform reliable, secure, and private.&lt;/p&gt;
&lt;p&gt;Although we built Youth Town Hall for civic engagement, the same model can serve organizations that need a focused, privacy-conscious place to collect questions and publish video responses. Associations, institutions, and community groups could use it for leadership Q&amp;amp;As, member updates, public information, or other exchanges where thoughtful questions deserve substantive answers. We’re interested in exploring those uses too.&lt;/p&gt;
&lt;p&gt;The engineering serves a mission we care about. Young voters should have a straightforward way to ask candidates serious questions and hear their answers without an algorithm deciding what deserves attention. Youth Town Hall is a piece of civic infrastructure: a focused place for direct, good-faith exchange, with enough room for candidates to answer in context. It cannot repair political discourse on its own, but we believe building better conditions for informed participation is useful work, worth doing well.&lt;/p&gt;
&lt;p&gt;We’ve opened Youth Town Hall for the 2026 U.S. election cycle, culminating in Election Day on November 3. But this election is just the beginning. We look forward to offering the platform for post-election town halls with elected representatives and future elections — giving young people an ongoing way to ask questions and hear directly from those who serve them.&lt;/p&gt;

      </content>
    </entry>
  
    <entry>
      <title>Solving High-Resolution Video Stutter with GStreamer Hardware Acceleration</title>
      <link rel="alternate" href="https://www.endpointdev.com/blog/2026/05/solving-hi-res-video-stutter-gstreamer-hardware/"/>
      <id>https://www.endpointdev.com/blog/2026/05/solving-hi-res-video-stutter-gstreamer-hardware/</id>
      <published>2026-05-18T00:00:00+00:00</published>
      <author>
        <name>Alejandro Ramon</name>
      </author>
      <content type="html">
        &lt;p&gt;&lt;img src=&#34;/blog/2026/05/solving-hi-res-video-stutter-gstreamer-hardware/cover.webp&#34; alt=&#34;VisionPort One is the classic VisionPort experience that has proven itself in 70+ installations around the world.&#34;&gt;&lt;br&gt;
Photo from the &lt;a href=&#34;https://www.visionport.com/visionport-platform/&#34;&gt;VisionPort website&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In April, a client at Auburn University reached out to VisionPort Support to ask us to look into an issue with video playback for an upcoming presentation. They were running into performance issues attempting to play a video matching the full resolution of the seven-screen video wall, across all screens.&lt;/p&gt;
&lt;p&gt;We have other clients playing video across all screens normally, on the same hardware and software, with no issue, so this was a strange report to the team. The seemingly simple request ended up leading us down a rabbit hole into how video playback works on the VisionPort platform and ultimately led to some serious modernization of our video rendering stack, the process of which we would like to share with you today.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Why was a system designed to play high-resolution video seamlessly across seven screens performing so poorly?&lt;/em&gt;&lt;/p&gt;
&lt;h3 id=&#34;the-system-a-gstreamer-pipeline&#34;&gt;The System: A GStreamer Pipeline&lt;/h3&gt;
&lt;p&gt;The VisionPort video player is a custom application built on top of the &lt;a href=&#34;https://gstreamer.freedesktop.org/&#34;&gt;GStreamer&lt;/a&gt; framework, initially developed to synchronize video across separate computers on our legacy Liquid Galaxy hardware configurations.&lt;/p&gt;
&lt;p&gt;Each instance of the player renders a single video. This can be the full 7560x1920 canvas size of a seven-screen VisionPort, or often various subdivisions of the full resolution that cover two or three displays. Although the host hardware of our modern servers is theoretically sufficient, in practice the pipeline was overwhelmed.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;/blog/2026/05/solving-hi-res-video-stutter-gstreamer-hardware/vp-content-playback-flow.webp&#34; alt=&#34;High-level overview of the VisionPort content playback flow, showing users interacting through laptop, tablet, or controllers, with content routed through the VisionPort head node, application layer, NVIDIA card resources, and display wall.&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;High-level overview of the content playback flow for VisionPort systems&lt;/em&gt;&lt;/p&gt;
&lt;h3 id=&#34;first-instinct-the-encoding&#34;&gt;First Instinct: The Encoding&lt;/h3&gt;
&lt;p&gt;Our initial hypothesis was that video encoding was to blame. Encoding impacts file size, quality, and playback compatibility, and we have previously encountered issues with certain Apple workflows, videos exported from Final Cut Pro, for example. Although nothing about the original video stood out to our team as improperly configured, we re-encoded the source using an H.264 codec and a well-formed container, and tested reducing the resolutions of the video.&lt;/p&gt;
&lt;p&gt;The stutter persisted consistently across the test videos, ruling out encoding as the root cause. In fact, the lower-resolution videos still had stuttering issues, furthering our confusion.&lt;/p&gt;
&lt;h3 id=&#34;hardware-decoding-take-one&#34;&gt;Hardware Decoding, Take One&lt;/h3&gt;
&lt;p&gt;We next considered that the pipeline was running entirely on the processor (CPU) instead of utilizing the ample graphics card resources (GPU). Although the video player was originally designed to support hardware decode elements, software decode had been the default configuration for a number of years.&lt;/p&gt;
&lt;p&gt;Architecturally, the video player runs from within an application layer deployed to the host via a Docker container. The host features an NVIDIA graphics card, so our logic was that leveraging the GPU for this high-resolution video should, in theory, reduce bottlenecks induced by running everything off of the CPU.&lt;/p&gt;
&lt;p&gt;Implementing hardware decode was a project in itself. We discovered that the original legacy decoders present in the video player, such as &lt;code&gt;vaapidecodebin&lt;/code&gt; and &lt;code&gt;vaapipostproc&lt;/code&gt;, were not available to our server&amp;rsquo;s CPU. NVIDIA&amp;rsquo;s accelerated decoders are not part of GStreamer&amp;rsquo;s default plugin set packaged on the Ubuntu base that we use, meaning we had to identify and install the correct package source and plugin in our Docker images. The necessary plugin package, via &lt;code&gt;apt&lt;/code&gt;, ended up being &lt;code&gt;gstreamer1.0-plugins-bad&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Lastly, we needed to resolve Docker-related resource-visibility issues to ensure the container could access the GPU. That meant using the &lt;a href=&#34;https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/docker-specialized.html&#34;&gt;NVIDIA Container Toolkit&lt;/a&gt; and passing the correct environment variables to the container so that it could utilize the GPU resources.&lt;/p&gt;
&lt;p&gt;Once properly configured, and by enabling hardware decode in the launch command, we were able to determine that hardware decoding was functional.&lt;/p&gt;
&lt;p&gt;A few useful commands to check whether the expected resources are present in the container:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;nvidia-smi
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#888&#34;&gt;# Checks if the container can access the GPU at all.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;nvidia-smi dmon -s u
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#888&#34;&gt;# Provides an ongoing report of what GPU features are being utilized over time,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#888&#34;&gt;# so we can see whether the decoder is being used.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;gst-inspect-1.0 nvcodec
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#888&#34;&gt;# Gets a list of supported features present for your current implementation of&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#888&#34;&gt;# GStreamer with the NVIDIA codecs. You can also run the command without a&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#888&#34;&gt;# specific feature to list every supported feature present.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;After finally confirming that hardware decode was functioning, we discovered that playback had improved somewhat, but the stutter was not fully resolved.&lt;/p&gt;
&lt;h3 id=&#34;the-real-culprit-rendering-not-decoding&#34;&gt;The Real Culprit: Rendering, Not Decoding&lt;/h3&gt;
&lt;p&gt;At this point we were stumped, so we tried playing the video in another player we had available on the system, &lt;code&gt;ffplay&lt;/code&gt;. The video appeared to play back somewhat normally.&lt;/p&gt;
&lt;p&gt;We reported this to our developer, who decided to enable GStreamer&amp;rsquo;s debug output. The logs were filled with quality-of-service messages, indicating that one or more pipeline elements could not process frames quickly enough, causing downstream stages to drop or delay them.&lt;/p&gt;
&lt;p&gt;The QoS pattern suggested the bottleneck was in the sink, not the decoder. The video player&amp;rsquo;s GStreamer &lt;code&gt;autovideosink&lt;/code&gt; element was defaulting to &lt;code&gt;xvimagesink&lt;/code&gt;, which relies on the CPU for color-space conversion and video texture handling. At 7560x1920px resolution and 60 fps, the CPU was unable to keep up with rendering the large amount of data. &lt;em&gt;It turns out that the source of the issue had more to do with the framerate of the high-resolution video than with the resolution itself.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;The host had &lt;code&gt;glimagesink&lt;/code&gt; available, which is an alternative sink that uses OpenGL for GPU-based color-space conversion and texture upload. By explicitly specifying &lt;code&gt;glimagesink&lt;/code&gt; instead of relying on &lt;code&gt;autovideosink&lt;/code&gt;, we assigned rendering to the appropriate hardware.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;This single change restored smooth playback at the target resolution.&lt;/em&gt;&lt;/p&gt;
&lt;h3 id=&#34;putting-the-pieces-together&#34;&gt;Putting the Pieces Together&lt;/h3&gt;
&lt;p&gt;Even though we had a solution for the issue at hand, there were a few more details to sort out to make this universal for all media going forward. It turns out that the NVIDIA accelerated H.264 decoders for the hardware generation we use top out at 4K, meaning that H.264 encoded videos larger than 3840x2160 would not be able to run on the GPU even if we specified use of the decoder. Luckily, our implementation was robust enough to swap back to decoding on the CPU in the case of a fault.&lt;/p&gt;
&lt;p&gt;Additionally, the H.265 decoder supports higher resolutions, comfortably handling 7560x1920 and allowing for future scalability.&lt;/p&gt;
&lt;p&gt;The complete pipeline now runs the GL-backed sink with the option to enable hardware decode for H.264, H.265, VP8, VP9, or AV1, all common encoding formats. The format is auto-detected and will utilize the decoder if the content is acceptable. The CPU render is no longer a bottleneck for decoding or rendering, allowing videos to play back at the full 60 fps, even at higher resolutions.&lt;/p&gt;
&lt;h3 id=&#34;beyond-one-engagement-broader-implications&#34;&gt;Beyond One Engagement: Broader Implications&lt;/h3&gt;
&lt;p&gt;The Auburn University request prompted us to reevaluate our video player stack, particularly a legacy renderer choice and plugin-installation pattern from prior to our move to containerized deployments. Not mentioned in our process above were bug fixes to fix potential memory bugs and improvements to our testing process to simplify future changes.&lt;/p&gt;
&lt;p&gt;These improvements are now incorporated into the upcoming VisionPort Library MQTT migration of the VisionPort application layer. New deployments will default to hardware-accelerated decoding via NVIDIA decoders and GL-backed rendering via &lt;code&gt;glimagesink&lt;/code&gt;, rather than defaulting to the CPU path with the old renderer.&lt;/p&gt;
&lt;p&gt;Key takeaways include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Instrument first if a video pipeline is stuttering&lt;/strong&gt;. GStreamer&amp;rsquo;s verbose debug output, particularly QoS messages, identifies pipeline bottlenecks.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Do not assume the autodetected sink is optimal&lt;/strong&gt;. &lt;code&gt;autovideosink&lt;/code&gt; is frequently adequate, but check the available sinks for your operating system.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Hardware acceleration in a container requires more than package installation&lt;/strong&gt;. The container must have GPU visibility and the correct plugin set, which may be its own task.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Decoder and renderer can be independently CPU- or GPU-bound&lt;/strong&gt;. Ensuring both are GPU-accelerated is crucial for high-resolution pipelines.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;working-with-end-point&#34;&gt;Working with End Point&lt;/h3&gt;
&lt;p&gt;If you&amp;rsquo;re facing video playback or multimedia pipeline performance challenges, whether with GStreamer, in a containerized environment, or across a multi-screen VisionPort-style installation, End Point&amp;rsquo;s Immersive and Geospatial division has extensive experience with these issues.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&#34;https://gstreamer.freedesktop.org/documentation/&#34;&gt;GStreamer documentation&lt;/a&gt; is a valuable resource, and we are available to discuss our insights from similar deployments. &lt;a href=&#34;/contact/&#34;&gt;Get in touch&lt;/a&gt; to set up a consultation.&lt;/p&gt;

      </content>
    </entry>
  
    <entry>
      <title>GStreamer Nvenc for Ubuntu 20.04</title>
      <link rel="alternate" href="https://www.endpointdev.com/blog/2021/04/gstreamer-nvenc-for-ubuntu-20-04/"/>
      <id>https://www.endpointdev.com/blog/2021/04/gstreamer-nvenc-for-ubuntu-20-04/</id>
      <published>2021-04-22T00:00:00+00:00</published>
      <author>
        <name>Neil Elliott</name>
      </author>
      <content type="html">
        &lt;p&gt;&lt;img src=&#34;/blog/2021/04/gstreamer-nvenc-for-ubuntu-20-04/red-pipe.jpg&#34; alt=&#34;&#34;&gt;
&lt;a href=&#34;https://unsplash.com/photos/a_PDPUPuNZ8&#34;&gt;Image&lt;/a&gt; by &lt;a href=&#34;https://unsplash.com/@martinadams&#34;&gt;Martin Adams&lt;/a&gt; on Unsplash&lt;/p&gt;
&lt;p&gt;GStreamer is a library for creating media-handling components. Using GStreamer you can screencast your desktop, transcode a live stream, or write a media player application for your kiosk.&lt;/p&gt;
&lt;p&gt;Video encoding is expensive, even with AMD’s current lineup making it more palatable. Recent Nvidia Quadro and GeForce video cards include dedicated H.264 encoding and decoding hardware as a set of discrete components alongside the GPU. The hardware is used in the popular Shadowplay toolkit on Windows and available to developers through the Nvidia Video SDK on Linux.&lt;/p&gt;
&lt;p&gt;GStreamer includes elements as part of the “&lt;a href=&#34;https://gstreamer.freedesktop.org/modules/gst-plugins-bad.html&#34;&gt;GStreamer Bad&lt;/a&gt;” plugin set that leverages the SDK without having to get your hands too dirty. The plugins are not included with gst-plugins-bad in apt, and must be compiled with supporting libraries from Nvidia. Previously this required registering with Nvidia and downloading the Nvidia Video SDK, but Ubuntu recently added apt packages providing them, a big help for automation.&lt;/p&gt;
&lt;h3 id=&#34;environment&#34;&gt;Environment&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Ubuntu 20.04 LTS&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://developer.nvidia.com/video-encode-and-decode-gpu-support-matrix-new&#34;&gt;Video card from GPU support matrix&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://gstreamer.freedesktop.org/documentation/installing/on-linux.html?gi-language=c#install-gstreamer-on-ubuntu-or-debian&#34;&gt;GStreamer&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;cuda&#34;&gt;CUDA&lt;/h3&gt;
&lt;p&gt;The nvenc and nvdec plugins depend on CUDA 11. The apt version is too old. I’ve found the &lt;a href=&#34;https://developer.nvidia.com/cuda-downloads?target_os=Linux&amp;amp;target_arch=x86_64&amp;amp;target_distro=Debian&amp;amp;target_version=10&amp;amp;target_type=runfilelocal&#34;&gt;runfile&lt;/a&gt; to be the most reliable installation method.
Deselect the nvidia drivers when using the runfile if using the distro-maintained driver.&lt;/p&gt;
&lt;h3 id=&#34;plugin&#34;&gt;Plugin&lt;/h3&gt;
&lt;p&gt;Install prerequisites from apt:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ apt install nvidia-driver-460 libnvidia-encode-460 libnvidia-decode-460 libdrm-dev&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Clone gst-plugins-bad source matching distro version:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ git clone --single-branch -b 1.16.2 git://anongit.freedesktop.org/gstreamer/gst-plugins-bad
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ &lt;span style=&#34;color:#038&#34;&gt;cd&lt;/span&gt; gst-plugins-bad&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Compile and install plugins:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ ./autogen.sh --with-cuda-prefix=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;/usr/local/cuda&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ &lt;span style=&#34;color:#038&#34;&gt;cd&lt;/span&gt; sys/nvenc
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ make
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ cp .libs/libgstnvenc.so /usr/lib/x86_64-linux-gnu/gstreamer-1.0/
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ &lt;span style=&#34;color:#038&#34;&gt;cd&lt;/span&gt; ../nvdec
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ make
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ cp .libs/libgstnvdec.so /usr/lib/x86_64-linux-gnu/gstreamer-1.0/&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Clear GStreamer cache and check for dependency issues using gst-inspect:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ rm -r ~/.cache/gstreamer-1.0
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ gst-inspect-1.0 | grep &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;nvenc\|nvdec&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;nvenc:  nvh264enc: NVENC H.264 Video Encoder
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;nvenc:  nvh265enc: NVENC HEVC Video Encoder
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;nvdec:  nvdec: NVDEC video decoder&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h3 id=&#34;benchmark&#34;&gt;Benchmark&lt;/h3&gt;
&lt;p&gt;Here is an example pipeline using the standard CPU-based H.264 encoder to encode 10000 frames at 320x240:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ gst-launch-1.0 videotestsrc num-buffers=&lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;10000&lt;/span&gt; ! x264enc ! h264parse ! mp4mux ! filesink &lt;span style=&#34;color:#369&#34;&gt;location&lt;/span&gt;=vid1.mp4&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;On my modest machine, this took around 9.6 seconds and 400% CPU.&lt;/p&gt;
&lt;p&gt;Running the same pipeline with the nvenc element:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ gst-launch-1.0 videotestsrc num-buffers=&lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;10000&lt;/span&gt; ! nvh264enc ! h264parse ! mp4mux ! filesink &lt;span style=&#34;color:#369&#34;&gt;location&lt;/span&gt;=vid2.mp4&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;About 2.3 seconds with 100% CPU.&lt;/p&gt;
&lt;h3 id=&#34;alternatives&#34;&gt;Alternatives&lt;/h3&gt;
&lt;p&gt;The apt-supported version of these plugins is limited to H.264 and 4K pixels in either dimension. Features have been fleshed out upstream. Elements for the Nvidia Tegra line of mobile processors provide more features, but the required hardware probably isn’t included with your workstation.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://trac.ffmpeg.org/wiki/HWAccelIntro&#34;&gt;FFmpeg also provides hardware accelerated elements&lt;/a&gt;, including nvcodec supported H.264 and HEVC encoders and decoders, out of the box on Ubuntu.&lt;/p&gt;

      </content>
    </entry>
  
    <entry>
      <title>YouTube Algorithms, Engagement, and You</title>
      <link rel="alternate" href="https://www.endpointdev.com/blog/2018/01/youtube-algorithms-engagement-and-you/"/>
      <id>https://www.endpointdev.com/blog/2018/01/youtube-algorithms-engagement-and-you/</id>
      <published>2018-01-24T00:00:00+00:00</published>
      <author>
        <name>Cody Ressler</name>
      </author>
      <content type="html">
        &lt;p&gt;&lt;img src=&#34;/blog/2018/01/youtube-algorithms-engagement-and-you/image-0.jpg&#34; alt=&#34;Making a video&#34;&gt;&lt;br/&gt;
&lt;small&gt;&lt;a href=&#34;https://www.flickr.com/photos/garryknight/5519583998/&#34;&gt;Photo by Garry Knight&lt;/a&gt;, CC BY 2.0, modified&lt;/small&gt;&lt;/p&gt;
&lt;p&gt;As we move into 2018, it is important to understand how algorithms have automated much of what we see when browsing websites such as YouTube, Google, Facebook, Twitter, etc.&lt;/p&gt;
&lt;p&gt;While YouTube is certainly facing its fair share of controversies and criticism&lt;sup&gt;&lt;a href=&#34;#footnotes&#34;&gt;1&lt;/a&gt;&lt;/sup&gt;, it is unlikely that YouTube will be toppled as the predominant video entertainment source for the current generation of young adults and children within the next five years. With that in mind, it is important that we can understand just how YouTube decides both what videos it thinks you should be seeing and how it places ads on those videos.&lt;/p&gt;
&lt;h3 id=&#34;so-many-videos&#34;&gt;So many videos!&lt;/h3&gt;
&lt;p&gt;YouTube is currently experiencing a glut of uploads and content—​with over 400 hours of video uploaded each minute&lt;sup&gt;&lt;a href=&#34;#footnotes&#34;&gt;2&lt;/a&gt;&lt;/sup&gt;—​and it can be difficult to have a video pick up traction within this never-ending barrage of uploads. While most of the videos you may see on YouTube have view counts ranging from hundreds of thousands to millions, the average view count for videos in the tech sector is just around 6,500—​and even this is much higher than the median view counts.&lt;/p&gt;
&lt;p&gt;Many videos uploaded to the service do not utilize techniques to maximize the odds of their video being suggested to viewers, so more and more videos don’t break into the double digits of views.&lt;/p&gt;
&lt;h3 id=&#34;titles-descriptions-tags&#34;&gt;Titles, descriptions, tags&lt;/h3&gt;
&lt;p&gt;One of the simplest things that is within your control is to optimize wording in your titles, descriptions, and tags to ensure your video comes up in search engine results or suggested videos.&lt;/p&gt;
&lt;p&gt;For example, for a Liquid Galaxy presentation video you may title it “Amazing New Presentation on Liquid Galaxy Video Installation” as opposed to simply “Liquid Galaxy Video”, as this title will pull in any searches for the words New, Amazing, Installation, or Video, words much more likely to come up in a search than Liquid or Galaxy.&lt;/p&gt;
&lt;p&gt;However, this does not mean you should resort to tagging your video with hundreds of keywords in an attempt to optimize search results. People will respond negatively if they feel tricked into watching your video, and YouTube has developed safeguards against videos with hundreds of unique tags.&lt;/p&gt;
&lt;h3 id=&#34;watch-times&#34;&gt;Watch times&lt;/h3&gt;
&lt;p&gt;Another way to ensure your video remains relevant is to maintain strong watch times. A video with millions of views due to a clickbait thumbnail or title may get many views, but its viewer rating and watch time will more than likely be lower than a video which is genuinely interesting or well put-together, and YouTube’s algorithms will not tag it as something relevant to most people’s interests. This is known as view velocity&lt;sup&gt;&lt;a href=&#34;#footnotes&#34;&gt;3&lt;/a&gt;&lt;/sup&gt;. Videos with high watch times will be recommended to more people by the algorithm, and subsequently videos with high view rates also garner attention and more recommendations by the algorithm.&lt;/p&gt;
&lt;h3 id=&#34;playlists&#34;&gt;Playlists&lt;/h3&gt;
&lt;p&gt;One last common but helpful technique is to keep your videos in a playlist. Playlists ensure that your videos play sequentially and increase the odds of multiple videos across one channel being watched. Think of how easy it is for you to watch multiple episodes of your favorite show on Netflix or Hulu as they play one after the other with no input from you. This same technique can be used by you or your company to increase views across your company’s channel.&lt;/p&gt;
&lt;p&gt;With these simple tips you and your company can increase watch time, retention rates, and views on the products and advertisements you or your marketing team are working to produce. Soon, you may even find yourself on the fabled “trending” page!&lt;/p&gt;
&lt;hr&gt;
&lt;div id=&#34;footnotes&#34;&gt;&lt;/div&gt;
&lt;p&gt;[1] Some examples of recent YouTube news:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://medium.com/@jamesbridle/something-is-wrong-on-the-internet-c39c471271d2&#34;&gt;Something is wrong on the internet by James Bridle&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;http://variety.com/2017/digital/news/att-youtube-advertising-terrorism-hate-videos-1202014165/&#34;&gt;AT&amp;amp;T, Verizon Suspend YouTube Ads Over Hate-Speech Videos by Todd Spangler&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;http://money.cnn.com/2018/01/02/technology/logan-paul-youtube-response/index.html&#34;&gt;YouTube says Logan Paul video violated its policies by Kaya Yurieff&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;[2] &lt;a href=&#34;https://creatoracademy.youtube.com/page/lesson/discovery?hl=en-GB#yt-creators-strategies-1&#34;&gt;YouTube Creators: Search and discovery on YouTube&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;[3] &lt;a href=&#34;http://www.tubefilter.com/2016/06/23/reverse-engineering-youtube-algorithm/&#34;&gt;Reverse Engineering the YouTube Algorithm&lt;/a&gt;&lt;/p&gt;

      </content>
    </entry>
  
    <entry>
      <title>End Point Liquid Galaxy at GEOINT Symposium</title>
      <link rel="alternate" href="https://www.endpointdev.com/blog/2017/05/end-point-liquid-galaxy-at-geoint/"/>
      <id>https://www.endpointdev.com/blog/2017/05/end-point-liquid-galaxy-at-geoint/</id>
      <published>2017-05-22T00:00:00+00:00</published>
      <author>
        <name>Ben Witten</name>
      </author>
      <content type="html">
        &lt;div class=&#34;separator&#34; style=&#34;clear: both; text-align: center;&#34;&gt;&lt;a href=&#34;/blog/2017/05/end-point-liquid-galaxy-at-geoint/image-0-big.jpeg&#34; imageanchor=&#34;1&#34; style=&#34;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&#34;&gt;&lt;img border=&#34;0&#34; height=&#34;237&#34; src=&#34;/blog/2017/05/end-point-liquid-galaxy-at-geoint/image-0.jpeg&#34; width=&#34;400&#34;/&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href=&#34;https://www.visionport.com/&#34;&gt;End Point Liquid Galaxy&lt;/a&gt; will be coming to San Antonio to participate in GEOINT 2017 Symposium. We are excited to demonstrate our geospatial capabilities on an immersive and panoramic 7 screen Liquid Galaxy system. We will be exhibiting at booth #1012 from June 4-7.&lt;/p&gt;
&lt;p&gt;On the Liquid Galaxy, complex data sets can be explored and analyzed in a 3D immersive fly-through environment.  Presentations can highlight specific data layers combined with video, 3D models, and browsers for maximum communications efficiency. The end result is a rich, highly immersive, and engaging way to experience your data.&lt;/p&gt;
&lt;p&gt;Liquid Galaxy’s extensive capabilities include ArcGIS, Cesium, Google Maps, Google Earth, LIDAR point clouds, realtime data integration, 360 panoramic video, and more. The system always draws huge crowds at conferences; people line up to try out the system for themselves.&lt;/p&gt;
&lt;p&gt;End Point has deployed Liquid Galaxy systems around the world. This includes many high profile clients, such as Google, NOAA, CBRE, National Air &amp;amp; Space Museum, Hyundai, and Barclays. Our clients utilize our content management system to create immersive and interactive presentations that tell engaging stories to their users.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://geoint2017.com/&#34;&gt;GEOINT&lt;/a&gt; is hosted and produced by the United States Geospatial Intelligence Foundation (USGIF). It is the nation’s largest gathering of industry, academia, and government to include Defense, Intelligence and Homeland Security communities as well as commercial, Fed/Civil, State and Local geospatial intelligence stakeholders.&lt;/p&gt;
&lt;p&gt;We look forward to meeting you at booth #1012 at GEOINT. In the meantime, if you have any questions please visit &lt;a href=&#34;https://www.visionport.com/&#34;&gt;our Liquid Galaxy website&lt;/a&gt;!&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;/blog/2017/05/end-point-liquid-galaxy-at-geoint/image-1-big.png&#34; imageanchor=&#34;1&#34;&gt;&lt;img border=&#34;0&#34; height=&#34;640&#34; src=&#34;/blog/2017/05/end-point-liquid-galaxy-at-geoint/image-1.png&#34; width=&#34;495&#34;/&gt;&lt;/a&gt;&lt;/p&gt;

      </content>
    </entry>
  
    <entry>
      <title>360° Panoramic Video on Liquid Galaxy</title>
      <link rel="alternate" href="https://www.endpointdev.com/blog/2017/03/360-panoramic-video-on-liquid-galaxy/"/>
      <id>https://www.endpointdev.com/blog/2017/03/360-panoramic-video-on-liquid-galaxy/</id>
      <published>2017-03-06T00:00:00+00:00</published>
      <author>
        <name>Ben Witten</name>
      </author>
      <content type="html">
        &lt;iframe allowfullscreen=&#34;&#34; frameborder=&#34;0&#34; height=&#34;338&#34; src=&#34;https://www.youtube.com/embed/WEeobp-xQ2w&#34; width=&#34;600&#34;&gt;&lt;/iframe&gt;
&lt;p&gt;End Point’s &lt;a href=&#34;https://www.visionport.com/&#34;&gt;Liquid Galaxy&lt;/a&gt; recently had an exciting breakthrough! We can now show 360° panoramic video effectively and seamlessly on our Liquid Galaxy systems.&lt;/p&gt;
&lt;div class=&#34;separator&#34; style=&#34;clear: both; text-align: center;&#34;&gt;&lt;a href=&#34;/blog/2017/03/360-panoramic-video-on-liquid-galaxy/image-0-big.jpeg&#34; imageanchor=&#34;1&#34; style=&#34;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&#34;&gt;&lt;img border=&#34;0&#34; height=&#34;154&#34; src=&#34;/blog/2017/03/360-panoramic-video-on-liquid-galaxy/image-0.jpeg&#34; width=&#34;200&#34;/&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;Since our integration of seamless 360° panovideo, our marketing and content teams have been loading up our system with the best 360° panoramic videos. The Liquid Galaxy system at our headquarter office has 360° panoramic videos from National Geographic, The New York Times, Google Spotlight, gaming videos, and more.&lt;/p&gt;
&lt;div class=&#34;separator&#34; style=&#34;clear: both; text-align: center;&#34;&gt;&lt;a href=&#34;/blog/2017/03/360-panoramic-video-on-liquid-galaxy/image-1-big.png&#34; imageanchor=&#34;1&#34; style=&#34;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&#34;&gt;&lt;img border=&#34;0&#34; height=&#34;186&#34; src=&#34;/blog/2017/03/360-panoramic-video-on-liquid-galaxy/image-1.png&#34; width=&#34;320&#34;/&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;The technical challenge with panoramic video is to get multiple instances of the video player app to work in sync.  On the Liquid Galaxy, you&amp;rsquo;re actually seeing 7 different video player apps all running at the same time and playing the same video file, but with each app showing a slightly adjusted slice of the 360° panoramic video.  This synchronization and angle-adjustment is at the heart of the Liquid Galaxy platform, and allows a high-resolution experience and surrounding immersion that doesn&amp;rsquo;t happen on any other video wall system.&lt;/p&gt;
&lt;p&gt;We anticipate that our flawless 360° panoramic video will resonate with many industries, one of whom is the gaming industry. Below we’ve included a video of 360° gaming videos, and how they appear on Liquid Galaxy. Mixed with all the other exciting capabilities on Liquid Galaxy, we anticipate the ability to view angle-adjusted and 3D-immersive 360° video on the system will be a huge crowd-pleaser.&lt;/p&gt;
&lt;p&gt;If you are interested in learning more about 360° panoramic video on Liquid Galaxy, don’t hesitate to &lt;a href=&#34;https://www.visionport.com/contact/&#34;&gt;contact us&lt;/a&gt;!&lt;/p&gt;
&lt;iframe allowfullscreen=&#34;&#34; frameborder=&#34;0&#34; height=&#34;338&#34; src=&#34;https://www.youtube.com/embed/fBebOqPW304&#34; width=&#34;600&#34;&gt;&lt;/iframe&gt;

      </content>
    </entry>
  
    <entry>
      <title>Showing Your Client Measurable Progress with Video Updates</title>
      <link rel="alternate" href="https://www.endpointdev.com/blog/2016/07/showing-your-client-measurable-progress/"/>
      <id>https://www.endpointdev.com/blog/2016/07/showing-your-client-measurable-progress/</id>
      <published>2016-07-28T00:00:00+00:00</published>
      <author>
        <name>Elizabeth Garrett Christensen</name>
      </author>
      <content type="html">
        &lt;p&gt;I’ve recently started working on a big new fancy project—​the kind everyone dreams of—​a nice budget, a great client, and lots of fun stuff to dig into. I happened to stumble on a fun and easy way to get a client a weekly update on progress, &lt;strong&gt;Videos&lt;/strong&gt;!&lt;/p&gt;
&lt;div class=&#34;separator&#34; style=&#34;clear: both; text-align: center;&#34;&gt;&lt;a href=&#34;/blog/2016/07/showing-your-client-measurable-progress/image-0-big.png&#34; imageanchor=&#34;1&#34; style=&#34;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&#34;&gt;&lt;img border=&#34;0&#34; height=&#34;320&#34; src=&#34;/blog/2016/07/showing-your-client-measurable-progress/image-0.png&#34; width=&#34;214&#34;/&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;I used Google Chrome’s &lt;a href=&#34;https://www.screencastify.com/&#34;&gt;Screencastify&lt;/a&gt; app to capture my screen along with a vocal narrative to give the client a visual update of what we have accomplished so far this week. I have been using Screencastify Lite and was really happy with the end product. Combined with Google’s &lt;a href=&#34;https://web.archive.org/web/20161123060437/https://developers.google.com/web/tools/chrome-devtools/device-mode/?hl=en&#34;&gt;developer tools device mode&lt;/a&gt; you can toggle between the site’s full screen or mobile view.&lt;/p&gt;
&lt;p&gt;This is a great tool to show a client some measurable progress without going through the pain of showing them an unfinished site, letting them dig into lots of broken links, and having them inevitably stumble on more questions than answers. Plus, your client can digest the content you’ve shown them, avoid the hassle of scheduling a face to face demo, and allow them some time to compose their feedback.&lt;/p&gt;
&lt;p&gt;Next time you need an easy fast way to show progress on a project, try a video!&lt;/p&gt;

      </content>
    </entry>
  
    <entry>
      <title>Creating a video player with time markers — step by step</title>
      <link rel="alternate" href="https://www.endpointdev.com/blog/2016/03/creating-video-player-with-time-markers/"/>
      <id>https://www.endpointdev.com/blog/2016/03/creating-video-player-with-time-markers/</id>
      <published>2016-03-17T00:00:00+00:00</published>
      <author>
        <name>Piotr Hankiewicz</name>
      </author>
      <content type="html">
        &lt;h3 id=&#34;introduction&#34;&gt;Introduction&lt;/h3&gt;
&lt;p&gt;Today we will show you how to create a video player with time markers using JavaScript and HTML5 only. Libraries that we will use are proven to be stable enough for production projects. What we want to achieve? The final result is visible below:&lt;/p&gt;
&lt;div class=&#34;separator&#34; style=&#34;clear: both; text-align: center;&#34;&gt;&lt;a href=&#34;/blog/2016/03/creating-video-player-with-time-markers/image-0.png&#34; imageanchor=&#34;1&#34; style=&#34;margin-left: 1em; margin-right: 1em;&#34;&gt;&lt;img border=&#34;0&#34; src=&#34;/blog/2016/03/creating-video-player-with-time-markers/image-0.png&#34;/&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;To simplify (or to make it harder for some of you :)) this tutorial we won’t use any package management tools. The demo is available on Github here: &lt;a href=&#34;https://github.com/peter-hank/video-with-markers&#34;&gt;https://github.com/peter-hank/video-with-markers&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&#34;requirements&#34;&gt;Requirements&lt;/h3&gt;
&lt;p&gt;We will need some libraries (all of these are free to use in commercial projects):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Video.js — &lt;a href=&#34;https://github.com/videojs/video.js&#34;&gt;https://github.com/videojs/video.js&lt;/a&gt;,&lt;/li&gt;
&lt;li&gt;Videojs-markers plugin — &lt;a href=&#34;https://github.com/spchuang/videojs-markers&#34;&gt;https://github.com/spchuang/videojs-markers&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;jQuery — &lt;a href=&#34;http://code.jquery.com/jquery-2.0.3.min.js&#34;&gt;http://code.jquery.com/jquery-2.0.3.min.js&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Sample video file — &lt;a href=&#34;http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4&#34;&gt;http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;step-1--creating-a-project-skeleton&#34;&gt;Step 1 — creating a project skeleton&lt;/h3&gt;
&lt;p&gt;Let’s create a new folder for our project and call it video-with-markers. Inside let’s create a new file called “index.html”, three folders: “css”, “js” and “var”.&lt;/p&gt;
&lt;p&gt;We also need to copy libraries files and put it into a proper directory:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;copy &lt;a href=&#34;https://raw.githubusercontent.com/spchuang/videojs-markers/master/dist/videojs-markers.min.js&#34;&gt;https://raw.githubusercontent.com/spchuang/videojs-markers/master/dist/videojs-markers.min.js&lt;/a&gt; -&amp;gt; “js” directory,&lt;/li&gt;
&lt;li&gt;copy &lt;a href=&#34;http://vjs.zencdn.net/5.0/video.min.js&#34;&gt;http://vjs.zencdn.net/5.0/video.min.js&lt;/a&gt; -&amp;gt; “js” directory,&lt;/li&gt;
&lt;li&gt;copy &lt;a href=&#34;https://raw.githubusercontent.com/spchuang/videojs-markers/master/dist/videojs.markers.min.css&#34;&gt;https://raw.githubusercontent.com/spchuang/videojs-markers/master/dist/videojs.markers.min.css&lt;/a&gt; -&amp;gt; “css” directory,&lt;/li&gt;
&lt;li&gt;copy &lt;a href=&#34;http://vjs.zencdn.net/5.0/video-js.min.css&#34;&gt;http://vjs.zencdn.net/5.0/video-js.min.css&lt;/a&gt; -&amp;gt; “css” directory.&lt;/li&gt;
&lt;li&gt;copy &lt;a href=&#34;http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4&#34;&gt;http://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4&lt;/a&gt; -&amp;gt; “var” directory.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Let’s open the index.html file and fill it with some basic structure, that will include libraries files too.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#c00;font-weight:bold&#34;&gt;&amp;lt;!doctype html&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;html&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;head&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;meta&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;charset&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;utf-8&amp;#34;&lt;/span&gt;/&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;meta&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;http-equiv&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;x-ua-compatible&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;content&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;ie=edge&amp;#34;&lt;/span&gt;/&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;title&lt;/span&gt;&amp;gt;Video with markers&amp;lt;/&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;title&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;meta&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;name&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;description&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;content&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;/&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;meta&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;name&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;viewport&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;content&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;width=device-width, initial-scale=1&amp;#34;&lt;/span&gt;/&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;link&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;rel&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;stylesheet&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;href&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;css/video-js.min.css&amp;#34;&lt;/span&gt;/&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;link&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;rel&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;stylesheet&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;href&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;css/videojs.markers.min.css&amp;#34;&lt;/span&gt;/&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;script&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;src&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;js/jquery-2.0.3.min.js&amp;#34;&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;script&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;script&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;src&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;js/video.min.js&amp;#34;&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;script&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;script&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;src&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;js/videojs-markers.min.js&amp;#34;&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;script&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;/&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;head&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;body&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;/&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;body&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;/&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;html&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h3 id=&#34;step-2--activating-player-and-creating-markers&#34;&gt;Step 2 — activating player and creating markers&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;TIP: all the further code should be put inside the body tag.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;First, we need to create a video tag:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;video&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;autoplay&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;class&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;video-js vjs-default-skin&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;controls&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;data-setup&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;{&amp;#34;width&amp;#34;: 640, &amp;#34;height&amp;#34;: 360}&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;height&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;360&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;id&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;example_video_1&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;preload&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;auto&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;width&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;640&amp;#34;&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;source&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;src&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;var/BigBuckBunny_320x180.mp4&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;type&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;video/mp4&amp;#34;&lt;/span&gt;/&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &amp;lt;/&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;video&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;We need to set an element “id” attribute and both classes “video-js vjs-default-skin” to let player CSS apply. Other attributes are not required and are here just for demo purpose. “Data-setup” attribute is an attribute that configures multiple player options. More details can be found in the documentation here: &lt;a href=&#34;http://docs.videojs.com/docs/guides/options.html&#34;&gt;http://docs.videojs.com/docs/guides/options.html&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;At this point after launching index.html in a browser we should see a video player like this:&lt;/p&gt;
&lt;div class=&#34;separator&#34; style=&#34;clear: both; text-align: center;&#34;&gt;&lt;a href=&#34;/blog/2016/03/creating-video-player-with-time-markers/image-1.png&#34; imageanchor=&#34;1&#34; style=&#34;margin-left: 1em; margin-right: 1em;&#34;&gt;&lt;img border=&#34;0&#34; src=&#34;/blog/2016/03/creating-video-player-with-time-markers/image-1.png&#34;/&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;The only thing left is initializing markers. We can do this by adding some JavaScript code under the video player element:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#888&#34;&gt;// load video object
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#888&#34;&gt;&lt;/span&gt; &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; video = videojs(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;example_video_1&amp;#39;&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#888&#34;&gt;//load markers
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#888&#34;&gt;&lt;/span&gt; video.markers({
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    markers: [
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        {time: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;9.5&lt;/span&gt;, text: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;this&amp;#34;&lt;/span&gt;},
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        {time: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;16&lt;/span&gt;,  text: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;is&amp;#34;&lt;/span&gt;},
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        {time: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;23.6&lt;/span&gt;,text: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;so&amp;#34;&lt;/span&gt;},
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        {time: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;28&lt;/span&gt;,  text: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;cool&amp;#34;&lt;/span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    ];
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; });&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;In this part we load an object of the Video.js player to video variable and then load a list of markers. Each marker object includes time in seconds when it should be shown and marker text.&lt;/p&gt;
&lt;p&gt;Now, markers should be visible like on my this image and markers text will be visible after pointing at it:&lt;/p&gt;
&lt;div class=&#34;separator&#34; style=&#34;clear: both; text-align: center;&#34;&gt;&lt;a href=&#34;/blog/2016/03/creating-video-player-with-time-markers/image-2.jpeg&#34; imageanchor=&#34;1&#34; style=&#34;margin-left: 1em; margin-right: 1em;&#34;&gt;&lt;img border=&#34;0&#34; src=&#34;/blog/2016/03/creating-video-player-with-time-markers/image-2.jpeg&#34;/&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;It needs some additional CSS styling to achieve a result like on the first image but it’s not much work.&lt;/p&gt;
&lt;h3 id=&#34;the-end&#34;&gt;The end&lt;/h3&gt;
&lt;p&gt;Almost the end. There are many more Video.js plugins ready to use, for example:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;videojs-HDtoggle — button which toggles between HD and non-HD source,&lt;/li&gt;
&lt;li&gt;videojs-playlist — plays videos continuously or by selecting them,&lt;/li&gt;
&lt;li&gt;videojs-watermark — displays a watermark on top of the video.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With not much effort most of video player functionalities can be finalized. There is always some tweaking, but at least you can have a base for creating your project. And remember, if you will find bugs, report it! And if you have implemented something cool, share it!&lt;/p&gt;
&lt;p&gt;Thanks for reading.&lt;/p&gt;

      </content>
    </entry>
  
    <entry>
      <title>Full Screen Gallery with Supersized and video slides</title>
      <link rel="alternate" href="https://www.endpointdev.com/blog/2016/01/full-screen-gallery-with-supersized-and/"/>
      <id>https://www.endpointdev.com/blog/2016/01/full-screen-gallery-with-supersized-and/</id>
      <published>2016-01-26T00:00:00+00:00</published>
      <author>
        <name>Marina Lohova</name>
      </author>
      <content type="html">
        &lt;p&gt;I was recently looking to build a full screen image and video gallery for our client &lt;a href=&#34;https://mission-blue.org/&#34;&gt;Mission Blue&lt;/a&gt;. Something similar to the Google Maps interface you can see in the screenshot below:&lt;/p&gt;
&lt;div class=&#34;separator&#34; style=&#34;clear: both; text-align: center;&#34;&gt;    &lt;a href=&#34;/blog/2016/01/full-screen-gallery-with-supersized-and/image-0-big.png&#34; imageanchor=&#34;1&#34; style=&#34;margin-left: 1em; margin-right: 1em;&#34;&gt;       &lt;img border=&#34;0&#34; src=&#34;/blog/2016/01/full-screen-gallery-with-supersized-and/image-0.png&#34; width=&#34;600&#34;/&gt;     &lt;/a&gt;   &lt;/div&gt;
&lt;p&gt;After scouring the Internet to find a suitable jQuery plugin I finally decided on &lt;a href=&#34;https://web.archive.org/web/20170629183603/http://buildinternet.com/2009/05/supersized-20-full-screen-imagebackground-slideshow-jquery-plugin-w-transitions-and-controls/&#34;&gt;Supersized, Full screen background slideshow plugin for jQuery&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;After downloading the library, include it on the page:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;link&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;href&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;/wp-content/plugins/wp-supersized/theme/supersized.shutter.css?ver=4.2.2&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;id&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;supersized_theme_css-css&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;media&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;all&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;rel&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;stylesheet&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;type&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;text/css&amp;#34;&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;link&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;script&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;src&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;/wp-includes/js/jquery/ui/effect.min.js?ver=1.11.4&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;type&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;text/javascript&amp;#34;&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;script&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;script&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;src&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;/wp-content/plugins/wp-supersized/js/jquery.easing.min.js?ver=1.3&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;type&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;text/javascript&amp;#34;&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;script&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;script&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;src&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;/wp-content/plugins/wp-supersized/js/jquery.easing.compatibility.js?ver=1.0&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;type&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;text/javascript&amp;#34;&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;script&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;script&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;src&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;/wp-content/plugins/wp-supersized/js/jquery.animate-enhanced.min.js?ver=0.75&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;type&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;text/javascript&amp;#34;&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;script&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;script&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;type&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;text/javascript&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;src&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;/wp-content/plugins/wp-supersized/js/supersized.3.2.7.min.js?ver=3.2.7&amp;#39;&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;script&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h3 id=&#34;basic-functionality&#34;&gt;Basic functionality&lt;/h3&gt;
&lt;p&gt;Let’s create a variable that will hold all the images in the slideshow:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; images = [];
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;images.push({
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  type: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;IMAGE&amp;#39;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  image: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;img1.jpg&amp;#39;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  title: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;Image 1&amp;#39;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  thumb: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;img1_thumb.jpg&amp;#39;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  url: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;https://www.endpointdev.com&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;});
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;images.push({
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  type: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;YOUTUBE&amp;#39;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  image: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;screenshot1.jpg&amp;#39;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  title: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;YouTube slide&amp;#39;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  videoid: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;abc12345678&amp;#39;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  thumb: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;screenshot1_thumb.jpg&amp;#39;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  url: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;https://www.youtube.com/watch?v=abc12345678&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;});&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Let’s initialize Supersized:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;jQuery.supersized({
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  slideshow: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;1&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  autoplay: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;0&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  min_width: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;0&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  min_height: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;0&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  vertical_center: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;1&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  horizontal_center: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;1&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  fit_always: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;0&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  fit_portrait: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;1&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  fit_landscape: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;0&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  slide_links: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;blank&amp;#39;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  thumb_links: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;1&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  thumbnail_navigation: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;1&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  slides: images,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  mouse_scrub: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;});&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h3 id=&#34;customizing-the-toolbar&#34;&gt;Customizing the toolbar&lt;/h3&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;div&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;id&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;thumb-tray&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;class&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;load-item&amp;#34;&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;div&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;id&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;thumb-back&amp;#34;&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;div&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;div&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;id&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;thumb-forward&amp;#34;&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;div&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;/&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;div&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;div&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;id&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;slidecaption&amp;#34;&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;div&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h3 id=&#34;customizing-the-screen-image-size&#34;&gt;Customizing the screen image size&lt;/h3&gt;
&lt;p&gt;I didn’t want to have the full screen image as it was a little overwhelming for the user. I wanted the black bars just like in the Google interface. Supersized allows for easy customization. This CSS did the trick:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-css&#34; data-lang=&#34;css&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;#&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;supersized&lt;/span&gt;, #&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;supersized&lt;/span&gt; &lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;li&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;width&lt;/span&gt;: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;70&lt;/span&gt;&lt;span style=&#34;color:#888;font-weight:bold&#34;&gt;%&lt;/span&gt; &lt;span style=&#34;color:#c00;font-weight:bold&#34;&gt;!important&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;left&lt;/span&gt;: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;0&lt;/span&gt; &lt;span style=&#34;color:#c00;font-weight:bold&#34;&gt;!important&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;right&lt;/span&gt;: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;0&lt;/span&gt; &lt;span style=&#34;color:#c00;font-weight:bold&#34;&gt;!important&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;top&lt;/span&gt;: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;1&lt;/span&gt;&lt;span style=&#34;color:#888;font-weight:bold&#34;&gt;px&lt;/span&gt; &lt;span style=&#34;color:#c00;font-weight:bold&#34;&gt;!important&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;margin&lt;/span&gt;:&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;auto&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h3 id=&#34;introducing-video-youtube-slides&#34;&gt;Introducing video (YouTube) slides&lt;/h3&gt;
&lt;p&gt;First, I added the Youtube API:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;script&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;type&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;text/javascript&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;src&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;https://www.youtube.com/iframe_api&amp;#34;&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;script&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Then I added a couple of CSS styles:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-css&#34; data-lang=&#34;css&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;#&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;supersized&lt;/span&gt; .&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;player&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;margin&lt;/span&gt;: &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;auto&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;display&lt;/span&gt;: &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;block&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Finally, I went into the Supersized library source and modified it. To allow for the video slides to appear, I added the new condition and the slide type &amp;lsquo;YOUTUBE&amp;rsquo;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;base._renderSlide = &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;function&lt;/span&gt;(loadPrev, options) {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; linkTarget = base.options.new_window ? &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39; target=&amp;#34;_blank&amp;#34;&amp;#39;&lt;/span&gt; : &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;&amp;#39;&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; imageLink = (base.options.slides[loadPrev].url) ? &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;href=&amp;#39;&amp;#34;&lt;/span&gt; + base.options.slides[loadPrev].url + &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;&amp;#39;&amp;#34;&lt;/span&gt; : &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; slidePrev = base.el + &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39; li:eq(&amp;#39;&lt;/span&gt; + loadPrev + &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;)&amp;#39;&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; imgPrev = $(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;&amp;lt;img src=&amp;#34;&amp;#39;&lt;/span&gt; + base.options.slides[loadPrev].image + &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;&amp;#34;/&amp;gt;&amp;#39;&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;if&lt;/span&gt; (base.options.slides[loadPrev].type == &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;YOUTUBE&amp;#39;&lt;/span&gt;) {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    imgPrev.load(&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;function&lt;/span&gt; () {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; video = $(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;&amp;lt;div class=&amp;#34;player&amp;#34; id=&amp;#34;player&amp;#39;&lt;/span&gt;+ base.options.slides[loadPrev].videoid + &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;&amp;#34;&amp;gt;&amp;lt;/div&amp;gt;&amp;#39;&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      video.appendTo(slidePrev);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; player = &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;new&lt;/span&gt; YT.Player(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;player&amp;#39;&lt;/span&gt; + base.options.slides[loadPrev].videoid, {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        height: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;390&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        width: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;640&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        videoId: base.options.slides[loadPrev].videoid
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      });
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    });&lt;span style=&#34;color:#888&#34;&gt;// End Load
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#888&#34;&gt;&lt;/span&gt;  }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;else&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    imgPrev.appendTo(slidePrev).wrap(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;&amp;lt;a &amp;#39;&lt;/span&gt; + imageLink + linkTarget + &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;&amp;gt;&amp;lt;/a&amp;gt;&amp;#39;&lt;/span&gt;).parent().parent().addClass(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;image-loading &amp;#39;&lt;/span&gt; + options[&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;class&amp;#39;&lt;/span&gt;]);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    imgPrev.load(&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;function&lt;/span&gt; () {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      $(&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;this&lt;/span&gt;).data(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;origWidth&amp;#39;&lt;/span&gt;, $(&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;this&lt;/span&gt;).width()).data(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;origHeight&amp;#39;&lt;/span&gt;, $(&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;this&lt;/span&gt;).height());
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      base.resizeNow();&lt;span style=&#34;color:#888&#34;&gt;// Resize background image
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#888&#34;&gt;&lt;/span&gt;    });&lt;span style=&#34;color:#888&#34;&gt;// End Load
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#888&#34;&gt;&lt;/span&gt;  }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;};&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h3 id=&#34;final-result&#34;&gt;Final Result&lt;/h3&gt;
&lt;p&gt;This is how gallery looks with the customizations:&lt;/p&gt;
&lt;div class=&#34;separator&#34; style=&#34;clear: both; text-align: center;&#34;&gt;  &lt;a href=&#34;/blog/2016/01/full-screen-gallery-with-supersized-and/image-1-big.png&#34; imageanchor=&#34;1&#34; style=&#34;margin-left: 1em; margin-right: 1em;&#34;&gt;     &lt;img border=&#34;0&#34; src=&#34;/blog/2016/01/full-screen-gallery-with-supersized-and/image-1.png&#34; width=&#34;600&#34;/&gt;   &lt;/a&gt; &lt;/div&gt;
&lt;p&gt;This is what a video slide looks like:&lt;/p&gt;
&lt;div class=&#34;separator&#34; style=&#34;clear: both; text-align: center;&#34;&gt;  &lt;a href=&#34;/blog/2016/01/full-screen-gallery-with-supersized-and/image-2-big.png&#34; imageanchor=&#34;1&#34; style=&#34;margin-left: 1em; margin-right: 1em;&#34;&gt;     &lt;img border=&#34;0&#34; src=&#34;/blog/2016/01/full-screen-gallery-with-supersized-and/image-2.png&#34;/&gt;   &lt;/a&gt; &lt;/div&gt;
&lt;p&gt;Hope you found this writeup useful!&lt;/p&gt;

      </content>
    </entry>
  
    <entry>
      <title>How To: Big Beautiful Background Video</title>
      <link rel="alternate" href="https://www.endpointdev.com/blog/2015/08/how-to-big-beautiful-background-video/"/>
      <id>https://www.endpointdev.com/blog/2015/08/how-to-big-beautiful-background-video/</id>
      <published>2015-08-04T00:00:00+00:00</published>
      <author>
        <name>Marina Lohova</name>
      </author>
      <content type="html">
        &lt;p&gt;One pretty common request for every web developer is to “please, make our Stone age website look sleek and modern”. Well, no more head scratching about the meaning of “sleek” or “modern” (or “the Stone age” for some?). In times of the crisp and stunning visuals there’s no better way to make an impression than to use a big beautiful background video on the home page.&lt;/p&gt;
&lt;p&gt;Paired with some impressive infinite scroll which I already &lt;a href=&#34;/blog/2013/11/pagination-days-are-over-infinite/&#34;&gt;covered here&lt;/a&gt; and a nice full-screen image gallery (which I will cover later), it will definitely help to bring your website up to date.&lt;/p&gt;
&lt;p&gt;Lucky for us, there is a very popular library called &lt;a href=&#34;http://dfcb.github.io/BigVideo.js/&#34;&gt;BigVideo.js&lt;/a&gt; which is based on another well known library &lt;a href=&#34;http://www.videojs.com/&#34;&gt;videojs&lt;/a&gt;, which is a wrapper around HTML5 &amp;lt;video&amp;gt; tag.&lt;/p&gt;
&lt;h3 id=&#34;converting-the-video&#34;&gt;Converting the video.&lt;/h3&gt;
&lt;p&gt;To ensure the cross browser support, it’s best to supply the desired video in several formats. The most common formats to use are &lt;a href=&#34;https://en.wikipedia.org/wiki/H.264/MPEG-4_AVC&#34;&gt;mp4&lt;/a&gt;, &lt;a href=&#34;https://en.wikipedia.org/wiki/Ogg&#34;&gt;ogg&lt;/a&gt; and &lt;a href=&#34;https://en.wikipedia.org/wiki/WebM&#34;&gt;webm&lt;/a&gt;. Here is &lt;a href=&#34;https://en.wikipedia.org/wiki/HTML5_video#Browser_support&#34;&gt;the browser support chart&lt;/a&gt; to give you a better idea of why it’s so important to use more than one format on your page.&lt;/p&gt;
&lt;p&gt;There are a lot of ways to convert the file, but since I’m not particularly good with compression settings or codecs, I’m using the following easy workflow:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Upload the video to Vimeo or YouTube.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There is even a handy “Share” setting straight from Final Cut for us, Apple users.&lt;/p&gt;
&lt;div class=&#34;separator&#34; style=&#34;clear: both; text-align: center;&#34;&gt;&lt;a href=&#34;/blog/2015/08/how-to-big-beautiful-background-video/image-0-big.png&#34; imageanchor=&#34;1&#34; style=&#34;margin-left: 1em; margin-right: 1em;&#34;&gt;&lt;img border=&#34;0&#34; height=&#34;284&#34; src=&#34;/blog/2015/08/how-to-big-beautiful-background-video/image-0.png&#34; width=&#34;500&#34;/&gt;&lt;/a&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Go to Vimeo/YouTube and download it from there.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This way I’m leveraging these web services’ optimized and perfected compressing algorithms for web and also getting the smallest file size possible without too much quality loss. The target file should ideally be less than 3MB, otherwise it will slow down your browser, especially Firefox with Firebug installed.&lt;/p&gt;
&lt;div class=&#34;separator&#34; style=&#34;clear: both; text-align: center;&#34;&gt;&lt;a href=&#34;/blog/2015/08/how-to-big-beautiful-background-video/image-1-big.png&#34; imageanchor=&#34;1&#34; style=&#34;margin-left: 1em; margin-right: 1em;&#34;&gt;&lt;img border=&#34;0&#34; height=&#34;332&#34; src=&#34;/blog/2015/08/how-to-big-beautiful-background-video/image-1.png&#34; width=&#34;500&#34;/&gt;&lt;/a&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;The last step is to generate webm and ogg with &lt;a href=&#34;http://firefogg.org/make/index.html&#34;&gt;Firefogg&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&#34;separator&#34; style=&#34;clear: both; text-align: center;&#34;&gt;&lt;a href=&#34;/blog/2015/08/how-to-big-beautiful-background-video/image-2-big.png&#34; imageanchor=&#34;1&#34; style=&#34;margin-left: 1em; margin-right: 1em;&#34;&gt;&lt;img border=&#34;0&#34; height=&#34;300&#34; src=&#34;/blog/2015/08/how-to-big-beautiful-background-video/image-2.png&#34; width=&#34;500&#34;/&gt; &lt;/a&gt;&lt;/div&gt;
&lt;p&gt;You may find another process that works best for you, but this is what works for me.&lt;/p&gt;
&lt;h3 id=&#34;using-bigvideojs-to-display-video&#34;&gt;Using BigVideo.js to display video&lt;/h3&gt;
&lt;p&gt;We will need to include the libraries:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;script src=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;//vjs.zencdn.net/4.3/video.js&amp;#34;&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style=&#34;color:#a61717;background-color:#e3d2d2&#34;&gt;/script&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;script src=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;http://imagesloaded.desandro.com/imagesloaded.pkgd.min.js&amp;#34;&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style=&#34;color:#a61717;background-color:#e3d2d2&#34;&gt;/script&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;script src=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;http://dfcb.github.io/BigVideo.js/bower_components/BigVideo/lib/bigvideo.js&amp;#34;&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style=&#34;color:#a61717;background-color:#e3d2d2&#34;&gt;/script&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;And the following JavaScript:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; BV = &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;new&lt;/span&gt; $.BigVideo({
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  controls: &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;false&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  forceAutoplay: &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;true&lt;/span&gt;, 
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  container: $(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;#video&amp;#39;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;});
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;BV.init();
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;BV.show([
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  { type: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;video/webm&amp;#34;&lt;/span&gt;, src: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;http://vjs.zencdn.net/v/oceans.webm&amp;#34;&lt;/span&gt; },
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  { type: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;video/mp4&amp;#34;&lt;/span&gt;, src: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;http://vjs.zencdn.net/v/oceans.mp4&amp;#34;&lt;/span&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;], {ambient: &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;true&lt;/span&gt;});&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Please, note the “ambient:true” setting. This setting does the trick of playing the video in the background.&lt;/p&gt;
&lt;h3 id=&#34;mobile-and-tablet-support&#34;&gt;Mobile and Tablet Support&lt;/h3&gt;
&lt;p&gt;The sad truth is that the video backgrounds are not supported on touch devices, because HTML5 does not allow autoplay there. Instead there will be a “play” button underneath your content and the user will need to click on it to activate the ambient video. Not so ambient anymore, right? The best option for now is to use a full screen image instead of the video as described &lt;a href=&#34;http://dfcb.github.io/BigVideo.js/example-ambient-touch.html&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Hope you enjoyed the blog post. Let me know your thoughts!&lt;/p&gt;

      </content>
    </entry>
  
    <entry>
      <title>Streaming Live with Red5 Media Server: Two-Way</title>
      <link rel="alternate" href="https://www.endpointdev.com/blog/2013/03/streaming-live-with-red5-media/"/>
      <id>https://www.endpointdev.com/blog/2013/03/streaming-live-with-red5-media/</id>
      <published>2013-03-07T00:00:00+00:00</published>
      <author>
        <name>Marina Lohova</name>
      </author>
      <content type="html">
        &lt;p&gt;I already wrote about &lt;a href=&#34;/blog/2012/04/streaming-live-with-red5-media-server/&#34;&gt;the basics of publishing and broadcasting&lt;/a&gt; with Red5 Media Server. Let’s fast forward to the advanced topics and create a video conference now!&lt;/p&gt;
&lt;h3 id=&#34;getting-ready&#34;&gt;Getting Ready&lt;/h3&gt;
&lt;p&gt;First, a word about the technology stack: a little bit of Java6/Java EE will be used for the server-side work (Red5 is written in Java), ActionScript2/Adobe Flash CS6 will be the primary tool for the client side development, and OS X Mountain Lion is my operating system.&lt;/p&gt;
&lt;p&gt;Red5 Server comes with the set of sample applications that provide the source code for about everything you may want to achieve. The primary challenge is to unleash the power of it, since the samples fall extremely short of documentation! The &lt;strong&gt;“fitcDemo”&lt;/strong&gt; application will serve as a base for all our customization.&lt;/p&gt;
&lt;p&gt;Originally I made all the development in Red5 RC 1.0 version where fitcDemo was present. Unfortunately, when I downloaded the latest Red5 1.0.1 release yesterday it was simply not there! The source code was still in the repo, just outdated and not working. Well, I did all the work for Red5 team, so you can just download &lt;a href=&#34;https://github.com/marinalohova/red5-example/blob/master/fitcDemo/dist/fitcDemo.war&#34;&gt;fitcDemo.war&lt;/a&gt; from my repo and drop it into the &lt;strong&gt;“webapps”&lt;/strong&gt; directory of Red5 1.0.1 installation—​and you are good!&lt;/p&gt;
&lt;p&gt;You will then find the video conference demo at &lt;a href=&#34;http://localhost:5080/demos/videoConference.html&#34;&gt;http://localhost:5080/demos/videoConference.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Here is how it looks out of the box:&lt;/p&gt;
&lt;div class=&#34;separator&#34; style=&#34;clear: both; text-align: center;&#34;&gt;&lt;a href=&#34;/blog/2013/03/streaming-live-with-red5-media/image-0.jpeg&#34; imageanchor=&#34;1&#34; style=&#34;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&#34;&gt;&lt;img border=&#34;0&#34; src=&#34;/blog/2013/03/streaming-live-with-red5-media/image-0.jpeg&#34;/&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;Here is how we want it to look!&lt;/p&gt;
&lt;div class=&#34;separator&#34; style=&#34;clear: both; text-align: center;&#34;&gt;&lt;a href=&#34;/blog/2013/03/streaming-live-with-red5-media/image-1.jpeg&#34; imageanchor=&#34;1&#34; style=&#34;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&#34;&gt;&lt;img border=&#34;0&#34; src=&#34;/blog/2013/03/streaming-live-with-red5-media/image-1.jpeg&#34;/&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;The goal is to make our Red5 conference look as neat as Google Hangout.&lt;/p&gt;
&lt;h3 id=&#34;sleek-subscribers&#34;&gt;Sleek Subscribers&lt;/h3&gt;
&lt;p&gt;Default video conference has five subscribers statically positioned on the stage. It’s way more fun to have the subscribers added and removed on the fly as they connect to the server. So let’s do that! I have the complete tutorial code based on Red5 1.0.1 The final version is in my &lt;a href=&#34;https://github.com/marinalohova/red5-flash&#34;&gt;GitHub repo&lt;/a&gt;, so I will be explaining parts of it further. Open &lt;a href=&#34;https://github.com/marinalohova/red5-flash/blob/master/videoConference.fla&#34;&gt;videoConference.fla&lt;/a&gt; in Flash. I used CS6 for all the FLA/ActionScript editing in the tutorial.&lt;/p&gt;
&lt;div class=&#34;separator&#34; style=&#34;clear: both; text-align: center;&#34;&gt;&lt;a href=&#34;/blog/2013/03/streaming-live-with-red5-media/image-2.jpeg&#34; imageanchor=&#34;1&#34; style=&#34;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&#34;&gt;&lt;img border=&#34;0&#34; src=&#34;/blog/2013/03/streaming-live-with-red5-media/image-2.jpeg&#34;/&gt;&lt;/a&gt;  &lt;br/&gt;
&lt;/div&gt;
&lt;p&gt;Edit the VideoConference clip in the Library, to remove everything in it and add a ScrollPane with the following properties:&lt;/p&gt;
&lt;div class=&#34;separator&#34; style=&#34;clear: both; text-align: center;&#34;&gt;&lt;a href=&#34;/blog/2013/03/streaming-live-with-red5-media/image-3.jpeg&#34; imageanchor=&#34;1&#34; style=&#34;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&#34;&gt;&lt;img border=&#34;0&#34; src=&#34;/blog/2013/03/streaming-live-with-red5-media/image-3.jpeg&#34;/&gt;&lt;/a&gt;&lt;br/&gt;
&lt;/div&gt;
&lt;p&gt;Edit the VideoPool clip, to remove everything in it as well and drag a Broadcaster clip to the top left corner:&lt;/p&gt;
&lt;div class=&#34;separator&#34; style=&#34;clear: both; text-align: center;&#34;&gt;&lt;a href=&#34;/blog/2013/03/streaming-live-with-red5-media/image-4.jpeg&#34; imageanchor=&#34;1&#34; style=&#34;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&#34;&gt;&lt;img border=&#34;0&#34; src=&#34;/blog/2013/03/streaming-live-with-red5-media/image-4.jpeg&#34;/&gt;&lt;/a&gt;&lt;br/&gt;
&lt;/div&gt;
&lt;p&gt;Broadcaster and Subscriber clips should be modified too and have only the video component visible. You may look into the complete source code for details. Don’t forget to change the Publish Settings to &lt;strong&gt;Flash Player 8; ActionScript2&lt;/strong&gt; and publish.&lt;/p&gt;
&lt;p&gt;Modify &lt;a href=&#34;https://github.com/marinalohova/red5-flash/blob/master/classes/org/red5/samples/livestream/videoconference/Connector.as&#34;&gt;Connector.as&lt;/a&gt; to point to the Red5 server. It is important to specify the IP address of the host machine rather than just “localhost”, so other computers can join the hangout over network.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;public&lt;/span&gt; &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;static&lt;/span&gt; &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; red5URI:&lt;span style=&#34;color:#038&#34;&gt;String&lt;/span&gt; = &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;rtmp://192.168.0.5/fitcDemo&amp;#34;&lt;/span&gt;;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Make a slight change to configUI() to make it auto connect:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;public&lt;/span&gt; &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;function&lt;/span&gt; configUI():Void
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  connection  = &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;new&lt;/span&gt; Connection();
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  connection.addEventListener(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;success&amp;#34;&lt;/span&gt;, Delegate.create(&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;this&lt;/span&gt;, onComplete));
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  connection.addEventListener(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;onSetID&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;this&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  connection.addEventListener(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;newStream&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;this&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  connection.addEventListener(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;close&amp;#34;&lt;/span&gt;, Delegate.create(&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;this&lt;/span&gt;, onComplete));
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  connected = connection.connect(red5URI, getTimer());
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  dispatchEvent({type:&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;connectionChange&amp;#34;&lt;/span&gt;, connected: connected});
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;private&lt;/span&gt; &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;function&lt;/span&gt; onComplete(evtObj:&lt;span style=&#34;color:#038&#34;&gt;Object&lt;/span&gt;):Void
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  dispatchEvent({type:&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;connectionChange&amp;#34;&lt;/span&gt;, connected: evtObj.connected});
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt; }&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Get rid of all the default Subscriber variables in the class and change configUI():&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;private&lt;/span&gt; &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;function&lt;/span&gt; configUI():Void
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  subscriberList = [];
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Open &lt;a href=&#34;https://github.com/marinalohova/red5-flash/blob/master/classes/org/red5/samples/livestream/videoconference/VideoPool.as&#34;&gt;VideoPool.as&lt;/a&gt; and modify getVideoContainer() so that every subscriber will be dynamically created and positioned on stage. The row will have 4 streams with the broadcaster stream (your computer’s camera) being the first in the first row, and more rows will be created in the scroll pane to accommodate more streams.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;private&lt;/span&gt; &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;function&lt;/span&gt; getVideoContainer(p_id:&lt;span style=&#34;color:#038&#34;&gt;Number&lt;/span&gt;):Subscriber
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; d:&lt;span style=&#34;color:#038&#34;&gt;Number&lt;/span&gt; = &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;1&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;if&lt;/span&gt; (subscriberList.length &amp;gt; &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;0&lt;/span&gt;) {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    d = subscriberList[subscriberList.length - &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;1&lt;/span&gt;].getDepth() + &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;1&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; positionX:&lt;span style=&#34;color:#038&#34;&gt;Number&lt;/span&gt; = broadcaster._x + ((subscriberList.length + &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;1&lt;/span&gt;)%&lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;4&lt;/span&gt;) * broadcaster._width;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; positionY:&lt;span style=&#34;color:#038&#34;&gt;Number&lt;/span&gt; = broadcaster._y + (broadcaster._height * &lt;span style=&#34;color:#038&#34;&gt;Math&lt;/span&gt;.floor((subscriberList.length + &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;1&lt;/span&gt;)/&lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;4&lt;/span&gt;));
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  attachMovie(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;org.red5.samples.livestream.videoconference.Subscriber&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;subscriber_&amp;#34;&lt;/span&gt; + p_id, d, {_x:positionX, _y:positionY});
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; s:Subscriber = _level0.instance1.scrollPane.content[&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;subscriber_&amp;#34;&lt;/span&gt; + p_id];
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  subscriberList.push(s);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;return&lt;/span&gt; s;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The new Subscriber instance for the particular stream will be generated when subscribe() method is called.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;public&lt;/span&gt; &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;function&lt;/span&gt; subscribe(p_id:&lt;span style=&#34;color:#038&#34;&gt;Number&lt;/span&gt;):Void
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;if&lt;/span&gt;(p_id == &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;undefined&amp;#34;&lt;/span&gt; || &lt;span style=&#34;color:#038&#34;&gt;isNaN&lt;/span&gt;(p_id) || p_id == &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;) &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;return&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; s:Subscriber = getVideoContainer(p_id);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  s.subscribe(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;videoStream_&amp;#34;&lt;/span&gt; + p_id, connection);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;If the subscriber is added, at some point it may need to be removed! Add removeSubscriber() function that will delete the disconnected subscriber and reposition all the other subscribers and invalidate ScrollPane.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;public&lt;/span&gt; &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;function&lt;/span&gt; removeSubscriber(s:Subscriber): Void {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;for&lt;/span&gt;(&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; i= &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;0&lt;/span&gt;; i &amp;lt; subscriberList.length; i++) {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;if&lt;/span&gt; (Subscriber(subscriberList[i]).videoStream == s.videoStream) {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      subscriberList.removeItemAt(i);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;for&lt;/span&gt; (&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; i= &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;0&lt;/span&gt;; i &amp;lt; subscriberList.length; i++) {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; positionX:&lt;span style=&#34;color:#038&#34;&gt;Number&lt;/span&gt; = broadcaster._x + (subscriberList.length%&lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;4&lt;/span&gt;) * broadcaster._width;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; positionY:&lt;span style=&#34;color:#038&#34;&gt;Number&lt;/span&gt; = broadcaster._y + (broadcaster._height * &lt;span style=&#34;color:#038&#34;&gt;Math&lt;/span&gt;.floor(subscriberList.length/&lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;4&lt;/span&gt;));
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; mc:Subscriber = Subscriber(subscriberList[i]);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    mc._x = positionX;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    mc._y = positionY;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  s.removeMovieClip();
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  _level0.instance1.scrollPane.invalidate();
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Look into &lt;a href=&#34;https://github.com/marinalohova/red5-flash/blob/master/classes/org/red5/samples/livestream/videoconference/Subscriber.as&#34;&gt;Subscriber.as&lt;/a&gt;. When the subscriber disconnects the stream fires an &amp;ldquo;unpublishNotify&amp;rdquo; event, that eventually makes a call to the removeSubscriber() function.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;public&lt;/span&gt; &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;function&lt;/span&gt; subscribe(p_subscriptionID:&lt;span style=&#34;color:#038&#34;&gt;String&lt;/span&gt;, p_connection:Connection):Void
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  ...
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  stream.addEventListener(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;unpublishNotify&amp;#34;&lt;/span&gt;, Delegate.create(&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;this&lt;/span&gt;, streamStop));
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  ...
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;public&lt;/span&gt; &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;function&lt;/span&gt; streamStop(evtObj:&lt;span style=&#34;color:#038&#34;&gt;Object&lt;/span&gt;):Void
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  videoPool.removeSubscriber(&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;this&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  publish_video.clear();
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  stream.close();
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Finally open &lt;a href=&#34;https://github.com/marinalohova/red5-flash/blob/master/classes/org/red5/samples/livestream/videoconference/VideoConference.as&#34;&gt;VideoConference.as&lt;/a&gt;. This is a controller class, the Red Queen of all the above classes! It manages all the incoming subscribing streams and the broadcasting stream. When your computer is ready to broadcast, the camera is up and the broadcasting stream received its id, VideoConference sends requests to get all the publishing streams to the url on the server and process them as the subscribers.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;private&lt;/span&gt; &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;function&lt;/span&gt; configUI():Void
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  ...
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  videoPool.broadcaster.addEventListener(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;onSetID&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;this&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  ...
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;private&lt;/span&gt; &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;function&lt;/span&gt; setID(p_id:&lt;span style=&#34;color:#038&#34;&gt;Number&lt;/span&gt;, p_connection:Connection):Void
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#888&#34;&gt;//set local videoID
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#888&#34;&gt;&lt;/span&gt;  videoID = &lt;span style=&#34;color:#038&#34;&gt;Number&lt;/span&gt;(p_id);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#888&#34;&gt;// set connection
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#888&#34;&gt;&lt;/span&gt;  connection = p_connection;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  getStreams();
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;private&lt;/span&gt; &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;function&lt;/span&gt; getStreams():Void
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  connection.call(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;getStreams&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;this&lt;/span&gt;.result);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Since VideoPool with all the streams loads into the ScrollPane component now, VideoConference needs to be updated with the correct VideoPool reference:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;private&lt;/span&gt; &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; videoPool:VideoPool;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;private&lt;/span&gt; &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; scrollPane:ScrollPane;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;...
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;private&lt;/span&gt; &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;function&lt;/span&gt; configUI():Void
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  ...
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  scrollPane.setStyle(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;borderStyle&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;none&amp;#34;&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  videoPool = VideoPool(scrollPane.content);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  videoPool.broadcaster.registerController(&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;this&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  videoPool.broadcaster.addEventListener(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;connected&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;this&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  videoPool.broadcaster.addEventListener(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;disconnected&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;this&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  videoPool.broadcaster.addEventListener(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;onSetID&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;this&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;We could wrap the last four lines in some kind of configUI() function on VideoPool, but haven’t I told you? Refactoring will be your homework assignment!&lt;/p&gt;
&lt;p&gt;When the new subscriber shows up, we add him or her and update ScrollPane.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;private&lt;/span&gt; &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;function&lt;/span&gt; processQue():Void
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;if&lt;/span&gt;(streamQue.length &amp;lt;= &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;0&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    clearInterval(si);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;return&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; id:&lt;span style=&#34;color:#038&#34;&gt;Number&lt;/span&gt; = &lt;span style=&#34;color:#038&#34;&gt;Number&lt;/span&gt;(streamQue.shift().split(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;_&amp;#34;&lt;/span&gt;)[&lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;1&lt;/span&gt;]);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  videoPool.subscribe(id);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  scrollPane.invalidate();
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Almost ready! Publish the swf file and copy to the website folder. If you want to re-compile ActionScript classes only, use &lt;a href=&#34;https://github.com/marinalohova/mtasc-mx/blob/master/bin/mtasc&#34;&gt;MTASC compiler&lt;/a&gt; and MX libraries from my &lt;a href=&#34;https://github.com/marinalohova/mtasc-mx&#34;&gt;Github repo&lt;/a&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;gt; cp videoConference.swf classes/videoConference.swf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;gt; &lt;span style=&#34;color:#038&#34;&gt;cd&lt;/span&gt; classes
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;gt; &lt;span style=&#34;color:#038&#34;&gt;export&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;PATH&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#369&#34;&gt;$HOME&lt;/span&gt;&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;/mtasc-mx/bin:&lt;/span&gt;&lt;span style=&#34;color:#369&#34;&gt;$HOME&lt;/span&gt;&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;/mtasc-mx/bin/std:&lt;/span&gt;&lt;span style=&#34;color:#369&#34;&gt;$PATH&lt;/span&gt;&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;gt; mtasc -version &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;8&lt;/span&gt; -cp &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;.&amp;#34;&lt;/span&gt; -swf videoConference.swf -mx org/red5/samples/livestream/videoConference/videoConference.as -v
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;gt; cp videoConference.swf &lt;span style=&#34;color:#369&#34;&gt;$HOME&lt;/span&gt;/Sites/red5-hangout/videoConference.swf&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Include into the webpage:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;script type=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;text/javascript&amp;#34;&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  swfobject.embedSWF(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;videoConference.swf&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;participants&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;100%&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;100%&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;7.0.0&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;assets/expressInstall.swf&amp;#34;&lt;/span&gt;, {}, { allowScriptAccess: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;always&amp;#34;&lt;/span&gt; });
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;&lt;span style=&#34;color:#a61717;background-color:#e3d2d2&#34;&gt;/script&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;div id=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;participants&amp;#34;&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style=&#34;color:#a61717;background-color:#e3d2d2&#34;&gt;/div&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h3 id=&#34;stylish-spotlight&#34;&gt;Stylish Spotlight&lt;/h3&gt;
&lt;p&gt;The “Spotlight” component is the larger video of the “talking” person that shows up when one of the smaller previews is clicked. simpleSubscriber.fla is the ideal base for this component:&lt;/p&gt;
&lt;div class=&#34;separator&#34; style=&#34;clear: both; text-align: center;&#34;&gt;&lt;a href=&#34;/blog/2013/03/streaming-live-with-red5-media/image-5.jpeg&#34; imageanchor=&#34;1&#34; style=&#34;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&#34;&gt;&lt;img border=&#34;0&#34; src=&#34;/blog/2013/03/streaming-live-with-red5-media/image-5.jpeg&#34;/&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;Subscriber and Broadcaster will respond to the “click” event and call JavaScript function with the video stream name as a parameter. The video stream name is just a string like “videoStream_12” denoting the 12th stream accepted by “fitcDemo” application.&lt;/p&gt;
&lt;p&gt;In &lt;a href=&#34;https://github.com/marinalohova/red5-flash/blob/master/classes/org/red5/samples/livestream/videoconference/Broadcaster.as#L96&#34;&gt;Broadcaster.as&lt;/a&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;private&lt;/span&gt; &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;function&lt;/span&gt; configUI():Void
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;this&lt;/span&gt;.onRelease = &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;function&lt;/span&gt;(){
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    _global.tt(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;Broadcaster &amp;#39;&lt;/span&gt; + &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;this&lt;/span&gt;.videoStream + &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39; clicked.&amp;#39;&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;if&lt;/span&gt; (ExternalInterface.available) {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      ExternalInterface.call(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;spotlight&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;this&lt;/span&gt;.videoStream);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;In &lt;a href=&#34;https://github.com/marinalohova/red5-flash/blob/master/classes/org/red5/samples/livestream/videoconference/Subscriber.as#L108&#34;&gt;Subscriber.as&lt;/a&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;public&lt;/span&gt; &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;function&lt;/span&gt; configUI():Void
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;this&lt;/span&gt;.onRelease = &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;function&lt;/span&gt;() {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    ExternalInterface.call(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;spotlight&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;this&lt;/span&gt;.videoStream);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;};&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;JavaScript will embed the SimpleSubscriber clip and pass along the video stream name that should be played via flashvars.&lt;/p&gt;
&lt;p&gt;On the page&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;script type=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;text/javascript&amp;#34;&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;function&lt;/span&gt; spotlight(streamName) {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    swfobject.embedSWF(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;simpleSubscriber.swf&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;spotlight&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;100%&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;100%&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;7.0.0&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;assets/expressInstall.swf&amp;#34;&lt;/span&gt;, {&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;streamName&amp;#34;&lt;/span&gt;:streamName});
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;&lt;span style=&#34;color:#a61717;background-color:#e3d2d2&#34;&gt;/script&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;div id=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;stage&amp;#34;&lt;/span&gt;&amp;gt;&amp;lt;div id=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;spotlight&amp;#34;&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style=&#34;color:#a61717;background-color:#e3d2d2&#34;&gt;/div&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;In SimpleSubscriber &lt;a href=&#34;https://github.com/marinalohova/red5-flash/blob/master/classes/org/red5/samples/livestream/subscriber/Main.as&#34;&gt;Main.as&lt;/a&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;private&lt;/span&gt; &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; streamName:&lt;span style=&#34;color:#038&#34;&gt;String&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;...
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;private&lt;/span&gt; &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;function&lt;/span&gt; configUI():Void
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    streamName = &lt;span style=&#34;color:#038&#34;&gt;String&lt;/span&gt;(_level0.streamName);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    ...
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  }&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;private&lt;/span&gt; &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;function&lt;/span&gt; connectionChange(evtObj:&lt;span style=&#34;color:#038&#34;&gt;Object&lt;/span&gt;):Void
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;if&lt;/span&gt;(evtObj.connected)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    stream = &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;new&lt;/span&gt; Stream(evtObj.connection);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    stream.play(streamName, -&lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;1&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    publish_video.attachVideo(stream);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Publish &lt;a href=&#34;https://github.com/marinalohova/red5-flash/blob/master/classes/org/red5/samples/livestream/subscriber/Main.as&#34;&gt;simpleSubsciber.swf&lt;/a&gt; and place it into the website folder. To recompile the ActionScript part only:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;gt; mtasc -version &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;8&lt;/span&gt; -cp &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;.&amp;#34;&lt;/span&gt; -swf simpleSubscriber.swf -mx org/red5/samples/livestream/subscriber/Main.as -v
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;gt; cp simpleSubscriber.swf &lt;span style=&#34;color:#369&#34;&gt;$HOME&lt;/span&gt;/Sites/red5-hangout/simpleSubscriber.swf&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;By the way the -version 8 flag for mtasc was added specifically to compile ExternalInterface, otherwise, these libraries would not be found.&lt;/p&gt;
&lt;h3 id=&#34;chat-in-the-absence-of-sound&#34;&gt;Chat in the absence of Sound&lt;/h3&gt;
&lt;p&gt;One thing I really appreciate about the Google Hangout architecture is that it does not just make the whole page a bulky &lt;embed&gt; or &lt;object&gt; and lock everything into the external component. I love how they use the familiar and friendly JavaScript and HTML to add some interactive features. That’s why I decided to break the single VideoConference component into pieces as well and tie them together on a web page.&lt;/p&gt;
&lt;p&gt;The original conference had its audio support commented out with the note about performance issues. Bummer! This will surely need to be addressed, but for now I decided to use the existing chat and make it separate. Create a blank document &lt;a href=&#34;https://github.com/marinalohova/red5-flash/blob/master/chat.fla&#34;&gt;chat.fla&lt;/a&gt; and drag Chat clip from the VideoConference Library to the stage.&lt;/p&gt;
&lt;div class=&#34;separator&#34; style=&#34;clear: both; text-align: center;&#34;&gt;&lt;a href=&#34;/blog/2013/03/streaming-live-with-red5-media/image-6.jpeg&#34; imageanchor=&#34;1&#34; style=&#34;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&#34;&gt;&lt;img border=&#34;0&#34; src=&#34;/blog/2013/03/streaming-live-with-red5-media/image-6.jpeg&#34;/&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;Remove any reference to VideoConference and VideoPool from &lt;a href=&#34;https://github.com/marinalohova/red5-flash/blob/master/classes/org/red5/samples/livestream/videoconference/Chat.as&#34;&gt;Chat.as&lt;/a&gt;, create its own GlobalObject and Connection and paste the sound settings from &lt;a href=&#34;https://github.com/marinalohova/red5-flash/blob/master/classes/org/red5/samples/livestream/videoconference/VideoConference.as&#34;&gt;VideoConference.as&lt;/a&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;private&lt;/span&gt; &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; red5URI = &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;rtmp://192.168.0.5/fitcDemo&amp;#34;&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;...
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;public&lt;/span&gt; &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;function&lt;/span&gt; configUI():Void
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  streamID = &lt;span style=&#34;color:#038&#34;&gt;Number&lt;/span&gt;(_level0.streamName.split(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;_&amp;#34;&lt;/span&gt;)[&lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;1&lt;/span&gt;]);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  ...
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  loadProfile(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;videoConference&amp;#34;&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; my_nc:Connection = &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;new&lt;/span&gt; Connection();
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  my_nc.connect(red5URI);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  chatID = &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;videoConferenceChat&amp;#34;&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  connected = so.connect(chatID, my_nc, &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;false&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  ...
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  sndTarget = &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;this&lt;/span&gt;.createEmptyMovieClip(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;sndTarget&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;this&lt;/span&gt;.getNextHighestDepth());
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  snd = &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;new&lt;/span&gt; Sound (sndTarget);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  snd.attachSound(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;newChatMessage&amp;#34;&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  snd.setVolume(&lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;80&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  soundPlay._visible = &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;false&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  soundMute.addEventListener(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;click&amp;#34;&lt;/span&gt;, Delegate.create(&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;this&lt;/span&gt;, updateMute));
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  soundPlay.addEventListener(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;click&amp;#34;&lt;/span&gt;, Delegate.create(&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;this&lt;/span&gt;, updateMute));
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  soundMute.tooltip = &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;Mute new chat sound&amp;#34;&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  soundPlay.tooltip = &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;Un-mute new chat sound&amp;#34;&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Initialize the chat in &lt;a href=&#34;https://github.com/marinalohova/red5-flash/blob/master/classes/org/red5/samples/livestream/videoconference/Broadcaster.as#L154&#34;&gt;Broadcaster.as&lt;/a&gt; after the stream is initialized:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;private&lt;/span&gt; &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;function&lt;/span&gt; onSetID(evtObj:&lt;span style=&#34;color:#038&#34;&gt;Object&lt;/span&gt;):Void
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  ...
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  ExternalInterface.call(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;chat&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;this&lt;/span&gt;.videoStream);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Publish or recompile:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;gt; mtasc -version &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;8&lt;/span&gt; -cp &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;.&amp;#34;&lt;/span&gt; -swf chat.swf -mx org/red5/samples/livestream/videoConference/Chat.as -v
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;gt; cp chat.swf &lt;span style=&#34;color:#369&#34;&gt;$HOME&lt;/span&gt;/Sites/red5-hangout/chat.swf&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Add the chat to the web page:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;script type=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;text/javascript&amp;#34;&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;function&lt;/span&gt; chat(streamName) {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  swfobject.embedSWF(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;chat.swf&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;chat&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;330px&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;460px&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;7.0.0&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;assets/expressInstall.swf&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                     {&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;streamName&amp;#34;&lt;/span&gt;: streamName });
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;&lt;span style=&#34;color:#a61717;background-color:#e3d2d2&#34;&gt;/script&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;div id=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;chat&amp;#34;&lt;/span&gt; style=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;display:none&amp;#34;&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;&lt;span style=&#34;color:#a61717;background-color:#e3d2d2&#34;&gt;/div&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;And enjoy chatting with yourself for a while in different browser tabs:&lt;/p&gt;
&lt;div class=&#34;separator&#34; style=&#34;clear: both; text-align: center;&#34;&gt;&lt;a href=&#34;/blog/2013/03/streaming-live-with-red5-media/image-7.jpeg&#34; imageanchor=&#34;1&#34; style=&#34;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&#34;&gt;&lt;img border=&#34;0&#34; src=&#34;/blog/2013/03/streaming-live-with-red5-media/image-7.jpeg&#34;/&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h3 id=&#34;final-result&#34;&gt;Final result&lt;/h3&gt;
&lt;p&gt;After a bit of styling and herding my test participants, here is what I got:&lt;/p&gt;
&lt;div class=&#34;separator&#34; style=&#34;clear: both; text-align: center;&#34;&gt;&lt;a href=&#34;/blog/2013/03/streaming-live-with-red5-media/image-8.jpeg&#34; imageanchor=&#34;1&#34; style=&#34;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&#34;&gt;&lt;img border=&#34;0&#34; src=&#34;/blog/2013/03/streaming-live-with-red5-media/image-8.jpeg&#34;/&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h3 id=&#34;questions-questions&#34;&gt;Questions, questions&lt;/h3&gt;
&lt;p&gt;There are problems to be addressed yet.&lt;/p&gt;
&lt;p&gt;First, there is no audio. It’s commented out in the original code with the note about performance issues. Silence may be golden, but the grimace-enhanced chat experience is totally not acceptable for production!&lt;/p&gt;
&lt;p&gt;Second, the whole performance talk brings up the other important questions: How many subscribers can this setup handle? Is it possible to achieve the better video quality? Why is the video stream choppy at times?&lt;/p&gt;
&lt;p&gt;Finally, every application needs a mobile presence. Will it be possible to port the client to mobile devices using AIR? How to port to iPads and iPhones?&lt;/p&gt;
&lt;p&gt;The Flash source code in its entirety is located in my &lt;a href=&#34;https://github.com/marinalohova/red5-flash&#34;&gt;GitHub repo&lt;/a&gt;. Please, keep in mind, that the code is not perfect, and the logic can be better organized between classes with event handlers. The demo application can be found &lt;a href=&#34;https://github.com/marinalohova/red5-hangout&#34;&gt;here&lt;/a&gt;. MTASC compiler and MX libraries for compilation are available &lt;a href=&#34;https://github.com/marinalohova/mtasc-mx&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I would love to hear your feedback on this!&lt;/p&gt;

      </content>
    </entry>
  
    <entry>
      <title>Streaming Live with Red5 Media Server</title>
      <link rel="alternate" href="https://www.endpointdev.com/blog/2012/04/streaming-live-with-red5-media-server/"/>
      <id>https://www.endpointdev.com/blog/2012/04/streaming-live-with-red5-media-server/</id>
      <published>2012-04-27T00:00:00+00:00</published>
      <author>
        <name>Marina Lohova</name>
      </author>
      <content type="html">
        &lt;img border=&#34;0&#34; width=&#34;200&#34; height=&#34;112&#34; src=&#34;/blog/2012/04/streaming-live-with-red5-media-server/google-hangout-collage.jpg&#34;/&gt;
&lt;p&gt;Are you excited about &lt;a href=&#34;https://web.archive.org/web/20121117123926/https://tools.google.com/dlpage/hangoutplugin&#34;&gt;Google Hangouts&lt;/a&gt;? Would you be even more excited to implement live streaming yourself?&lt;/p&gt;
&lt;p&gt;Today we will take a look under the hood of broadcasting and even start implementing our own mini hangout.&lt;/p&gt;
&lt;h3 id=&#34;a-bit-of-theory&#34;&gt;A bit of theory&lt;/h3&gt;
&lt;p&gt;Live streaming is based on &lt;a href=&#34;https://en.wikipedia.org/wiki/Real-Time_Messaging_Protocol&#34;&gt;RTMP&lt;/a&gt; protocol. It is able to transfer video, audio and generally any data in real-time over Internet between server and client.&lt;/p&gt;
&lt;p&gt;The most popular combination for video/audio streaming is Adobe Flash Player as a client software and a proprietary &lt;a href=&#34;https://web.archive.org/web/20121108111840/https://www.adobe.com/products/adobe-media-server-family.html&#34;&gt;Adobe Flash Media Server&lt;/a&gt; as a server software. Another option is Wowza Streaming solutions.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;/blog/2012/04/streaming-live-with-red5-media-server/image-1.png&#34; imageanchor=&#34;1&#34; style=&#34;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&#34;&gt;&lt;img border=&#34;0&#34; height=&#34;79&#34; src=&#34;/blog/2012/04/streaming-live-with-red5-media-server/image-1.png&#34; width=&#34;200&#34;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Luckily for us there is an open-source &lt;a href=&#34;https://www.red5.net/open-source-live-streaming/&#34;&gt;Red5 Media Server&lt;/a&gt;—​the most popular if not the only one stable of all open-source media streaming servers. We will be leveraging Red5 to dive into RTMP world and the cutting edge streaming technologies.&lt;/p&gt;
&lt;h3 id=&#34;exploring-red5-media-server&#34;&gt;Exploring Red5 Media Server&lt;/h3&gt;
&lt;p&gt;Download and install Red5 Media Server for your environment from &lt;a href=&#34;https://web.archive.org/web/20120809211757/http://red5.org/downloads/red5/1_0/&#34;&gt;here&lt;/a&gt;. Now it is time to implement a sweeping live stream between our two laptops.&lt;/p&gt;
&lt;p&gt;Red5 comes with the set of demo applications (http://localhost:5080/demos/) that are very handy to base the development on. Demo applications can be installed via the Installer (http://localhost:5080/installer/). For the purpose of this article we need to install the “oflaDemo” application.&lt;/p&gt;
&lt;p&gt;After installation is complete, we can launch the demo for Simple Broadcaster application. In Simple Broadcaster we click “Connect” button, grant Flash Player permission to use camera and microphone, and—​voila!—​we should now be broadcasting live via Simple Broadcaster application to oflaDemo application.&lt;/p&gt;
&lt;p&gt;If we use another browser  to open Simple Subscriber application, or even another laptop with the IP  of the broadcasting computer, we will be able to stream the video live. It is quite noticeable that quality drops in Simple Subscriber.&lt;/p&gt;
&lt;div class=&#34;separator&#34; style=&#34;clear: both; text-align: center;&#34;&gt;&lt;a href=&#34;/blog/2012/04/streaming-live-with-red5-media-server/image-2-big.jpeg&#34; imageanchor=&#34;1&#34; style=&#34;margin-left: 1em; margin-right: 1em;&#34;&gt;&lt;img border=&#34;0&#34; height=&#34;265&#34; src=&#34;/blog/2012/04/streaming-live-with-red5-media-server/image-2.jpeg&#34; width=&#34;400&#34;/&gt;&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;In this example we also learned that rtmp://localhost/oflaDemo is the server communication point to where we publish and stream videos.&lt;/p&gt;
&lt;h3 id=&#34;customizing-simplebroadcaster-and-simplesubscriber&#34;&gt;Customizing SimpleBroadcaster and SimpleSubscriber&lt;/h3&gt;
&lt;p&gt;Next comes the most interesting part, embedding SimpleBroadcaster and SimpleSubscriber into the web page.&lt;/p&gt;
&lt;p&gt;We can’t really use their default versions “as is”. We want to remove input box, “Connect” button and Red5 connection indicator. We also want the streaming to start automatically.&lt;/p&gt;
&lt;p&gt;It’s more convenient to implement “Start” button in HTML and trigger the loading of SWF on “click”, because then we can easily change it, while changing SWF requires a lot of effort. You will be able to understand how exactly much effort it takes in a minute.&lt;/p&gt;
&lt;p&gt;My plan is to use Flash CS5 to modify SimpleBroadcaster.fla and SimpleSubscriber.fla. Flash Builder 4.6 to modify ActionScript classes for SimpleBroadcaster and SimpleSubscriber. Finally I will use Flash compiler to generate SimpleBroadcaster.swf and SimpleSubscriber.swf from .as and .fla files.&lt;/p&gt;
&lt;p&gt;Finally, some coding versus talking!&lt;/p&gt;
&lt;p&gt;Red5 sources are conveniently available on &lt;a href=&#34;https://github.com/Red5&#34;&gt;GitHub&lt;/a&gt;, in server-side and Flash-side.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-plain&#34; data-lang=&#34;plain&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;gt; git clone https://github.com/Red5/red5-flash red5&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Step 1.&lt;/p&gt;
&lt;p&gt;Let’s open simpleBroadcaster.fla located in the very root of the download in Flash CS5.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;/blog/2012/04/streaming-live-with-red5-media-server/image-3-big.jpeg&#34; imageanchor=&#34;1&#34; style=&#34;margin-left: 1em; margin-right: 1em;&#34;&gt;&lt;img border=&#34;0&#34; height=&#34;333&#34; src=&#34;/blog/2012/04/streaming-live-with-red5-media-server/image-3.jpeg&#34; width=&#34;400&#34;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;and take a pick at the Library panel.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;/blog/2012/04/streaming-live-with-red5-media-server/image-4-big.jpeg&#34; imageanchor=&#34;1&#34; style=&#34;margin-left: 1em; margin-right: 1em;&#34;&gt;&lt;img border=&#34;0&#34; height=&#34;400&#34; src=&#34;/blog/2012/04/streaming-live-with-red5-media-server/image-4.jpeg&#34; width=&#34;332&#34;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Let’s double-click on the Embedded Video 1, open Window -&amp;gt; Properties panel and modify the size of the video to occupy the full documents area. Alternatively, we may change the document size to fit the video: right-click on the grey area, pick Document settings from the context menu and adjust dimensions. Either way, now we should drag the video rectangle to fit the document. We will save the document and repeat the same sequence of actions for simpleSubscriber.fla, because they are really no different.&lt;/p&gt;
&lt;p&gt;Step 2.&lt;/p&gt;
&lt;p&gt;Let’s now open the “red5” directory that we checked out in FlashBuilder.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;/blog/2012/04/streaming-live-with-red5-media-server/image-5-big.jpeg&#34; imageanchor=&#34;1&#34; style=&#34;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&#34;&gt;&lt;img border=&#34;0&#34; height=&#34;424&#34; src=&#34;/blog/2012/04/streaming-live-with-red5-media-server/image-5.jpeg&#34; width=&#34;640&#34;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;We immediately find the main class for simpleBroadcaster.fla org.red5.samples.livestream.broadcaster.Main in “classes” directory.&lt;/p&gt;
&lt;p&gt;The key function here is “configUI”.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;private&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;function&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#06b;font-weight:bold&#34;&gt;configUI&lt;/span&gt;():Void&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;{&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#888&#34;&gt;// setup the tooltip defaults&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;Tooltip.&lt;span style=&#34;color:#369&#34;&gt;options&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;=&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;{size:10,&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;font:&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;_sans&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;corner:0};&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#888&#34;&gt;// setup cam&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;cam&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;=&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Camera.&lt;span style=&#34;color:#369&#34;&gt;get&lt;/span&gt;();&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;cam.&lt;span style=&#34;color:#369&#34;&gt;setMode&lt;/span&gt;(480,&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;320,&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;15);&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;cam.&lt;span style=&#34;color:#369&#34;&gt;setQuality&lt;/span&gt;(0,80);&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#888&#34;&gt;// setup mic&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;mic&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;=&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Microphone.&lt;span style=&#34;color:#369&#34;&gt;get&lt;/span&gt;();&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#888&#34;&gt;// get notified of connection changes&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;connector.&lt;span style=&#34;color:#369&#34;&gt;addEventListener&lt;/span&gt;(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;connectionChange&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;this&lt;/span&gt;);&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#888&#34;&gt;// set the uri&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;Connector.&lt;span style=&#34;color:#369&#34;&gt;red5URI&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;=&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;rtmp://localhost/oflaDemo&amp;#34;&lt;/span&gt;;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#888&#34;&gt;// initialize the connector&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;connector.&lt;span style=&#34;color:#369&#34;&gt;configUI&lt;/span&gt;();&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;&lt;/span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Let’s look into Connector class org.red5.utils.Connector.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#888&#34;&gt;// UI Elements:&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#888&#34;&gt;// ** AUTO-UI ELEMENTS **&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;private&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;alert:SimpleDialog;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;private&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;connect:IconButton;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;private&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;disconnect:IconButton;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;private&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;light:ConnectionLight;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;private&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;uri:TextInput;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#888&#34;&gt;// ** END AUTO-UI ELEMENTS **&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;public&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;function&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#06b;font-weight:bold&#34;&gt;configUI&lt;/span&gt;():Void&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;{&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#888&#34;&gt;// instantiate the connection&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;connection&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;=&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;new&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Connection();&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#888&#34;&gt;// register the connection with the light so it can add a listener&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;light.&lt;span style=&#34;color:#369&#34;&gt;registerNC&lt;/span&gt;(connection);&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#888&#34;&gt;// hide disconnect button&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;disconnect.&lt;span style=&#34;color:#369&#34;&gt;_visible&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;=&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;false&lt;/span&gt;;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#888&#34;&gt;// set the URI&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;uri.&lt;span style=&#34;color:#369&#34;&gt;text&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;=&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;red5URI;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#888&#34;&gt;// setup the buttons&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;connect.&lt;span style=&#34;color:#369&#34;&gt;addEventListener&lt;/span&gt;(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;click&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Delegate.&lt;span style=&#34;color:#369&#34;&gt;create&lt;/span&gt;(&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;this&lt;/span&gt;,&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;makeConnection));&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;disconnect.&lt;span style=&#34;color:#369&#34;&gt;addEventListener&lt;/span&gt;(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;click&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Delegate.&lt;span style=&#34;color:#369&#34;&gt;create&lt;/span&gt;(&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;this&lt;/span&gt;,&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;closeConnection));&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;connect.&lt;span style=&#34;color:#369&#34;&gt;tooltip&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;=&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;Connect to Red5&amp;#34;&lt;/span&gt;;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;disconnect.&lt;span style=&#34;color:#369&#34;&gt;tooltip&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;=&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;Disconnect from Red5&amp;#34;&lt;/span&gt;;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#888&#34;&gt;// add listener for connection changes&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;connection.&lt;span style=&#34;color:#369&#34;&gt;addEventListener&lt;/span&gt;(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;success&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Delegate.&lt;span style=&#34;color:#369&#34;&gt;create&lt;/span&gt;(&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;this&lt;/span&gt;,&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;manageButtons));&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;connection.&lt;span style=&#34;color:#369&#34;&gt;addEventListener&lt;/span&gt;(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;close&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Delegate.&lt;span style=&#34;color:#369&#34;&gt;create&lt;/span&gt;(&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;this&lt;/span&gt;,&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;manageButtons));&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;}&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;public&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;function&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#06b;font-weight:bold&#34;&gt;makeConnection&lt;/span&gt;(evtObj:Object):Void&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;{&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;if&lt;/span&gt;(uri.&lt;span style=&#34;color:#369&#34;&gt;length&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&amp;gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;0)&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;{&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;goodURI&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;=&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;connection.&lt;span style=&#34;color:#369&#34;&gt;connect&lt;/span&gt;(uri.&lt;span style=&#34;color:#369&#34;&gt;text&lt;/span&gt;,&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;getTimer());&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;if&lt;/span&gt;(!goodURI)&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;alert.&lt;span style=&#34;color:#369&#34;&gt;show&lt;/span&gt;(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;Please check connection URI String and try again.&amp;#34;&lt;/span&gt;);&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;}&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;We will now make quick and dirty changes to get the proof of concept working. We will hide all the unnecessary UI elements, then convert the listener to the regular function, and call it from the configUI function.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-java&#34; data-lang=&#34;java&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;public&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;function&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#06b;font-weight:bold&#34;&gt;configUI&lt;/span&gt;():Void&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;{&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;disconnect.&lt;span style=&#34;color:#369&#34;&gt;_visible&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;=&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;false&lt;/span&gt;;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;connect.&lt;span style=&#34;color:#369&#34;&gt;_visible&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;=&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;false&lt;/span&gt;;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;uri.&lt;span style=&#34;color:#369&#34;&gt;_visible&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;=&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;false&lt;/span&gt;;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;light.&lt;span style=&#34;color:#369&#34;&gt;_visible&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;=&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;false&lt;/span&gt;;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;connection&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;=&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;new&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;Connection();&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;light.&lt;span style=&#34;color:#369&#34;&gt;registerNC&lt;/span&gt;(connection);&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;if&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;(makeConnection(Connector.&lt;span style=&#34;color:#369&#34;&gt;red5URI&lt;/span&gt;))&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;{&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;dispatchEvent({type:&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;connectionChange&amp;#34;&lt;/span&gt;,&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;connected:&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;true&lt;/span&gt;,&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;connection:connection});&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;}&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;}&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;public&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;function&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#06b;font-weight:bold&#34;&gt;makeConnection&lt;/span&gt;(uri:String):Boolean&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;{&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;result:Boolean&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;=&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;false&lt;/span&gt;;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;if&lt;/span&gt;(uri.&lt;span style=&#34;color:#369&#34;&gt;length&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;&amp;gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;0)&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;{&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;result&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;=&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;connection.&lt;span style=&#34;color:#369&#34;&gt;connect&lt;/span&gt;(uri,&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;getTimer());&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;if&lt;/span&gt;(!result)&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;{&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;      &lt;/span&gt;alert.&lt;span style=&#34;color:#369&#34;&gt;show&lt;/span&gt;(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;Failed to connect.&amp;#34;&lt;/span&gt;);&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;    &lt;/span&gt;}&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;}&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;return&lt;/span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;result;&lt;span style=&#34;color:#bbb&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#bbb&#34;&gt; &lt;/span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Done! After making these changes we are good with SimpleSubscriber as well, because both classes use the same Connector class.&lt;/p&gt;
&lt;p&gt;Step 3.&lt;/p&gt;
&lt;p&gt;Unfortunately Red5 is written in ActionScript 2. We can’t really use any of the newer mxml compilers installed on our systems, because they compile ActionScript 3. Flex SDK is also only compatible with ActionScript 3. I spent quite a lot of time searching for a simple and working AS2 compiler on the Internet, and luckily, found one called &lt;a href=&#34;https://en.wikipedia.org/wiki/MTASC&#34;&gt;MTASC&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The compiler needs to be supplied with the correct MX Component libraries to compile Red5 classes. Flash CS6 has those libraries, but in case you don’t have CS6 handy I put them on &lt;a href=&#34;https://github.com/marinalohova/mtasc-mx&#34;&gt;GitHub&lt;/a&gt; for you.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-plain&#34; data-lang=&#34;plain&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;gt; export PATH=&amp;#34;/path/to/mtasc-mx/bin:/path/to/mtasc-mx/std:$PATH&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;gt; cd &amp;#34;/path/to/red5/classes&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;gt; mtasc -cp . -swf ../simpleBroadcaster.swf -mx org/red5/samples/livestream/broadcaster/Main.as -v
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;gt; mtasc -cp . -swf ../simpleSubscriber.swf  -mx org/red5/samples/livestream/broadcaster/Main.as -v&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The compiled swf’s can be found in the root of the current directory.&lt;/p&gt;
&lt;p&gt;At this point it is possible to create a broadcast and stream it just by launching the swf’s, first broadcaster, then subscriber. However, we would like to be able to broadcast via network.&lt;/p&gt;
&lt;h3 id=&#34;are-you-ready-to-broadcast&#34;&gt;Are you ready to broadcast?&lt;/h3&gt;
&lt;p&gt;In order to enable broadcasting in our web application we will need to drop the compiled swf files into its public directory.&lt;/p&gt;
&lt;p&gt;We will then download the &lt;a href=&#34;https://github.com/swfobject/swfobject&#34;&gt;swfobject.js&lt;/a&gt; JavaScript library and drop it into the public directory of our web application as well.&lt;/p&gt;
&lt;p&gt;We will create the &lt;code&gt;broadcast.html&lt;/code&gt; file:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-plain&#34; data-lang=&#34;plain&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;html&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;head&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &amp;lt;title&amp;gt;Red5 Demo - Simple Broadcaster&amp;lt;/title&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &amp;lt;meta http-equiv=&amp;#34;Content-Type&amp;#34; content=&amp;#34;text/html; charset=iso-8859-1&amp;#34; /&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &amp;lt;script type=&amp;#34;text/javascript&amp;#34; src=&amp;#34;swfobject.js&amp;#34;&amp;gt;&amp;lt;/script&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &amp;lt;script type=&amp;#34;text/javascript&amp;#34;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      swfobject.embedSWF(&amp;#34;simpleBroadcaster.swf&amp;#34;,&amp;#34;myContent&amp;#34;,&amp;#34;360&amp;#34;,&amp;#34;240&amp;#34;,&amp;#34;8.0.0&amp;#34;,&amp;#34;jwplayer/expressInstall.swf&amp;#34;);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &amp;lt;/script&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &amp;lt;style media=&amp;#34;screen&amp;#34; type=&amp;#34;text/css&amp;#34;&amp;gt;#myContent {visibility:hidden}&amp;lt;/style&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;/head&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;body&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &amp;lt;div id=&amp;#34;myContent&amp;#34;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &amp;lt;h1&amp;gt;You need the Adobe Flash Player for this demo, download it by clicking the image below.&amp;lt;/h1&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &amp;lt;p&amp;gt;&amp;lt;a href=&amp;#34;https://get.adobe.com/flashplayer/&amp;#34;&amp;gt;&amp;lt;img src=&amp;#34;https://www.adobe.com/images/shared/download_buttons/get_flash_player.gif&amp;#34; alt=&amp;#34;Get Adobe Flash player&amp;#34;/&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &amp;lt;/div&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;/body&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Then we will create the &lt;code&gt;watch.html&lt;/code&gt; file:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-plain&#34; data-lang=&#34;plain&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;html&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;head&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;title&amp;gt;Red5 Demo - Simple Subscriber&amp;lt;/title&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;meta http-equiv=&amp;#34;Content-Type&amp;#34; content=&amp;#34;text/html; charset=ISO-8859-1&amp;#34;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;script type=&amp;#34;text/javascript&amp;#34; src=&amp;#34;swfobject.js&amp;#34;&amp;gt;&amp;lt;/script&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;script type=&amp;#34;text/javascript&amp;#34;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    swfobject.embedSWF(&amp;#34;simpleSubscriber.swf&amp;#34;,&amp;#34;myContent&amp;#34;,&amp;#34;360&amp;#34;,&amp;#34;240&amp;#34;,&amp;#34;8.0.0&amp;#34;,&amp;#34;assets/expressInstall.swf&amp;#34;);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;/script&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;style media=&amp;#34;screen&amp;#34; type=&amp;#34;text/css&amp;#34;&amp;gt;#myContent {visibility:hidden}&amp;lt;/style&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;/head&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;body&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;div id=&amp;#34;myContent&amp;#34;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &amp;lt;h1&amp;gt;You need the Adobe Flash Player for this demo, download it by clicking the image below.&amp;lt;/h1&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &amp;lt;p&amp;gt;&amp;lt;a href=&amp;#34;https://get.adobe.com/flashplayer/&amp;#34;&amp;gt;&amp;lt;img src=&amp;#34;https://www.adobe.com/images/shared/download_buttons/get_flash_player.gif&amp;#34; alt=&amp;#34;Get Adobe Flash player&amp;#34;/&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/p&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;/div&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;/body&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;At this point we are able to start a broadcast at &lt;code&gt;http://localhost/broadcast.html&lt;/code&gt; and watch it at &lt;code&gt;http://localhost/watch.html&lt;/code&gt;! In this case I am broadcasting from a MacBook and streaming to a Windows laptop.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;/blog/2012/04/streaming-live-with-red5-media-server/image-6-big.jpeg&#34; imageanchor=&#34;1&#34; style=&#34;margin-left: 1em; margin-right: 1em;&#34;&gt;&lt;img border=&#34;0&#34; height=&#34;218&#34; src=&#34;/blog/2012/04/streaming-live-with-red5-media-server/image-6.jpeg&#34; width=&#34;640&#34;/&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Sweet! Next step is to implement the actual two-way hangout with Red5 Media Server!&lt;/p&gt;
&lt;p&gt;Read on here: &lt;a href=&#34;/blog/2013/03/streaming-live-with-red5-media/&#34;&gt;Streaming Live with Red5 Media Server: Two-Way&lt;/a&gt;&lt;/p&gt;

      </content>
    </entry>
  
</feed>
