Tag Archives: CloudflareTV

Tech Leaders on the Future of Remote Work

Post Syndicated from Jason Kincaid original https://blog.cloudflare.com/tech-leaders-on-the-future-of-remote-work/

Tech Leaders on the Future of Remote Work

Dozens of top leaders and thinkers from the tech industry and beyond recently joined us for a series of fireside chats commemorating Cloudflare’s 10th birthday. Over the course of 24 hours of conversation, many of these leaders touched on how the workplace has evolved during the pandemic, and how these changes will endure into the future.

Here are some of the highlights.

On the competition for talent

Stewart Butterfield
Co-founder and CEO, Slack

Tech Leaders on the Future of Remote Work

The thing that I think people don’t appreciate or realize is that this is not a choice that companies are really going to make on an individual basis. I’ve heard a lot of leaders say, “we’re going back to the office after the summer.”

If we say we require you to be in the office five days a week and, you know, Twitter doesn’t, Salesforce doesn’t — and those offers are about equal — they’ll take those ones. I think we would also lose existing employees if they didn’t believe that they had the flexibility. Once you do that, it affects the market for talent. If half of the companies support distributed work or flexible hours and flexible time in the office, you can compensate for that, but I think you’ve got to pay a lot more or something like that because that optionality is valuable to people.

Watch the full interview

On the harnessing the benefits of remote work

Hayden Brown
President and CEO, Upwork

Tech Leaders on the Future of Remote Work

I think a lot of these things are here to stay. What’s fleeting is this idea that we have our children home from school and we don’t have a social system around child care and things like that, because that’s not sustainable.

What’s here to stay are really companies finding, and workers finding, a new balance. It’s not about, “let’s all lock ourselves in our homes forever.” This is about being very intentional. How can we be intentional to really recognize the benefits that a distributed, more work from home-oriented culture and set of practices can give workers and businesses?

Those benefits include some very powerful tools towards addressing some of the diversity challenges that all of our companies face, because it suddenly opens up pools of talent that we can tap into, outside of the places where we’ve traditionally hired, and we can tap into those people — and they’re not second class citizens, because they’re not the only ones working remotely while everyone else is back at the office.

Watch the full interview

On capturing the serendipity of in-person meetings

Brett Hautop
VP of Global Design + Build at LinkedIn

Tech Leaders on the Future of Remote Work

That might be the single hardest thing to figure out. Because the big decision that’s made right after the meeting, after you heard everything but you wanted to say it to one person and not everybody else. Or the thing that happens serendipitously on the way into a meeting, just because you’re talking about your weekends and then you remember something — that is really unfair to the people who are on the team (working remotely).

And unless you go back to technology like the telepresence person driving around, or each of us having our own drone in the office that follows people around serving as my ability to see — these creepy things — it’s really hard to recreate. So it’s about changing a cultural norm and getting people to be more thoughtful about how to include people who aren’t there, to go out of their way to include them. And that’s something that could take years for us to teach ourselves.

Watch the full interview

On securing a hybrid work environment

Chris Young
Former CEO, McAfee

Tech Leaders on the Future of Remote Work

We saw a huge rise in phishing attacks that were directly correlated to the move to work from home. Cyber attackers understand that all of a sudden you’ve got probably millions of workers across different organizations that are not supervised in the same way — new systems, new protocols for how they work. And they preyed upon that very quickly… there’s a whole litany of attacks that have been levied against the work from home model.

It’s prudent to make sure that if you’re going to have people working from home, that you take some steps to protect the home networking infrastructure because we could find ourselves in a situation where, if we don’t pay attention to that over the long run, you start to see an uptick of attackers going after the home networking infrastructure. We always know the attackers will find the path of least resistance. It’s like water on a roof: it will find the hole and go right there.

And I think it means a few things for us in a cybersecurity landscape. I think it’s going to continue to shift and put a premium on the identity based architecture. The zero trust model authentication is going to be key. It’s really the combination of: can I trust the user and can I trust the device in order to make a decision of do I trust this session? Do I trust this transaction?

Watch the full interview

On the opportunity for digital transformation

Bret Taylor
President and Chief Operating Officer at Salesforce

Tech Leaders on the Future of Remote Work

I hear across every industry that people aren’t going to come back to the office full time. Maybe they’ll come in a couple days a week. But that means our offices are probably going to be a little bit more for on-sites than they are for desks. And I think about: how does that change the shape of our employee engagement? And more importantly, how does it change the shape of our business models?

