Skip to content

easter egg: bad apple in favicon #53

Description

@JasonYao

This is a godawful, terrible, and useless to society idea.

So naturally I wanna see if it'd be possible. General user flow would be:

  1. User goes to my website, inputs some variant of konami code (up, up, down, down, left, right, left, right, B, A and RETURN could do the trick
  2. This fetches a compressed data pack of Bad Apple video in bit-map form (since it's a bitone already)
  • We get this by exploding out the mp4 frame by frame at 24 frames per second, decimating each image to the resolution desired for favicons.
  • Then, for each frame, we pack it into a buffer where each bit represents a pixel, so 4 bytes (for a 16 x 16 image size, there's 256 pixels, divided by 8 bits in a byte for 32 bytes of binary data for a single frame)
  1. Upon reading this flat video content buffer, we process (iterate by 32 byte intervals) through it, generating an image in-memory
  2. We then begin calling whatever it is that updates the favicon every 1s / 24 frames = 0.041s per frame (might wanna time how long the favicon update takes). Alternatively, we could just swap the image the favicon is pointing to every 0.041s, and keep the favicon link stable (not sure if favicon is just cached though)

Open questions to address at the start here

Step 1 can be done with an event listener, step 2 just with an API call to download bad apple which can be done pretty easily. Step 3 is an unkown, and there's a question of timing in step4 where we want to know how long the favicon update took.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions