PC版ニコニコ生放送に映像の左右反転ボタンを

Table of Contents

はじめに

ニコ生の配信アプリでは、フロントカメラの映像はデフォルトで左右反転しています。これは配信者からすると映像は鏡のように見えるので自然ですが(女性の場合は盛れるので反転してるケースも)、視聴者の側からすると文字の判別が困難だったり、車の運転席が逆に見える等の理由で、違和感を抱きます。そのため、フロントカメラが左右反転していると、度々「反転直せ」コメが走ります。

今回は、この問題を視聴者の側で解決できる「映像を反転」ボタンを、PC版のニコ生のプレイヤーに追加するUserJSを作成したので紹介します。

UserJSの導入

まず、UserJSを管理するための拡張をブラウザにインストールします。筆者のおすすめはViolentmonkeyです。

拡張をインストールしたら以下のリンクからUserJSをインストールします。

UserJSがインストールされるとプレイヤーに「映像を左右反転」ボタンが追加されます。ちなみにどうやっているのかと言うと、Video要素にtransform: scale(-1, 1)をスタイルとして指定しているだけです。

プレイヤーに「映像を左右反転」ボタンが追加される
プレイヤーに「映像を左右反転」ボタンが追加される

おわりに

これで、イライラしながら反転直せコメを連投する必要はなくなりました。やったね🥳

You may also like...

  • Vimのfoldexprで新たに折り畳みを定義する方法とその活用法

    Vimで十分に活用されていない組み込み機能の一つは折り畳み(Folding)だと思います。私は以前から折り畳みをいくつかの方法で活用しており、Vimのお気に入りの機能の一つになっています。この記事では、私がどのように折り畳みを設定しているのか、さらには折り畳みを活用するためのプラグインについてみなさんに共有します。

  • A keyboard-oriented system tray for X11 tiling window managers

    Typically, tiling window managers like XMonad do not have a system tray. If you want a system tray, you can use a standalone implementation like stalonetray or a status bar implementation with built-in system tray support, such as polybar.

  • Why you should use wcwidth() to calculate a character width

    Character width depends on the font, and Unicode Consortium does not provide explicit width definitions for all characters. There are characters that have ambiguous widths other than those defined as "Ambiguous (A)" in EastAsianWidth.txt. For example, "☀ (U+2600)" is defined as "Neutral (N)" in EastAsianWidth.txt, but its width may be full-width in a CJK font or an emoji font. This means that a non-East Asian character may be also the ambiguous-width character. Character width tables in default locales is problematic for both CJK and non-CJK users. You can create a custom locale to define a better character width table. wcwidth() respects defined by the locale. All TUI applications should consistently use wcwidth() to calculate the width of the character without an embedded character width table. If there is a mismatch in character width between applications, the screen will be broken.

  • XMonadでカスタマイズ可能なマルチカラムレイアウトを

    XMonadで3列以上のレイアウトを提供するモジュールとして、xmonad-contribのThreeColumnsとMultiColumnsが存在する。ThreeColumnsは3列固定のレイアウトで、MultiColumnsは列数が動的に増減するレイアウトだ。しかし、いずれのレイアウトも筆者の要求を満たすものではなく、新しいレイアウトを独自に作成するに至った。