Stellaすてら

Description
For Niconico/YouTube/Vimeo, Add control commands and information display(on status line).ニコニコ動画/YouTube/Vimeo 用。操作コマンドと情報表示(ステータスライン上に)追加します。
Latest version
0.32.0
Author
anekos
License
new BSD License (Please read the source code comments of this plugin)修正BSDライセンス (ソースコードのコメントを参照してください)

for 2.2
http://coderepos.org/share/browser/lang/javascript/vimperator-plugins/branches/2.2/stella.js
for 2.1
http://coderepos.org/share/browser/lang/javascript/vimperator-plugins/branches/2.1/stella.js
for 2.0
http://coderepos.org/share/browser/lang/javascript/vimperator-plugins/branches/2.0/stella.js
for 1.2
not supported
for Nightly
http://coderepos.org/share/browser/lang/javascript/vimperator-plugins/trunk/stella.js

Commands

:stpl[ay]
play or pause
:stpa[use]
pause
:stvolume <VOLUME>
set to the specified volume.
:stmu[te]
turn on/off mute.
:stre[peat]
turn on/off mute.
:stco[mment]
turn on/off comment visible.
:stse[ek] <TIMECODE>
seek to specified position.
TIMECODE formats
  • :stseek 1:30 # 1分30秒
label.style.marginRight = (r || 0) + 'px';
  • :stseek 90 # 90秒
:stse[ek]! <TIMECODE>
seek to the specified position from current position at relatively.
:stfe[tch]
fetch and save the video.
:stla[rge]
enlarge video screen.
:stfu[llscreen]
turn on/off fullscreen.
:stqu[ality]
Set video quality.

Local Mappings Sample

function addLocalMappings(buffer, maps) {
  maps.forEach(
    function (map) {
      let [cmd, action, extra] = map;
      let actionFunc = action;
      extra || (extra = {});

      if (typeof action == "string") {
        if (action.charAt(0) == ':')
          actionFunc = extra.open ? function () commandline.open("", action, modes.EX)
                                  : function () liberator.execute(action);
        else
          actionFunc = function () events.feedkeys(action, extra.noremap, true);
      }
      extra.matchingUrls = buffer;
      mappings.addUserMap(
        [modes.NORMAL],
        [cmd],
        "Local mapping for " + buffer,
        actionFunc,
        extra
      );
    }
  );
}

addLocalMappings(
  /^(http:\/\/(es|www).nicovideo.jp\/watch|http:\/\/(jp|www)\.youtube\.com\/watch|http:\/\/(www\.)?vimeo\.com\/(channels\/(hd)?#)?\d+)/,
  [
    ['<C-g>', ':pageinfo S',      ],
    ['p',     ':stplay',          ],
    ['m',     ':stmute',          ],
    ['c',     ':stcomment',       ],
    ['zz',    ':stlarge',         ],
    ['r',     ':strepeat',        ],
    ['+',     ':stvolume! 10',    ],
    ['-',     ':stvolume! -10',   ],
    ['h',     ':stseek! -10',     ],
    ['l',     ':stseek! 10',      ],
    ['k',     ':stvolume! 10',    ],
    ['j',     ':stvolume! -10',   ],
    ['s',     ':stseek ',         {open: true}],
    ['S',     ':stseek! ',        {open: true}],
    ['v',     ':stvolume ',       {open: true}],
    ['V',     ':stvolume! ',      {open: true}],
    ['o',     ':strelations ',    {open: true}],
    ['O',     ':strelations! ',   {open: true}],
  ]
);

Commands

:stpl[ay]
再生/ポーズの解除を行う。
:stpa[use]
一時停止する。
:stvolume <VOLUME>
指定の音量にする。
0から100の数字で指定する。
:stmu[te]
ミュートのOn/Offを切り替える。
:stre[peat]
リピートモードのOn/Offを切り替える。
:stco[mment]
コメントのOn/Offを切り替える。
:stse[ek] <TIMECODE>
指定の秒数までシークする。
TIMECODE は以下の様に指定できる。
  • :stseek 1:30 # 1分30秒
  • :stseek 1.5 # 1.5分。90秒
  • :stseek 90 # 90秒
:stse[ek]! <TIMECODE>
現在の位置から TIMECODE 分移動する。
:stfe[tch]
動画をファイルとして保存する。
:stla[rge]
画面を大きくする/戻す。
:stfu[llscreen]
フルスクリーン表示のOn/Offを切り替える。
:stqu[ality]
動画の品質を設定

Controls

マウスのホイール
パネル上でホイールの上下することにより音量を上下できます
時間をクリック
再生時間をの表示をクリックすることでシークできます。
左の方をクリックすれば最初の方に、右の方をクリックすれば最後の方に跳びます。
アイコンをクリック
再生・ポーズ
アイコンをダブルクリック
フルスクリーン切り替え
パネルの cflmr をクリック
以下の機能をオンオフします。
(大文字の時がオン)
C
コメント
F
フルスクリーン (Stella によるもの)
L
大画面
M
ミュート(消音)
R
リピート

Local Mappings Sample

function addLocalMappings(buffer, maps) {
  maps.forEach(
    function (map) {
      let [cmd, action, extra] = map;
      let actionFunc = action;
      extra || (extra = {});

      if (typeof action == "string") {
        if (action.charAt(0) == ':')
          actionFunc = extra.open ? function () commandline.open("", action, modes.EX)
                                  : function () liberator.execute(action);
        else
          actionFunc = function () events.feedkeys(action, extra.noremap, true);
      }
      extra.matchingUrls = buffer;
      mappings.addUserMap(
        [modes.NORMAL],
        [cmd],
        "Local mapping for " + buffer,
        actionFunc,
        extra
      );
    }
  );
}

addLocalMappings(
  /^(http:\/\/(es|www).nicovideo.jp\/watch|http:\/\/(jp|www)\.youtube\.com\/watch|http:\/\/(www\.)?vimeo\.com\/(channels\/(hd)?#)?\d+)/,
  [
    ['<C-g>', ':pageinfo S',      ],
    ['p',     ':stplay',          ],
    ['m',     ':stmute',          ],
    ['c',     ':stcomment',       ],
    ['zz',    ':stlarge',         ],
    ['r',     ':strepeat',        ],
    ['+',     ':stvolume! 10',    ],
    ['-',     ':stvolume! -10',   ],
    ['h',     ':stseek! -10',     ],
    ['l',     ':stseek! 10',      ],
    ['k',     ':stvolume! 10',    ],
    ['j',     ':stvolume! -10',   ],
    ['s',     ':stseek ',         {open: true}],
    ['S',     ':stseek! ',        {open: true}],
    ['v',     ':stvolume ',       {open: true}],
    ['V',     ':stvolume! ',      {open: true}],
    ['o',     ':strelations ',    {open: true}],
    ['O',     ':strelations! ',   {open: true}],
  ]
);

Link

http://d.hatena.ne.jp/nokturnalmortum/20081213/1229168832
back to index