function updateSpeedFromEvent(video) {
    // It's possible to get a rate change on a VIDEO/AUDIO that doesn't have
    // a video controller attached to it.  If we do, ignore it.
    if (!video.vsc)
      return;
    var speedIndicator = video.vsc.speedIndicator;
    var src = video.currentSrc;
    var speed = Number(video.playbackRate.toFixed(2));

    log("Playback rate changed to " + speed, 4);

    log("Updating controller with new speed", 5);
    speedIndicator.textContent = speed.toFixed(2);
    tc.settings.speeds[src] = speed;
    log("Storing lastSpeed in settings for the rememberSpeed feature", 5);
    tc.settings.lastSpeed = speed;
    log("Syncing chrome settings for lastSpeed", 5);
    chrome.storage.sync.set({ lastSpeed: speed }, function () {
      log("Speed setting saved: " + speed, 5);
    });
    // show the controller for 1000ms if it's hidden.
    runAction("blink", null, null);
  }
This function is run whenever a video speed rate change occurs.
It is used to update the speed that shows up in the display as well as save
that latest speed into the local storage.

@param {*} video The video element to update the speed indicators for.