I think that the companies who were treating their digital initiatives as something sort of on the side are probably suffering right now. And there’s an urgency around these shifts now that is more powerful than ever before.

I think a lot of these trends will remain. And that’s where the opportunity is for great companies, whether it’s technology companies or other companies, who will lean into these changes and transform themselves. I think the ones that do will benefit from it. And I think there’s going to be a lot of business model disruption and technology disruption coming out of this.

Watch the full interview

*Quotes have been lightly edited for clarity and length.

Want to watch more interviews and catch up on all of the announcements from Cloudflare during Birthday Week? Visit Cloudflare Birthday Week 2020

Building Cloudflare TV from scratch

Post Syndicated from Oliver Yu original https://blog.cloudflare.com/building-cloudflare-tv-from-scratch/

Building Cloudflare TV from scratch

Building Cloudflare TV from scratch

Cloudflare TV is inspired by television shows of the 90s that shared the newest, most exciting developments in computing and music videos. We had three basic requirements for Cloudflare TV:

  1. Guest participation should be as simple as joining a video call
  2. There should be 24×7 programming. Something interesting should be playing all the time
  3. Everything should happen in the cloud and we should never have to ask anyone “to leave their computer on” to have the stream running 24 hours a day
Building Cloudflare TV from scratch

We didn’t set out to build Cloudflare TV from scratch

Building a lot of the technology behind Cloudflare TV from scratch was not part of the plan, especially given our aggressive timeline. So why did we decide to pursue it? After evaluating multiple live streaming solutions, we reached the following conclusion:

  • 24×7 linear streaming is not something that is a priority for most video streaming platforms. This makes sense: the rise of video-on-demand and event-based live streaming has come at the expense of linear streaming.
  • Most broadcasting platforms have their own guest apps which must be downloaded and set up in advance. This introduces unnecessary friction compared to clicking a link in the calendar invite to join a video call.

“Wait! Can we just use Zoom + Cloudflare?”

When we discovered that Zoom lets you push live video to any RTMP end point, we started experimenting with the feature.

“RTMP” stands for Real-Time Messaging Protocol and was originally developed to facilitate low-latency communication using TCP via Macromedia Flash. RTMP has outlived Flash and is widely used by platforms, including YouTube, to enable live video streaming. RTMP is a push protocol and platforms like YouTube provide RTMP endpoints which are simply URLs. Most video broadcast apps will let you configure multiple RTMP endpoints, which tells the app “hey send my live video feed from my phone or computer to these services.” If you find yourself watching a live video that is being broadcasted on multiple services, it is very likely made possible by RTMP.

Building Cloudflare TV from scratch

Zoom lets you provide RTMP endpoints and instruct it to send the live video feed of Zoom calls to, in our case, Cloudflare TV’s RTMP. Before we could use this feature, we needed to be able to ingest RTMP video feeds.

First, we set up an NGINX server with the RTMP module:

apt-get install build-essential libpcre3 libpcre3-dev libssl-dev git zlib1g-dev -y
mkdir ~/build && cd ~/build
git clone git://github.com/arut/nginx-rtmp-module.git
wget http://nginx.org/download/nginx-1.14.1.tar.gz
tar xzf nginx-1.14.1.tar.gz
cd nginx-1.14.1
sudo ./configure --with-http_ssl_module --add-module=../nginx-rtmp-module
sudo make
sudo make install

Next, we configured nginx.conf so NGINX can not only ingest the RTMP feed, but also make it streamable to the end user. A browser typically can’t stream from an RTMP source. We need NGINX to take the RTMP feed and create HLS/DASH segments.

We defined an application called live inside nginx.conf. Within the live application, we can add directives to ingest RTMP and output HLS:

...
rtmp {
    server {
        ...
        application live {
            allow play all;
            live on;

            # sample HLS
            hls on;
            hls_path /mnt/hls/;
            hls_fragment 1;
            hls_playlist_length 4;
            hls_sync 100ms;
        }
    }
}

Once we had NGINX set up to ingest RTMP and HLS, we followed Zoom’s instructions on Custom Live Streaming. And soon enough, we had a basic prototype of live streaming Zoom calls using the Cloudflare network!

Transitions without interruption

So we met our number one requirement of making the guest experience as easy as joining a video call. But Cloudflare TV isn’t going to be one never-ending call. We needed a way to smoothly transition between multiple calls over the course of the day, and to replay some of our favorite segments.

For example, we may have live programming from 1000 to 1100 followed by two hours of pre-recorded (or replayed) content. When the live programming ends at 1100, the video experience would break and the user would need to hit refresh to see the next show on the schedule.

