It would not be that hard to conceive and build such feature, but more work to maintain integration tests for this extra video feature.
Fretboard diagrams and text inside many videos would be flipped. Reading text and interpreting diagrams backwards might be confusing for you, but if you prefer the experience overall, you can do it.
Anyway, for the time being, you can copy’n’paste some javascript into the console of the pages of videos you like:—
document.querySelectorAll("video").forEach(e=>e.style.transform="rotateY(180deg)");
You can also make that into a bookmarklet. If you like this code’s effects, I suggest you do. You might want to modify the CSS Selector to make it more specific to the page at hand than video
(which selects all video elements with a low degree of specificity).
“rotateY” rotates pixels on the Y axis in a “row major” graph. A row major graph is where the rows are the outermost index and the columns are represented by the 'jth
index in row[i][j]
.
Digital video is a series of images displayed in rapid succession. Images are like a graph in that they have rows and columns.
In the following example, the graph is “row major”. How many rows are there? How many columns are there?
let imageData = [
[0, 0, 1, 0, 0],
[0, 1, 1, 1, 0],
[0, 0, 0, 1, 0]
];
If you then flip the columns, it would look like this:
let imageData = [
[0, 0, 1, 0, 0],
[0, 1, 1, 1, 0],
[0, 1, 0, 0, 0]
];
If you want a further challenge, try this LeetCode example.
My surprisingly simple solution: [Edit: fixed link] https://leetcode.com/problems/flipping-an-image/discuss/602347/Another-One-line-Wonder-JavaScript