So how do we fix this? We determined we needed the following:

  1. Ability to set the programming (the “what plays when?”) many days in advance
  2. Have “virtual rooms” ingesting video from different sources (live events, pre-recorded videos stored using our Cloudflare Stream product)

Once we have a schedule and “virtual rooms”, we can dynamically switch what is currently playing on-air to the appropriate “virtual room” streaming the content.

To implement this, we used Contentful, Workers, and Brave (an open-source video editor).

Building Cloudflare TV from scratch

Brave

Building Cloudflare TV from scratch

Brave is an open-source project started by the BBC. Using Brave, we were able to set up multiple virtual rooms and smoothly make any virtual room go on-air.

Under the hood, Brave is doing two key things:

  1. pulling multiple video feeds from various sources and placing them in virtual rooms
  2. pushing the final (“on air feed”) to NGINX every second of the day

Contentful

Contentful is a headless content management platform designed to be API-first; it eliminated the need for a database and helped us build our scheduling feature rapidly.

Most of the necessary fields are pretty straightforward for a CMS: title, presenters, and, of course, the time slot. Each of these is automatically synced with the publicly-facing schedule at cloudflare.tv/schedule.

We are able to use Workers to fetch events from Contentful:

export async function fetchEventRaw(id: string) {
  let r = await fetch(`${CONTENTFUL_API}/entries/${id}`, {
    headers: {
      'Content-Type': 'application/json',
      Authorization: `Bearer ${CONTENTFUL_ADMIN}`,
    },
  })
  return unwrap(r, 'Failed to retrieve event')
}

The more complex piece was integrating this with Zoom. Each segment needs its own Zoom meeting, and it’d be pretty arduous to create these manually. So when we publish in Contentful, Contentful makes a call to a Worker endpoint. The Worker endpoint automatically generates a Zoom meeting — and provides the Programming Team with the customized invite to send to the guest.

For example, when a new event is added to Contentful, Contentful notifies our Worker endpoint which creates a new meeting and configures it so it is being pushed to Cloudflare TV:

export async function createMeeting(ev: TVEvent) {
  const headers = await zoomHeaders()

  const alternative_hosts = ev.altHosts ? ev.altHosts.join(',') : ''

  ev.zoomPassword = genPassword()

  let r = await fetch(`https://api.zoom.us/v2/users/${ev.studio}@cloudflare.com/meetings`, {
    method: 'POST',
    headers,
    body: JSON.stringify({
      topic: ev.title,
      type: 2,
      start_time: ev.start,
      duration: ev.duration,
      timezone: 'UTC',
      agenda: ev.description,
      password: ev.zoomPassword,
      settings: {
        host_video: true,
        participant_video: false,
        alternative_hosts,
        cn_meeting: false,
        in_meeting: false,
        join_before_host: true,
        mute_upon_entry: true,
        watermark: false,
        use_pmi: false,
        approval_type: 2,
        audio: 'both',
        auto_recording: 'cloud',
        enforce_login: false,
      },
    }),
  })
  let data = await unwrap(r, 'Failed to create ZOOM meeting')
  log('zoom: ', data)

  ev.meetingId = data.id
  ev.zoomUrl = data.join_url

  // push livestream configuration data to meeting
  r = await fetch(`https://api.zoom.us/v2/meetings/${ev.meetingId}/livestream`, {
    method: 'PATCH',
    headers,
    body: JSON.stringify({
      //TODO: make configurable
      stream_url: CFTV_RTMP_ENDPOINT,
      stream_key: ev.studio,
      page_url: 'https://cloudflare.tv',
    }),
  })
  await unwrap(r, 'Failed to update LiveStream config')

  return ev
}

The other upside to using Contentful is that many members of our team already have familiarity with it, so it reduces the overhead of learning a new tool.

Workers

So far, we’ve described the different pieces of the backend (NGINX, Brave, Contentful) that make Cloudflare TV possible. How do we bring them all together? Cloudflare Workers serves as the glue that brings these systems together. The Cloudflare TV frontend is built on Worker Sites. The frontend calls our Worker endpoints to fetch data, such as the programming calendar.

Thinking Ahead…

We’re just getting started with Cloudflare TV. We have a long wish list of features we’d really like to see. Here are some of the features we can’t wait to work on:

  • Improve the viewing experience by adding closed-caption support
  • Enable our viewers to call in and ask questions and contribute to the conversation
  • Bring Cloudflare TV to platforms like Apple TV and Roku